XNA Game Development Forums
2012/05/22 14:04:26 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: find a error...  (Read 1425 times)
longray
Newbie
*
Offline Offline

Posts: 1


View Profile
« on: 2006/12/29 11:19:38 »

有一个错误... 当我渲染多个模型的时候,我发现我赋予模型的Shader出现了问题!
最后找到了原因:

I find a error... i set some unlike shades to these models when render three models。
take 2 hour... I changed two lines code ,that's ok。
在 HMObject.cs
   
        if(this is IHMChildRenderer) ((IHMChildRenderer)this).RenderChildren(myDevice);
        if(this is IHMHasMaterial) ((IHMHasMaterial)this).SetMaterialProperties();
改为

        if(this is IHMHasMaterial) ((IHMHasMaterial)this).SetMaterialProperties();
        if(this is IHMChildRenderer) ((IHMChildRenderer)this).RenderChildren(myDevice);
       
sorry for my English Sad
Logged
mikeschuld
Administrator
Sr. Member
*****
Offline Offline

Posts: 389


View Profile WWW
« Reply #1 on: 2006/12/29 18:26:10 »

That is ok, this actually solves a problem I was wondering about but haven't had time to look for. Thanks for the post. I will go edit my code now Wink

Everyone I suggest making sure you made this change (I actually moved the IHMHasMaterial call all the way to the top of the Draw() function to precede all other rendering code)
« Last Edit: 2007/01/07 01:39:53 by mikeschuld » Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
XNA Direct3D Error General Discussion alucard_deathy 1 1847 Last post 2007/08/15 19:48:56
by mikeschuld
Please can someone tell me where to find? General Discussion Spa8nky 1 1579 Last post 2009/11/05 11:43:28
by mikeschuld
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.161 seconds with 18 queries.