PDA

View Full Version : solid color where texture should be



bdub
02-10-2004, 10:50 AM
i am writing an image viewer that displays images as tiled textures.
In my program, i can have multiple windows.
Everything works fine when i am using only one window.
However, when i load an image in another window the texture is just a solid square (the color that i have set for drawing lines).
i assume that i am not setting something for this second window, but i'm not sure what that might be... it SHOULD be calling all of the same gl functions... but i guess it isn't.
What might cause a solid color instead of a texture?

dorbie
02-10-2004, 12:11 PM
Do you have different contexts, do the contexts share textures?

For each OpenGL context you need to rebind textures unless you explicitly try to share resources between contexts.

bdub
02-10-2004, 01:43 PM
that was it! i was creating the textures
dynamically THEN switching the contexts and
trying to draw them.

thanks dorbie!!