Jump to content
  • Advertisement
Sign in to follow this  
ConorH

OpenGL Reloading a texture from an SDL_Surface

This topic is 4031 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 using SDL_TTF with SDl and OpenGL. I wrote a class to act as a text label, which will always have just one surface in memory for it to use, as SDL_TTF renders to a new surface each time you render some text. It worked fine in SDL only, but now I have to make an OpenGL texture for it to render as well, but this gives me scrambled text and a memory leak. So 2 things: - I assume the memory leak is something todo with OpenGL, as I remember reading that glDeleteTextures only deletes the copy in video memory, and that one must delete the entire object each time (mine is bound to a class; is this possible to remake one all the time?). How would I remedy this - The scrambled text appears to be a format issue, but adding GL_RGBA doesnt seem to fix it, like it did before when my plain images were scrambled

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!