I have a 32 bit bmp genereated with Code Heads Bitmap Font Generator that I got a copy through learnopengl’s website. I have enabled blending with glEnable(GL_BLEND). I have some corresponding python:
def loadTexture(self,filename):
self.texture = glGenTextures(1)
glBindTexture(GL_TEXTURE_2D, self.texture)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
img = LOAD_IMAGE(filename)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.width, img.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.tobytes())
glGenerateMipmap(GL_TEXTURE_2D)
img.close()
it is using python pillow to load the image so far. The code is working for other bmp’s the trouble with accecss violation reading starts when I load the 32 bit bmp with filename ‘ExportedFont.bmp’. Is there a way to get glTexImage2D to process the 32 bit bmp?