PDA

View Full Version : unknown error code (related to FBO's?)



supagu
05-18-2005, 04:22 AM
i have error code 1286 from glError, and cant find any references to what it means.

gluErrorString returns (null)

:-/

im working with FBO's, and clearing the framebuffer.


void TextureRender::Lock(bool clear)
{
Device::GetInstance().CheckErrors();

glBindTexture(GL_TEXTURE_2D, 0);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb);

Device::GetInstance().CheckFramebufferStatus(); // <-- checking framebuffer status here returns "unsupported format", but in my create method, this check returns okay :-/
Device::GetInstance().CheckErrors();

glPushAttrib(GL_VIEWPORT_BIT);
glViewport(0, 0, width, height);

Device::GetInstance().CheckErrors();

glClearColor(1, 0, 0, 0);

Device::GetInstance().CheckErrors(); // <-- no error till this point

if (clear)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Device::GetInstance().CheckErrors();// <-- error is found here
}

Relic
05-18-2005, 04:45 AM
http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt

Returned by GetError():
INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506

mrbill
05-18-2005, 05:01 AM
The error INVALID_FRAMEBUFFER_OPERATION_EXT is generated if the value of FRAMEBUFFER_STATUS_EXT is not FRAMEBUFFER_COMPLETE_EXT when any attempts to render to or read from the framebuffer are made.

INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506As far as gluErrorString goes, well....

-mr. bill

supagu
05-19-2005, 12:27 AM
so my FBO is valid when i finish creating it, but when i go to bind it for rendering too, its now not valid? should it be valid at this stage?

because currently all i get (after rendering to it, clearing it to green) is black texture.

Relic
05-19-2005, 01:43 AM
Creating is not the same as binding for use.
You said yourself the check framebuffer status reports unsupported format.
What hardware and format was that?
That the error is found on the first rendering is obviously when that condition is evaluated.
Put more code or take an FBO example which works and adapt.

supagu
05-19-2005, 02:37 AM
oh found the problem to be, when using shaders (cgfx) with FBO's

:-/ need to work out how to disable cgfx.