Sign in to follow this  
Nairb

A Few OGL Questions

Recommended Posts

Nairb    766
(1) I was trying to toss multisampling using ARB_Multisample into my game since it seemed easy enough. Unfortunately, I'm using glut, which does not seem to give me the low-level access I would need to recreate my window to support multisampling. I read about GLUT_MULTISAMPLE, but it seems to work only on the X windowing system. I was wondering if anyone had any experience getting multisampling to work in glut, or if it's just a lost cause. (2) I also looked into incorporating cubic environment mapping. I can't find any good resources on it (anyone know of any?), making it hard, but I found a demo or two I could apply. The major problem is that it seems to require I redraw my scene 6 times each frame, which is crippling my performance. I read about someone who only redraws 1 side of the environment map each frame, meaning I'd only have to redraw twice each frame. That seems like a good solution, but I'm still a bit hesitant. Any advice? (3) Reading from the framebuffer seems to be the new hip thing with the new graphics cards that have PCIe. Is this done simply by using glReadPixels? Cheers, --Brian

Share this post


Link to post
Share on other sites
Promag    132
Question 3)

I think you are asking for EXT_framebuffer_object and ARB_pixel_buffer_object. The first makes offscreen rendering easy (for gpgpu and stuff like that) (edited) and also with multiple render targets, and the second makes multiple copys faster and asyncronious. (IMHO)

Share this post


Link to post
Share on other sites
bpoint    464
1) Sorry... I don't use GLUT. :(

2) Rendering the scene six times is what cube environment mapping is all about! :) Technically, yes, you could just update one portion of the map each frame, but the other five portions of your map would be few frames behind. While there's nothing wrong with that, it just depends on how much visual impact it would have. If your camera doesn't move too swiftly then you could probably get away with it.

3) glReadPixels is a synchronous operation. The CPU stops until all pending graphics commands have completed, and the GPU doesn't start again until glReadPixels has completed. You'd want to look into GL_ARB_pixel_buffer_object to do things asynchronously.

Share this post


Link to post
Share on other sites
RichardS    298
Multisampling is not limited to GLX systems only. I just tested it on Mac OS 10.4.3, and including GLUT_MULTISAMPLE returns a context with 2 samples. Using glutInitDisplayString to force different numbers of samples also worked.

I have no idea of the state of the windows glut library is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this