Simple code for generating mipmap levels, plus some debug info:
Program log records this:
Loading texture "D:\Projects\engine\Textures\ldd\walls\sidewalk1.stf"...
Mipmap 0 ( 512 x 512 ) ( 786432 )
Mipmap 1 ( 256 x 256 ) ( 196608 )
A crash occurs when I attempt to set the second mipmap level. All the data seems in correct order. The formats are both GL_RGB.
I have no idea what is wrong. This is very simple, and should not be crashing.
For buffer:tbank=EachIn mipmaps programlog "Mipmap "+n+" ( "+mw+" x "+mh+" )"+" ( "+buffer.size()+" )" glTexImage2D GL_TEXTURE_2D,n,glinternalformat,mw,mh,0,format,GL_UNSIGNED_BYTE,BankBuf(buffer) n=n+1 mw=mw/2 mh=mh/2 Next
Program log records this:
Loading texture "D:\Projects\engine\Textures\ldd\walls\sidewalk1.stf"...
Mipmap 0 ( 512 x 512 ) ( 786432 )
Mipmap 1 ( 256 x 256 ) ( 196608 )
A crash occurs when I attempt to set the second mipmap level. All the data seems in correct order. The formats are both GL_RGB.
I have no idea what is wrong. This is very simple, and should not be crashing.