Try setting the texture's minification filter to GL_NEAREST or GL_LINEAR after glTexImage2D(): glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); The OpenGL default is to use mipmaps and you didn't send any which makes the texture incomplete and will disable that texture image unit. Then you can use texture(vertexTexture, vTexCoords) inside the shader instead of the deprecated texture2DLOD() version with the explicit LOD access.
Qingsong
- 61
- 5