PDA

View Full Version : Texture from pixel buffer has no color, see screenshot.



longshotnl
02-06-2005, 09:04 AM
I have placed a screenshot of my problem here:
http://www.gunfight.net/img/misc/problem_01.jpg
The texture 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 please tell me why there's no color in the texture from the pixel buffer?

longshotnl
02-08-2005, 09:12 AM
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 :
http://www.gunfight.net/img/misc/problem_02.jpg

Klaus
02-08-2005, 09:59 AM
wglsharelists (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6flf.asp) shares display lists, textures, fragment programs, etc. between contexts within the same process.

- Klaus

longshotnl
02-08-2005, 03:14 PM
ok, thanks a lot, that works...