Модель прямоугольника

This commit is contained in:
parent 6589012435
commit 07f712005e
1 changed files with 12 additions and 0 deletions

View File

@ -144,6 +144,18 @@ int main(void)
quadProgram.load(GL_FRAGMENT_SHADER, "shaders/quad.frag");
quadProgram.link();
glm::vec3 quadVertices[] = { {-1.0f, 1.0f, 0.0f}
, {-1.0f, -1.0f, 0.0f}
, { 1.0f, 1.0f, 0.0f}
, { 1.0f, -1.0f, 0.0f}
};
GLuint quadIndices[] = {0,1,2,2,1,3};
Model quadModel;
quadModel.load_verteces(quadVertices, 4);
quadModel.load_indices(quadIndices, 6);
// Пока не произойдет событие запроса закрытия окна
while(!glfwWindowShouldClose(window))
{