PDA

View Full Version : How to use GLUT



marahalsaidan
03-08-2013, 01: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????

dorbie
03-08-2013, 03: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.

marahalsaidan
03-08-2013, 10: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?

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

V-man
03-16-2013, 06: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.

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