Last active
October 30, 2020 21:48
-
-
Save alfredoem/0241ba5e7e77ea380f2bced3d85010ff to your computer and use it in GitHub Desktop.
OPENGL primivites example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// rectangle | |
glColor3f(0.0,0.0,1.0); | |
glBegin(GL_QUADS); | |
glVertex2i(7, 4);// arriba derecha - top right | |
glVertex2i(-7, 4);// arriba izquierda - top left | |
glVertex2i(-7, 0);// abajo izquierda - bottom left | |
glVertex2i(7, 0);// abajo derecha - bottom right | |
glEnd(); | |
// square | |
glColor3f(0.0,0.0,1.0); | |
glBegin(GL_QUADS); | |
glVertex2i(5, 5);// arriba derecha | |
glVertex2i(-5, 5);// arriba izquierda | |
glVertex2i(-5, -5);// abajo izquierda | |
glVertex2i(5, -5);// abajo derecha | |
glEnd(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment