Horde3D

Next-Generation Graphics Engine
It is currently 21.11.2024, 19:31

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 17.04.2011, 23:52 
Offline

Joined: 11.09.2010, 20:21
Posts: 44
Location: Germany
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).


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2011, 17:41 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Which case exactly do you think might be problematic? NPOT textures that are not a multiple of 4 in either dimension?


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2011, 18:58 
Offline

Joined: 11.09.2010, 20:21
Posts: 44
Location: Germany
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group