Horde3D
http://horde3d.org/forums/

inaccurate calcTextureSize
http://horde3d.org/forums/viewtopic.php?f=3&t=1505
Page 1 of 1

Author:  Rauy [ 17.04.2011, 23:52 ]
Post subject:  inaccurate calcTextureSize

I don't know, if calcTextureSize is just used for memory statistics, which need not (and cannot) be too accurate but I think the computation for the DXT compressed sizes should replace
Code:
... std::max( width / 4, 1 ) * std::max( height / 4, 1 ) ...

with
Code:
... ( (width+3) / 4 ) * ( (height+3) / 4 ) ...

as I think the DXT formats should round up, to not loose information. If it is loaded from file it should always fit, but perhaps Horde3D sometime in the future supports compression on the fly (which OpenGL imo does when using glTexImage2D on compressed textures).

Author:  marciano [ 25.04.2011, 17:41 ]
Post subject:  Re: inaccurate calcTextureSize

Which case exactly do you think might be problematic? NPOT textures that are not a multiple of 4 in either dimension?

Author:  Rauy [ 25.04.2011, 18:58 ]
Post subject:  Re: inaccurate calcTextureSize

Yes, that's what I mean. This only happens, when you load an uncompressed image into a compressed texture, which is not supported by Horde at the moment, I think.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/