View Full Version : FBO problems
03-17-2011, 05:22 PM
In my program I am rendering to an FBO multiple times. On ATI/Nvidia this works perfectly. I check my FBOs when I create them and they give no errors (attach correctly). After a frame has completed rendering I call glGetError() no errors are received. It works fine.
Now .. on Intel cards I have this strange problem where
does absolutely nothing. It just wont work. I can't clear the colour or depth buffer, at the same time or independently.
On ATI/Nvidia it looks like this
On Intel ..
I am really at a loss to explain this one. I'm at the point where I might have to try and simulate glClear just by drawing a quad with depth testing disabled.
Any ideas? I'm losing my hair here !
03-17-2011, 08:16 PM
I don't know if this is relevant, but are you setting the clear values before the glClear() call?
Maybe the drivers for the intel doesn't keep this values as a state (just a guess).
03-18-2011, 03:00 AM
What driver version/graphics card model? Can you post some code to show how you setup FBO?
03-18-2011, 03:33 AM
It's a mobile intel series (4) express chipset family
Common in laptops
Says its running opengl version 2.1
And yeah I am setting the clear colour before calling glclear. Theres a bunch of things gonna try today, flushing the pipeline before asking for the texture. I was using stencil when rendering to the back buffer, maybe that's somehow effecting it.
03-18-2011, 03:39 AM
Check if your FBO is complete after setup code.
03-18-2011, 05:05 AM
From OpenGL 4.1 spec:
When Clear is called, the only per-fragment operations that are applied (if enabled) are the pixel ownership test, the scissor test, and dithering. The masking operations described in section 4.2.2 are also applied.
So, from this, do you have the scissor rect set to the area required + color/depth/stencil masks allowing clearing to occur.
The other difference I can see is that according to GLview, the Intel setup only supports GL_EXT_framebuffer_object, whereas NVidia + ATI cards probably support both GL_ARB_framebuffer_object + GL_EXT_framebuffer_object, so maybe there is some extra restriction that is relaxed with the ARB version of the extension?
Perhaps clearing the depth + stencil buffers at the same time might help too. If they are shared, then this should be faster than clearing them separately anyway.
03-18-2011, 05:30 AM
worth a shot ..
03-18-2011, 06:49 AM
How can I clear the depth buffer .. without using glclear ?
Never mind I figured it out. Well, I figured out what's going wrong. For some reason when i call
glClear it clears the viewport, but the size of a much smaller FBO ..
Manually clearing the colour and depth buffers does work. This is really insane, I shouldn't have to do this :(
03-18-2011, 02:42 PM
I got it to work using this code
Which which manually, clears the colour and depth buffer. You can see the viewport is correct since the above code does what glClear fails to do ..
But other problems occur
You can see the shadow has strange artifacts, again this doesn't happen with Nvidia/ATI.
Anyone else try to code for Intel graphics cards? Intel market share is something like 50%, i'd like to try and support these things if possible .. but driver bugs are really kicking my ass
03-18-2011, 07:44 PM
I suggest making a fallback renderer for Intel chips that uses minimal functionality. They're going to perform like crap anyways, so you might as well cut out all the features, instead of trying to run the same code on Intel chips and a real GPU.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.