Skip to content
Snippets Groups Projects
Commit b8214733 authored by KEL0060's avatar KEL0060
Browse files

make cube

parent e5efbbba
No related merge requests found
......@@ -106,12 +106,24 @@ int main(void)
glBegin(GL_TRIANGLES);
glColor3f(1.f, 0.f, 0.f);
glVertex3f(-0.6f, -0.4f, 0.f);
glVertex3f(0.0f, 0.0f, 0.f);
glColor3f(0.f, 1.f, 0.f);
glVertex3f(0.6f, -0.4f, 0.f);
glVertex3f(0.0f, 0.5f, 0.f);
glColor3f(0.f, 0.f, 1.f);
glVertex3f(0.f, 0.6f, 0.f);
glVertex3f(0.5f, 0.0f, 0.f);
glEnd();
glBegin(GL_TRIANGLES);
glColor3f(1.f, 1.f, 0.f);
glVertex3f(0.5f, 0.5f, 0.f);
glColor3f(0.f, 1.f, 0.f);
glVertex3f(0.0f, 0.5f, 0.f);
glColor3f(0.f, 0.f, 1.f);
glVertex3f(0.5f, 0.0f, 0.f);
glEnd();
glfwSwapBuffers(window);
glfwPollEvents();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment