Help with png & tga textures... =/ its all so blue


I have tried to write a texture loader that loads PNG and TGA images into an opengl texture, the TGA loader failed and i thought my code was doin it wrong, but then i tried to write a PNG loader, and it came with the same annoying result:
A blue quad with no texture, =/

I would REALLY be glad if someone would check my code and see if it is something obvious thats missing. <-- where the loader is, this is where the magic happens <- the main opengl funcs are located here.

You should enable texturing outside of the begin/end section. It’s actually not allowed to be in that section. I would just move them outside the section for now. The quad is blue because that’s the current color when you draw it. Immediately before rendering the quad, set the color to white, so you can see the texture.

tnx ^^ moving the load() to initRendering solved it ^ ^ tnx.