Модель прямоугольника
This commit is contained in:
parent
6589012435
commit
07f712005e
12
src/main.cpp
12
src/main.cpp
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue