• Advertisement
Sign in to follow this  

Textures are white

This topic is 4918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Different device context, different texture needed (each texture is specific to it's device context).

Share this post


Link to post
Share on other sites
So what defines which DC a texture is loaded to? Is it automatically loaded into the current DC?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
try to share the textures between contexts, just pass the first context to the glCreateContext as the sharelist when creating the second.

Share this post


Link to post
Share on other sites
Share a context? Changing the context changes which window is rendered to... can you go into more detail as to how to do that?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement