Anyone ever had any issues with this?
I recently added SDL_TTF to a project I'm working on and rather oddly the text string flashes from the colour I define to black but only when it's overlayed on a sprite. When I just render it to an SDL render screen it seems fine.
What's going on? :/
EDIT: TTF_RenderText_Solid() produces the same results except it's obvious now it's not flading completely to black, it's just going to approximately half it's alpha. I also tested by overlapping the text half on and half off a sprite. As predicted, the half of the text on the sprite continue flashing.
I recently added SDL_TTF to a project I'm working on and rather oddly the text string flashes from the colour I define to black but only when it's overlayed on a sprite. When I just render it to an SDL render screen it seems fine.
Code:
SDL_Color foregroundColor = { 255, 0, 0 };
SDL_Surface* textSurface = TTF_RenderText_Blended(m_font, m_string, foregroundColor);
SDL_Rect textLocation = { pos.x, pos.y, 0, 0 };
SDL_BlitSurface(textSurface, NULL, screen, &textLocation);
SDL_FreeSurface(textSurface);
What's going on? :/
EDIT: TTF_RenderText_Solid() produces the same results except it's obvious now it's not flading completely to black, it's just going to approximately half it's alpha. I also tested by overlapping the text half on and half off a sprite. As predicted, the half of the text on the sprite continue flashing.