Jump to content
  • Advertisement

Archived

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

shaobohou

glGenTextures questions

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

I''ve been trying to add texture mapped font to my program and have come across some weird problem. Does anyone knows what sort of things (functions, constants have to be set up before glGenTextures start returning correct result? I am currently using SDL, and it seems to me this only occurs once the video mode has been set on the main surface, this however seems to cause anything other than the textured surface (a quad) to disappear, very ordd. i haven''t posted any code since it is very messy with function pointers and things, will probably only confuse the issue

Share this post


Link to post
Share on other sites
Advertisement
glGenTextures() returns usable texture names (for the current context) as long as a valid context is current.

Check with glGetError() if you''re getting problems.

Share this post


Link to post
Share on other sites
haven''t tried glGetError yet, but it seems if the texture mapping stuff worked, anything that is not texture mapped can''t be seen any more.

Share this post


Link to post
Share on other sites
If one portion of your texture is black (or the same color of the background) it could be that untextured images are becoming all black and vanishing into it. Make sure you disable texture mapping before drawing untextured objects, just not providing texture coordinates won''t work

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!