PDA

View Full Version : Enabling multisampling in a GLUT application



Qu0ll
01-13-2010, 11:20 PM
I have had a look at the OpenGL samples at [1] and would like to take the NURBS example and see what effect multisampling has on the quality of rendering. Can someone show me the code to enable multisampling in this example (or in general) which is a GLUT application? I believe I need to get the OpenGL context but I don't know how I can do that with GLUT.

Thanks,

-Qu0ll

[1] http://www.opengl.org/resources/code/samples/simple/

Dark Photon
01-14-2010, 12:44 PM
Can someone show me the code to enable multisampling in ...a GLUT application?
Google GLUT_MULTISAMPLE. Freeglut 2.6.0 looks like it supports it. With this presumably you then just glEnable( GL_MULTISAMPLE ) and roll.

If you can't get GLUT to allocate a multisample-capable window, you'll have to drop down and use wgl or glX and do it yourself.

Qu0ll
01-15-2010, 04:57 AM
Thanks, Freeglut has done the trick!