View Full Version : How to use GLUT

03-08-2013, 12:39 AM
how can i use glut.h
in windows form application
because i need to draw the sphere or cube in windows form application????

03-08-2013, 02:26 AM
You don't use GLUT for this. GLUT is a simple event loop with a window and draw callbacks. If you want to render inside another windows framework you need to create an OpenGL context inside the onCreate and then inside onDraw make it current and draw.

03-08-2013, 09:55 AM
i use opengl with windows form application and i program GUI for this
but when add the glut header to my program
i dont able
enough i add gl & glu
but how can i draw sphere by using GLUTSpher???
i make my header for opengl command
and i add this to my GUI

if i dont able ti do this?
i need code to draw sphere using gl-point?

03-08-2013, 01:44 PM
i need code in opengl to draw the sphere by gl-point?????

03-16-2013, 05:22 PM
i need code in opengl to draw the sphere by gl-point?????

If you just need to draw a sphere, then you can use glutSphere but why don't you use GLU instead?

Call glPolygonMode(GL_FRONT_AND_BACK, GL_POINT) to set point mode.

03-16-2013, 09:12 PM
lên n*o các b?n oi