Textures are white

Started by
7 comments, last by Tigra7 19 years, 8 months ago
I'm rendering to a textured quad to a second windo that has it's own rc dc and all that good stuff, but when I try to render to it the quad shows up, but it's white. I have enabled textures also. what else causes this?
Advertisement
Probably loaded the textures badly. or you're trying to bind to textures inside glBegin/glEnd

check that they're power-of-two in size.

is this in the faq? (idk) it should be
Well see the reason I'm stumped is because I can render the textured quads in my main window just fine using a simple method, but when I use this same method to render in my second window, the textures don't show up. Almost as if some kind of data becomes corrupt or something like that.
Different device context, different texture needed (each texture is specific to it's device context).
So what defines which DC a texture is loaded to? Is it automatically loaded into the current DC?
I believe so.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
try to share the textures between contexts, just pass the first context to the glCreateContext as the sharelist when creating the second.
Share a context? Changing the context changes which window is rendered to... can you go into more detail as to how to do that?
Ok forget sharing a context, I'm just gonna create the texture into the new context. I tried that, and it still does not work. This is what I'm doing in my create texture method:

wglMakeCurrent(newDC, newRC);
glEnable(GL_TEXTURE_2D);
glBindTexture(this stuff...)
wglMakeCurrent(oldDC, oldRC);

am I missing something in there that I need to add?

This topic is closed to new replies.

Advertisement