I've never used OpenGL and I'm not that good at the other things I've used in the 3D world. But basically the way programming works in 3D is that you give render instructions to the graphics card. If I interpret your code it's saying

**glBindTexture(GL_TEXTURE_2D, gl_image);**

-- I'm going to use this texture

**glBegin(GL_QUADS);**


I'm going to draw quads to the screen. A quad is made up of 4 points and represents a flat surface, so it's going to process four points to draw a quad. So if you decalred 8 verticies(sp?) then it would make two quads.

**glTexCoord2f(0, 0); glVertex3f(-0.5, 0.5, 0);**


Use this texture coordinate and use this 3d world space coordinate. 

A texture coordinate maps a to a location on your texture. If you think of your texture as a rectangle and the top left is the coordinate 0.0 , 0.0 and the bottom right coordinate is 1.0 , 1.0 then any number between 0.0 and 1.0 along any axis will plot a space in the texture. Where 0 and 1 are depends on how OpenGL will interpret this data. it may be that 0,0 is the bottom left and 1,1 is the top right.

Think if the center of your screen (by default) as world space 0.0 , 0.0. When you say -0.5 , 0.5 then it is probably moving a little to the left and a little up to plot that first point (vertex) depending on how OpenGL declares it's coordinate system.

Since you do this four times, you are declaring where each point is going to draw in the world and what part of the texture it will use.

I found this image online:

![Vertex Exp][1]

I think this shows you how a texture coordinate is used by a quad. t0 is the first texture coordnate you declared on the texture (0,0 i'm assuming in the picture) and that point of the texture will be rendered

If you go into quad rendering then when you define four verticies, think of it as connecting a line between all four points and then rendering the texture in it based on where you said each vertex would be on the texture.


  [1]: https://i.sstatic.net/SS7eC.gif