C++ SDL2, How to regularly update a renderered text? (ttf)
问题 So I've been practicing/making a quick game for the past 6 hours, then something stumped me. The game had an integer, Score, which would be added up with one every time an ammo hits an alien. int Score; stringstream sstr; sstr << Score; string str1 = sstr.str(); TTF_Font* Sans = NULL; Sans = TTF_OpenFont("Sans.ttf", 24); SDL_Color White = {255, 255, 255}; SDL_Surface* surfaceMessage = NULL; surfaceMessage = TTF_RenderText_Solid(Sans, str1.c_str(), White); SDL_Texture* Message = NULL; Message