Ok . Here we go:
In the LoadGLTextures() function delete all the glGenTextures..... and place :
glGenTextures(5, VarPtr Texture[0])
just after you load in all the textures.
Then in the render loop you need to do this:
(pseudo code)
glBindTexture texture0
glBegin(GL_QUADS)
....
....
glEnd
glBindTexture texture1
glBegin(GL_QUADS)
....
....
glEnd
(until last texture)
You need to change the texture BEFORE you begin to draw the quads that are going to use that texture. Then change the texture again and draw some more quads and so on....
I'm sure this helps as it sure is helping me to understand OpenGL. I've always tried to learn DirectX on and off over time and never really got that far at all. In fact I've got further in the last 2 days with OpenGL than I ever got with DX!!
Have fun.
[*******EDITED*******]
ps. I used jpegs as I haven't any png's to hand!!!!
In the LoadGLTextures() function delete all the glGenTextures..... and place :
glGenTextures(5, VarPtr Texture[0])
just after you load in all the textures.
Then in the render loop you need to do this:
(pseudo code)
glBindTexture texture0
glBegin(GL_QUADS)
....
....
glEnd
glBindTexture texture1
glBegin(GL_QUADS)
....
....
glEnd
(until last texture)
You need to change the texture BEFORE you begin to draw the quads that are going to use that texture. Then change the texture again and draw some more quads and so on....
I'm sure this helps as it sure is helping me to understand OpenGL. I've always tried to learn DirectX on and off over time and never really got that far at all. In fact I've got further in the last 2 days with OpenGL than I ever got with DX!!
Have fun.
[*******EDITED*******]
ps. I used jpegs as I haven't any png's to hand!!!!