Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mulligan

Shot in the dark texture question

This topic is 5262 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

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?

Share this post


Link to post
Share on other sites
Advertisement
Are the different views different OpenGL contexts, or different viewports within the same context?


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Do you honestly expect a response? We need WAAAY more info.

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Are you calling glBindTexture and glTexImage2D in each context?


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


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

Share this post


Link to post
Share on other sites
look up glShareLists() on MSDN, it allows contexts to share display lists and textures.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!