PDA

View Full Version : glCopyTexSubImage2D + Pbuffer



Quaternion
05-13-2002, 10:17 AM
Hi!

I am trying to use the glCopyTexSubImage2D function in order to copy the pbuffer into a texture. When I call glCopyTexSubImage2D OpenGL generates a GL_INVALID_OPERATION error. This means that "The texture array was not defined by a previous glTexImage2D operation".

My problem is, that I DO define the texture with glTexImage2D before I call glCopyTexSubImage2D. Any idea what could cause the error?

Thanks,
Shlomi.

davepermen
05-13-2002, 10:22 AM
wglShareContexts or how ever called? the pbuffer context possibly doesn't know your texture..

Quaternion
05-13-2002, 10:25 AM
I guess I don't call it... I thought the texture is unknown to the pbuffer context, but I didn't know I should call wglShareContexts.

Thanks a lot!

Shlomi.

BTW, It's wglShareLists.

[This message has been edited by Quaternion (edited 05-13-2002).]

Quaternion
05-14-2002, 11:58 AM
Hi!

I called wglShareLists but I still get an error on glCopyTexSubImage2D. should I put the texture definition into a display list? Couldn't find a decent explenation about the function...

Thanks,
Shlomi.