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-3 done #90

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

task-3 done #90

wants to merge 4 commits into from

Conversation

GDM-git
Copy link
Collaborator

@GDM-git GDM-git commented May 24, 2021

No description provided.

Mikhail-00 added 2 commits May 24, 2021 13:57
@@ -0,0 +1,151 @@
#include "CubeWindow.h"

std::array<QVector3D, 17> cubes_arr{
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
std::array<QVector3D, 17> cubes_arr{
constexpr std::array<QVector3D, 17> cubes_arr{

QVector3D( 2.0f, 1.0f,-2.5f),QVector3D( 2.0f, 0.0f,-2.5f),QVector3D( 2.0f,-1.0f,-2.5f)
};

std::array<Vertex_Data, 24> vertexes{{
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
std::array<Vertex_Data, 24> vertexes{{
constexpr std::array<Vertex_Data, 24> vertexes{{

Vertex_Data{{ 0.5f,-0.5f,-0.5f}, { 0.0f,-1.0f, 0.0f}}
}};

std::array<GLuint, 36> indexes{{
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
std::array<GLuint, 36> indexes{{
constexpr std::array<GLuint, 36> indexes{{

Vertex_Data{{ 0.5f,-0.5f,-0.5f}, { 0.0f,-1.0f, 0.0f}}
}};

std::array<GLuint, 36> indexes{{
Copy link
Owner

Choose a reason for hiding this comment

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

Вообще не очень хранить эти значения в виде глобальных переменных, вы же их один раз копируете в видеопамять и больше они вам не нужны.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Исправил

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