mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-04 20:15:16 +00:00
OpenGL: Mipmaps for GFXGLCubemap. Fix compressed textures.
This commit is contained in:
parent
2f8f89d486
commit
c2c9cf4a2d
2 changed files with 35 additions and 14 deletions
|
|
@ -255,7 +255,11 @@ U8* GFXGLTextureObject::getTextureData( U32 mip )
|
|||
U8* data = new U8[dataSize];
|
||||
PRESERVE_TEXTURE(mBinding);
|
||||
glBindTexture(mBinding, mHandle);
|
||||
glGetTexImage(mBinding, mip, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], data);
|
||||
|
||||
if( isCompressedFormat(mFormat) )
|
||||
glGetCompressedTexImage( mBinding, mip, data );
|
||||
else
|
||||
glGetTexImage(mBinding, mip, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], data);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue