Horde3D

Next-Generation Graphics Engine
It is currently 23.11.2024, 03:25

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 03.06.2009, 17:34 
Offline

Joined: 20.01.2008, 07:16
Posts: 15
There is a bug within the DDS loader for the Texture resource. When a non-square texture is used (something like 1024x512 will do it), during mipmap loading, the smaller dimension will be reduced to 0, causing OpenGL to throw an INVALID_OPERATION error. Below I have a small fix that prevents this problem.

In egTextures.cpp, line 326 replace:
Code:
pixels += mipSize;
width >>= 1;
height >>= 1;

with:
Code:
pixels += mipSize;
width >>= 1;
if(width < 1) width = 1;
height >>= 1;
if(height < 1) height = 1;


Top
 Profile  
Reply with quote  
PostPosted: 07.06.2009, 09:56 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks, this is fixed now.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 26 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