any Idea how I could have the follow code output text with a transparent background?
SDL_Color co = {tp->col.r, tp->col.g, tp->col.b,tp->col.a};
SDL_Color bco = {255, 0, 255,1};
ts = TTF_RenderText_Shaded(tp->font, text.c_str(),co,bco);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
TTF_RenderText_Shadeddoesn’t allow for transparent backgrounds (as it uses 8bit color), you want to useTTF_RenderText_Blended, see this.