Created
November 13, 2021 15:17
-
-
Save borja-munoz/a457fcf6a6fe4d07139db1c59da640fb to your computer and use it in GitHub Desktop.
Hello World - OpenGL Programming Guide
This file contains hidden or 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
#include <whateverYouNeed.h> | |
main() { | |
InitializeAWindowPlease(); | |
glClearColor (0.0, 0.0, 0.0, 0.0); | |
glClear (GL_COLOR_BUFFER_BIT); | |
glColor3f (1.0, 1.0, 1.0); | |
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); | |
glBegin(GL_POLYGON); | |
glVertex3f (0.25, 0.25, 0.0); | |
glVertex3f (0.75, 0.25, 0.0); | |
glVertex3f (0.75, 0.75, 0.0); | |
glVertex3f (0.25, 0.75, 0.0); | |
glEnd(); | |
glFlush(); | |
UpdateTheWindowAndCheckForEvents(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment