Jump to content
  • Advertisement
Sign in to follow this  

Create multiple 3d model object at derived class

This topic is 3620 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!