When rendering to pixel buffer, there's no color, see screenshot

The image with the white and alpha channel is is generated from pixel buffer.
When i render the same image to screen i get a result like the image in the lower left corner. Now i only see the feet and have no color.
When i get the glGetTexLevelParameter(GL_TEXTURE_INTERNAL_FORMAT) i get 0x8058 which stands for GL_RGBA8, this seems to be right.

Can someone tell me why there’s no color in the texture from the pixel buffer?

I figured out that texture-id’s aren’t interchangable between device-contexts.
Or are they in some way i don’t know about. ?

When i create the textures again using glGenTextures(1,(unsigned int *)&texture->ID);
It works, only is extremely unpleasent to keep track of what context has what id for what texture.

Is there a way to share texture (id’s) between contexts.?

p.s. Here’s an update screenshot :


Is there a way to share texture (id’s) between contexts.?
Yes. wglShareLists can also share textures. At least people claim it can, even though the documentation doesn’t mention it :rolleyes:

wglShareLists( master,g_pbuffer_hRC );
seems to work.
everything is ok now…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.