Sign in to follow this  
Tigra7

Textures are white

Recommended Posts

Tigra7    100
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
C-Junkie    1099
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
Tigra7    100
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
Guest Anonymous Poster   
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
Tigra7    100
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
Tigra7    100
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this