Shot in the dark texture question

Started by
16 comments, last by Mulligan 20 years, 2 months ago
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?
Advertisement
Are the different views different OpenGL contexts, or different viewports within the same context?

"Sneftel is correct, if rather vulgar." --Flarelocke
Do you honestly expect a response? We need WAAAY more info.
Get a name AP.

Different contexts.
iirc dont textures have to be loaded into each context?
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.
Are you calling glBindTexture and glTexImage2D in each context?

"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]
look up glShareLists() on MSDN, it allows contexts to share display lists and textures.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

This topic is closed to new replies.

Advertisement