unknown error code (related to FBO's?)

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
}

http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt

Returned by GetError():
INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506

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   0x0506

As far as gluErrorString goes, well…

-mr. bill

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.

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.

oh found the problem to be, when using shaders (cgfx) with FBO’s

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