I really hope someone can help with this because I have been stuck with this,what could be simple problem, for days.
I am fairly new to c++ ,completely self taught and only 14 so I've probably made some bad errors. I wan't to be able to load lots of different PNG textures like this.

However this just displays a white rectangle. Any help would be much appreciated as it would be very nice to get this problem out of the way. feel free too ask for more code if needs be.

thanks Rowan.

menzel

03-03-2012, 04:42 PM

Hello,

try setting glEnable(GL_TEXTURE_2D); in your loadPNG function before you set up your texture. Try texturing without blending first. You don't need to set the filter parameters in your Draw_Texture function if it was already done at image loading time. Why do you call Draw_Texture(48,*Player_Current_Texture); (is Player_Current_Texture a GLint* ?).

I assume you use the fixed function pipeline from OpenGL 2 and the quads are visible (so you see white quads and not the whole screen stays white)?

Fezziwig

03-04-2012, 01:20 AM

Thanks for your reply.
*Player_Current_Texture is a GLint* but for the purpose of testing I have now changed that to Vietcong_Texture, and the quad is drawn. I have tried the three things you suggested but without success. I would imagine it would be somthing wrong with this line: