Jump to content

Texture::getImage() Bug


photo

Recommended Posts

Problem

 

Texture::getImage() implementation fails in DX9 both for uncompressed+compressed textures, while in OpenGL it only fails for compressed textures. See attached test case based on UNIGINE demo terrain data. Texture::getImage() calls will be triggered within update() by terrain.getSurfaceMaskTextureImage(). Based on this use case.

 

post-82-0-83385700-1305153166_thumb.jpgpost-82-0-47207400-1305152592_thumb.jpg

getImageBug.zip

Link to comment
  • 4 weeks later...
  • 1 month later...

It's not possible to read back compressed textures under OpenGL.

It was a bug in D3D9Texture::getImage() function. The problem has fixed.

I can't recommend to use getImage() functions. This functions copies data from video to system memory. The bandwidth of such copying is very low on x86 architecture. It's much better to load image from the corresponding file.

Link to comment
×
×
  • Create New...