PDA

View Full Version : Enabling multisampling



ophois
08-19-2005, 06:02 AM
I'm working my way through the red book (using c++/eclipse/cygwin). Ive got a test app that draws a little robotic arm thing that I can rotate around with a few key presses to let me see how things look at different angles. Ive also got glew up and running.

I do however hit a problem with multisampling. I have created my window with:


glutInitDisplayMode(GLUT_DEPTH |
GLUT_RGBA |
GLUT_DOUBLE|
GLUT_MULTISAMPLE);

// 640x480, 16bit pixel depth, 60Hz refresh rate
glutGameModeString( "1280x1024:32s@75" );I then do some setup including


glEnable(GL_DEPTH_TEST);
glShadeModel (GL_SMOOTH);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_NORMALIZE);
glEnable(GL_BLEND);
glEnable(GL_MULTISAMPLE);However I appear to have no multisampling. A call to:


GLint bufs;
glGetIntegerv(GL_SAMPLE_BUFFERS,&bufs);
cerr << " BUFS: " << bufs << endl;prints '0'.

I can't see anything In the red book Im meant to be doing that I'm not and the test app multisamp.exe also does not appear to use multisampling.

Any help would be greatlly appreciated. I realise there are other articles on the forums about this but I'm having trouble following them to be honest.

jide
08-19-2005, 06:31 AM
Haven't done any multisample yet. You might have a look at the specs:

http://oss.sgi.com/projects/ogl-sample/registry/ARB/multisample.txt

Also, check that glut effectively support ARB_multisample. Otherwise, try with Win32 API or glx depending on your computer.

Hope that could help.