• Advertisement
Sign in to follow this  

Create multiple 3d model object at derived class

This topic is 3506 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I try to create multiple object in XNA 2.0. I create LampManager class(derived from game1.cs and pass graphicdevice, content from game1.cs) and Lamp class and try to create multiple lamp(3D Model) object, because I don't want to put all the code in game1.cs. But When I move drawmd2model() function to LampManager or Lamp, the effectpass, verdexdeclaretion got error... throw null exception, ..."pass" same scope in parent error.... I want the Lamp class got their update and draw function and effect(draw at Lamp.cs). the LampManager (run the Lamp.Draw() and Lamp.Update())is to manage the Lamp class. In the game1 class(run the LampManager.Update()) Does anyone know how to do it ? And, is it the effect, shader and draw 3d model functions only can put in the game1.cs, other than the game1.cs it will get error ? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement