Shot in the dark texture question
Im attempting to add texturing to my editor, but the textures ony display in the last window. The same rendering code is used for each of the views. Heres a picture:
any idea whats wrong?
Are the different views different OpenGL contexts, or different viewports within the same context?
"Sneftel is correct, if rather vulgar." --Flarelocke
"Sneftel is correct, if rather vulgar." --Flarelocke
I *think* that each context keeps up with its own textures, so you cannot use textures from one context in another. BTW, nice editor, and good luck.
When i disable the bottom three views, the top view becomes textured. So basically, whichever view is rendered last works properly.
Im almost sure its just an order of operations issue with opengl commands, because i have solved this problem before, but i cant recall how.
Im almost sure its just an order of operations issue with opengl commands, because i have solved this problem before, but i cant recall how.
Are you calling glBindTexture and glTexImage2D in each context?
"Sneftel is correct, if rather vulgar." --Flarelocke
"Sneftel is correct, if rather vulgar." --Flarelocke
Ahha, i tried switching the context when generating textures and low and behold, they only appear in the active context when the texture was generated.
So, do i seriously have to generate 4 of the same textures for to allow texturing in all four windows at once? Seems like overkill...
also, are how do i free the textures from memory? my setup maintains a single list of unsigned ints, which represent pengl textures, but does it matter which context is enabled when i free them?
thanks Sneftel, you were quite right
[edited by - Mulligan on January 25, 2004 3:49:36 PM]
So, do i seriously have to generate 4 of the same textures for to allow texturing in all four windows at once? Seems like overkill...
also, are how do i free the textures from memory? my setup maintains a single list of unsigned ints, which represent pengl textures, but does it matter which context is enabled when i free them?
thanks Sneftel, you were quite right
[edited by - Mulligan on January 25, 2004 3:49:36 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement