PDA

View Full Version : different textures in pbuffer



hoshi55
03-23-2004, 11:46 PM
hi all
when i create a pBuffer at some point in my program and then render some textured geometry into it, there is never any texturing. it seems to me that textures registered for the main rendering context are not valid for the pixel buffer. is there any sensible way to correct this? (i.e. NOT registering them manually a second time for the pbuffer)

thx
hoshi55

hoshi55
03-23-2004, 11:59 PM
ok found it!

wglShareLists() does the trick :)

roffe
03-24-2004, 12:05 AM
Originally posted by hoshi55:
is there any sensible way to correct this? (i.e. NOT registering them manually a second time for the pbuffer)Yes, by using the same rendering context for both window and pbuffer. You can do this by making your pbuffer have the exact same pixelformat as your window.

If not you will need to wglShareLists/glBindTetxure for textures used in both contexts. You do not have to "register"(i'm assuming you mean calling glTexImageXX()) already created textures if you previously called wglShareLists, but you do have to bind them.

Did that make sense?