#include <
{
glBegin(GL_POINTS);
glVertex2i(x,y);
glEnd();
}
void drawTitik()
{
glBegin(GL_POINTS);
glVertex2i(100,50);
glVertex2i(100,130);
glVertex2i(150,130);
glEnd();
}
void display(void)
{
//clear screen
glClear(GL_COLOR_BUFFER_BIT);
drawDot();
glutSwapBuffers();
}
int main(int argc, char **argv)
{
glutInit(&argc,argv);//Inisialisasi Toolkit
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);
glutInitWindowPosition(100,100);
glutInitWindowSize(640,480);
glutCreateWindow("My First OpenGL");
glClearColor(0.0, 0.0,0.0,0.0);
gluOrtho2D(0.,840.,-240.,240.);
glutIdleFunc(display);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
Wednesday, March 16, 2011
Sample Point Drawing program with Visual C + +
8:54 PM
OpenGL, OpenGL Configuration in Ms.. Visual C + + 6.0, OpenGL on Microsoft Windows
No comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment