OpenGL (SDL,C++) tutorial 19 - render 3d text

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
995 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Link to this comment:

Share to:

Uploader Comments (thecplusplusguy)

  • @thecplusplusguy

    hey, my rpg game 2d made in SDL and c++>eats more and more RAM everytime i have it running

    it starts at like 6mb and after 1 min its ~60 MB ram used

    how should i optimize that game??

  • @devilazpl

    This not really connected to this tutorial.

    Probably you use dynamic memory allocation somewhere in the main loop (or one function/member function, which you call)

    If you don't use memory allocation with new or malloc (if so fix it), probably one class (like vector or string) could cause it. In that case check the size() of all vector and string, if one of them is continously increasing, check where you add something to it, and fix it. I can't say more without source.

see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • @devilazpl

    Id imagine it's a memory leak. Make sure to delete a pointer before you reassign it. Reading the others person's response to you, I'm guessing you have a pointer pointed to a new variable in a loop or something, so it keeps using more memory

    That;s just my guess

    

  • @thecplusplusguy

    hello, the problem was with texts displaying on the screen,

    i didnt use SDL_FreeSurface() after writing something thats the reason :D

  • @thecplusplusguy

    yeh i did thanks for help ill try fix this

  • Hi.

    You have little typo in your program: std::cout << "Nor oepened" << std::endl;

    It should be: std::cout << "Not opened" << std::endl;

    But thank you very much for new 3 videos, i really enjoy them. You are a good teacher.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more