Opengl 3.3 load & display texture
Can anyone recommend a tutorial on loading and drawing textures that might include sample code in an OpenGL 3.3 core context?
Loading textures has not changed in GL3
http://www.opengl.org/wiki/Tutorials
Hmm I don't find the glTexEnv function in GL3
another thing I've noticed is glEnable(GL_TEXTURE_2D),
GL_TEXTURE_2D is no longer a valid enum
GL_TEXTURE_2D is no longer a valid enum
another thing I've noticed is glEnable(GL_TEXTURE_2D),
GL_TEXTURE_2D is no longer a valid enum
As no longer fixed function pipeline, the GL_TEXTURE_2D (and the others) flag is pointless.
glDisable(GL_TEXTURE_2D) = dont send to the shader.
another thing I've noticed is glEnable(GL_TEXTURE_2D),
GL_TEXTURE_2D is no longer a valid enum
'sk8beast' said:
another thing I've noticed is glEnable(GL_TEXTURE_2D),
GL_TEXTURE_2D is no longer a valid enum
As no longer fixed function pipeline, the GL_TEXTURE_2D (and the others) flag is pointless.
glDisable(GL_TEXTURE_2D) = dont send to the shader.
Just to clarify this quote, glEnable/glDisable(GL_TEXTURE_2D) has no effect on shader pipeline. When you have a sampler at location 0, it will always sample the texture bound to glActiveTexture(GL_TEXTURE0), regardless of the enabled state of GL_TEXTURE_2D.
O-o I need to post some code to remain sane...tell me if you see anything obviously wrong
Initialization functions
Loading Vbo & Texture
Drawing and shader source
Initialization functions
Loading Vbo & Texture
Drawing and shader source
If you post that inline with code tags or on codepad I'd consider taking a look at it, but I'm currently on a VPN which doesn't allow access to filesharing sites for security reasons. There's really no reason why you need to have people your download your files, just post the relevant parts.
Initialization functions
http://codepad.org/N6G4L0mO
Loading vbo & texture
http://codepad.org/txCRarG5
Drawing + shader source
http://codepad.org/78ylAPSm
http://codepad.org/N6G4L0mO
Loading vbo & texture
http://codepad.org/txCRarG5
Drawing + shader source
http://codepad.org/78ylAPSm
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement