openglsuperbible / sb7code

Source code and supporting material for the 7th Edition of OpenGL SuperBible
727 stars 251 forks source link

flare.ktx broken #44

Open Rotwang opened 4 years ago

Rotwang commented 4 years ago

Hi, the mirrorclampedge example results in black screen. I tracked down the reason down to the flare.ktx being most likely broken. The problem being:

---------------
GL_INVALID_ENUM in glTexStorage2D(internalformat = GL_RGB)
Message ID: 5
Source: API
Type: Error
Severity: high
---------------
GL_INVALID_OPERATION in glTexSubImage2D(invalid texture level 0)
Message ID: 5
Source: API
Type: Error
Severity: high
---------------
GL_INVALID_OPERATION in glGenerateMipmap(zero size base image)
Message ID: 5
Source: API
Type: Error
Severity: high

ktxinfo utility says the following:

> ktxinfo flare.ktx 
Header

�KTX 11�


endianness: 0x4030201
glType: 0x1401
glTypeSize: 1
glFormat: 0x1907
glInternalformat: 0x1907
glBaseInternalformat: 0x1907
pixelWidth: 512
pixelHeight: 512
pixelDepth: 0
numberOfArrayElements: 0
numberOfFaces: 0
numberOfMipLevels: 1
bytesOfKeyValueData: 0
The KTX 1 file pHeader is invalid:
  it has invalid data such as bad glTypSize, improper dimensions,
improper number of faces or too many levels.

Do you have working version of flare.ktx?

feishengfei commented 1 year ago

the ktxinfo actually will report every ktx file under media/textures/ as:

it has invalid data such as bad glTypeSize, improper dimensions,
improper number of faces or too many levels

BTW, my mirrorclampedge show black too.

md5sum of flare.ktx 30befb5e2b0ba16a5087d953a495cf98 ./bin/media/textures/flare.ktx