why I can't render more than one line with this code it's render only last line with loadtext() ,this is the code:
void Ltext::loadtext(const char* text, SDL_Color textColor,SDL_Renderer* gren)
{
free();
gFont = TTF_OpenFont("carson.ttf", 24);
SDL_SetRenderDrawColor(gren, 255,255,255,255);
SDL_RenderClear(gren);
int n;
//Render text surface
SDL_Surface* textSurface = TTF_RenderText_Solid(gFont, text, textColor);
if(textSurface != NULL)
{
//Create texture from surface pixels
mTexture = SDL_CreateTextureFromSurface(gren, textSurface);
if (mTexture == NULL)
{
printf("Unable to create texture from rendered text! SDL Error: %s\n", SDL_GetError());
}
//Get rid of old surface …