Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Reloading a texture from an SDL_Surface

This topic is 4403 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
Sign in to follow this  

  • 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!