Created
September 3, 2018 06:48
-
-
Save fatkulnurk/d3fbc011a4da4dcc728ac616dd042e84 to your computer and use it in GitHub Desktop.
Glut Project Create Windows Example
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
/* | |
* GLUT Shapes Demo | |
* | |
* Written by Nigel Stewart November 2003 | |
* | |
* This program is test harness for the sphere, cone | |
* and torus shapes in GLUT. | |
* | |
* Spinning wireframe and smooth shaded shapes are | |
* displayed until the ESC or q key is pressed. The | |
* number of geometry stacks and slices can be adjusted | |
* using the + and - keys. | |
*/ | |
#include <windows.h> | |
#ifdef __APPLE__ | |
#include <GLUT/glut.h> | |
#else | |
#include <GL/glut.h> | |
#endif | |
#include <stdlib.h> | |
void userdraw(void) | |
{ | |
// Disinitempatuntukmenggambar | |
} | |
void display(void) | |
{ | |
glClear(GL_COLOR_BUFFER_BIT); | |
userdraw(); | |
glutSwapBuffers(); | |
} | |
int main(int argc, char *argv[]) | |
{ | |
glutInit(&argc,argv); | |
glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB ); | |
glutInitWindowPosition(100,100); | |
glutInitWindowSize(640,480); | |
glutCreateWindow("Fatkul Nur Koirudin"); | |
glClearColor(0.0, 0.0, 0.0, 0.0); | |
gluOrtho2D(-320., 320., -240.0, 240.0); | |
glutIdleFunc(display); | |
glutDisplayFunc(display); | |
glutMainLoop(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment