Horde3D

Next-Generation Graphics Engine
It is currently 29.04.2024, 13:16

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 24.04.2008, 21:29 
Offline

Joined: 24.04.2008, 21:19
Posts: 2
If a scene file contains lights, their color attributes won't be loaded.

In egLight.cpp LightNode::parsingFunc:
Code:
itr = attribs.find( "col_r" );
if( itr != attribs.end() ) lightTpl->col_R = (float)atof( itr->second.c_str() );
itr = attribs.find( "col_r" );
if( itr != attribs.end() ) lightTpl->col_G = (float)atof( itr->second.c_str() );
itr = attribs.find( "col_r" );
if( itr != attribs.end() ) lightTpl->col_B = (float)atof( itr->second.c_str() );

Should be:
Code:
itr = attribs.find( "col_R" );
if( itr != attribs.end() ) lightTpl->col_R = (float)atof( itr->second.c_str() );
itr = attribs.find( "col_G" );
if( itr != attribs.end() ) lightTpl->col_G = (float)atof( itr->second.c_str() );
itr = attribs.find( "col_B" );
if( itr != attribs.end() ) lightTpl->col_B = (float)atof( itr->second.c_str() );


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2008, 01:29 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Nice find, that could of been an annoyance.


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2008, 06:11 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks for pointing this out,... I fixed it in the trunk version


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2008, 07:49 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
Hum strange... i used colored lights inside the editor with no problems at all :?


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2008, 08:02 
Offline

Joined: 24.04.2008, 21:19
Posts: 2
DDd wrote:
Hum strange... i used colored lights inside the editor with no problems at all :?


That's exactly how I found the bug.
I created a scene in the editor with colored light and when I loaded the scene in my application, the light became white. :)


Top
 Profile  
Reply with quote  
PostPosted: 25.04.2008, 08:50 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
The editor parses the nodes itself that's why you didn't noticed the bug in the editor


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

All times are UTC + 1 hour


Who is online

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