Skip to main content
added 30 characters in body
Source Link
House
  • 73.3k
  • 17
  • 185
  • 273

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.

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.

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.

Source Link

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.