Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 2. #86

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Task 2. #86

wants to merge 4 commits into from

Conversation

Nvoid09
Copy link
Collaborator

@Nvoid09 Nvoid09 commented May 23, 2021

Features: c - cube color, b - background

Copy link
Owner

@sadads1337 sadads1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно еще поправить замечания из задачи 1


find_package(Qt5 COMPONENTS Widgets REQUIRED)

add_executable(EXE ${SRC})
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Название исполняемого файла нужно поправить

auto position = QVector3D{0, 0, 0};
auto normal = QVector3D{0, 0, 0};

normal[coord] = int(side / 3 * 2) - 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c cast нужно заменить на static_cast

GLint posAttr_ = 0;
GLint matrixUniform_ = 0;

geometry::figure* figures;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И пользуйте умные указатели

void init() override;
void render() override;

void addObj(geometry::figure *f);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 варианта:

  • Передавайте по значению(или rvalue ссылке), а затем делайте std::move
  • Передавайте по указателю (умному)

Narick09 added 2 commits May 26, 2021 14:36
	изменено: src/Voitov/Task2/CMakeLists.txt
	изменено: src/Voitov/Task2/cube.cpp
	изменено: src/Voitov/Task2/cube.hpp
	удалено: src/Voitov/Task2/figure.cpp
	изменено: src/Voitov/Task2/figure.hpp
	новый файл: src/Voitov/Task2/figureinformation.cpp
	новый файл: src/Voitov/Task2/figureinformation.h
	изменено: src/Voitov/Task2/main.cpp
	изменено: src/Voitov/Task2/uiwindow.cpp
	изменено: src/Voitov/Task2/uiwindow.h

Исправлено название исполняемого файла
c cast заменен на static_cast в src/Voitov/Task2/cube.cpp
Добавлен unique_ptr
@Nvoid09 Nvoid09 force-pushed the feature-voitov-task-2 branch from 78be5c8 to d84256d Compare May 26, 2021 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants