Try setting the texture's minification filter to GL_NEARESTGL_NEAREST
or GL_LINEARGL_LINEAR
after glTexImage2D()glTexImage2D()
:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
The
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
Then you can use texture(vertexTexture, vTexCoords) texture(vertexTexture, vTexCoords)
inside the shader instead of the deprecated texture2DLOD()texture2DLOD()
version with the explicit LOD access.