Direct3D in a usercontrol

From: Chris Foster (chrisfoster_at_btinternet.com)
Date: 12/09/04


Date: 9 Dec 2004 01:49:21 -0800

I am new to Direct3D and I am wanting to use it within a usercontrol.
I have tried the following two methods.

Scenario (1)
--------
The usercontrol takes a device in an Initialise method. The control
is on an MDI child. I am creating a device within the MDI parent and
passing it through to control.

Problem (1)
-------
I am getting very poor quality rendering which is noticeable when I am
using LineStrip. Parts of the lines are missing and disappear
completely.

Scenario (2)
--------
The usercontrol creates a device within it's constructor.

Problem (2)
-------
This is a neater solution and renders fine. I have read posts that
state devices should NOT be created for each MDI child. Also if
multiple controls are to be used to display the same data, would I
have to duplicate the vertex buffers?

Chris