Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've implemented a Game class in a WPF app. It works and the animation renders.

I have task to implement another several Controls with SharpDX in the same application window. Each new Game object takes a lot of memory (about 25MB each).

How can I save memory when creating over a dozen controls rendering different animations in SharpDX?


I thought about creating one Game object and share it between different controls. However, each control contains another animation. Adding new control I tried two things:

  • create new SharpDXElement for each control, then call Game.Switch(dxElement);
  • create one SharpDXElement for each control

Both failed: Only one control displays. The rest are invisible.

I also tried quickly switching the dxElement, but that caused blinking.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.