void CALLBACK display(void) - void CALLBACK display(void)
- {
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT );
- glLoadIdentity();
- glColor3f(1.0, 1.0, 1.0);
- glBegin(GL_POLYGON);
- glVertex3f(0.5,0.5,0.0);
- glVertex3f(0.5,1.5,0.0);
- glVertex3f(1.5,1.5,0.0);
- glVertex3f(1.5,0.5,0.0);
- glEnd();
- glFlush();
- }
int WINAPI WinMain(HINSTANCE hInstance, - int WINAPI WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
- {
- auxInitDisplayMode (AUX_SINGLE|AUX_RGBA| AUX_DEPTH);
- auxInitPosition (0, 0, 500, 500);
- auxInitWindow ("OpenGL");
- myinit();
- auxReshapeFunc (myReshape);
- auxMainLoop(display);
- return 1;
- }
Сподели с приятели: |