I want to use multisampling on ubuntu linux but the glut solution of using glutInitDisplayString( "rgb double depth alpha samples>=4 "); does not seem to work (it throws errors for the sampling part), any other ideas about how to get multisampling on ubuntu/linux?
Hey, I get an error in libglfw.a referring to _glfwPlattformGetVideoModes() and some errors about undefined referenes to alot of XRR related things. are there any other dependencies? thanks!
edit: think i got it, mixed something up with the linking >:), though I don"t see any antialiasing, do I have to use glEnable(GL_MULTISAMPLE) maybe?
hmm I am using geforce 6200 which should have MSAA. I also have the nvidia drivers installed, but something is wrong, also if I try to return GL_SAMPLES i get 0 even though I tried to set it to 4. any ideas on that?
If I force MSAA with the driver window, it works, but I dont really want to depend on that
Just out of curiosiy, glfw seems to be slightly slower (not seriously though) than glut, in an emtpy 400x400 window without FSAA i get ca. 1050fps with glut and ca. 930 with glfw. as i said its not dramatic, just asking out of curiosity
just remembered i changed the depth buffer resolution in the file i posted, perhaps that’s what’s making it slower. it’s in ofAppGLFWWindow.cpp line 86. try lowering it
otherwise for what i’ve seen glfw is even a little bit faster than glut. in an application in particular i saw a great enhancement in fps (like 5 to 10 times) with depth test enabled.
wow thats great news! I will also try to use GLFW on the mac in the future since I could not get SDL to work with OF, GLFW seems to be a better alternative than glut!!
sweet, managed to compile a glfw universal under osx, I will play around with it and see if it works ok. maybe GLFW would be a good alternative for glut as the default window and openGL context tool for OF generally, since it at least gets maintained while glut is pretty much dead?
yes, we considered it while finishing 006, but glfw doesn’t have 2 things that glut has: toggle fullscreen (although glut fullscreen is not real fullscreen but window without decorations) and know the position of the window. although it’s not super important, it can break some code so we decided to go with glut and you can always use other alternatives.
Note I am using Ubuntu Karmic 9.10 on a Dell Inspiron 9400 with ATI Technologies Inc Radeon Mobility X1400 graphics.
I am using only ofImage.draw for all drawing.
If i swap the above out and use Glut my app works as expected. Also I have a lot of logging going on and its behaving normally when using glfw but it no output comes up on the screen.
Hey all - first off thanks for an awesome post and code sample! and sorry if i am bringing the thread back from the dead…
I needed to use GLFW for joystick input as the GLUT handler was too limited. I got it all to work by putting the following code in update() :
is there a better way to do this? I would love to get all this tucked away into ofAppGLFWWindow, and have the input processed by a callback (as is normal for keyboard/mouse input in OF) but it seems that joystick data has to be polled in GLFW- so the only way to do this would be totally bassackward. -or am i wrong?