C ++ OpenGL texture mapping

I read about this, including Nehe, and here for solutions, but I cannot find a specific answer.

I am trying to upload a photo called stars.jpg. I want to make this my scene background by matching it using uv coordinates, doing it with

glBegin(GL_QUADS);
glTexCoord2f(0,0);
glVertex2f(0,0);

However, I'm just very confused about how to load the actual textures, all the calls for

glActiveTexture();
glEnable(GL_TEXTURE_2d);
glBindTexture(GL_TEXTURE);

Everything that they do confuse me, what does it all mean / do, and in what order, I suppose, to insert them, to get stars.jpg, to be my background?

+5
source share
2 answers

Here's a step-by-step guide to loading textures
http://www.nullterminator.net/gltexture.html

, OpenGL - , " ", glActiveTexture();.

, .jpg() , , .jpg , .ppm .bmp, .

+3

OpenGL - Simple OpenGL Image Loader (SOIL) . , .

, OpenGL - google specs, .

+4

All Articles