Hello, I am just starting to program with SDL and OpenGL and I have run into a few problems that I cant figure out.
(most have my code has been copied from various tutorials)
-First off, I have a method that draws a basic white square. I set the color to white before I define the verticies, which on its own draws the correct color but when it is with an image, the square becomes the background color(most dominant?) of the last image drawn
-Second, I am having trouble appliying transparency to an Image. I have tried making the background dirrectly transparent with an image editing program, and also by using a color key but neither seem to work with OpenGL…
As you can see from the images above neither ship has transparency, but using the same code with just SDL the black background is removed.
Thanks for the help, sorry if these are really basic problems
For your first problem, don’t use GL_MODULATE environment color when creating your texture, use GL_REPLACE instead. Or just glColor3f (1,1,1) before drawing a textured object.