Mesh and device question-desperate LOL

Glenn5150

Newcomer
Joined
Dec 28, 2003
Messages
2
I have two major beefs with any tutorials/help that I've ever been able to find on the net, maybe someone with vastly more experience can help!

I have several .x meshes that I've created, and wish to place them in a single scene. I can put them in and have them work individually (using the code in the DirectX SDK Tutorial #6), but nowhere can I find a way to actually move each mesh away from the center of the scene and change its orientation (a-la Matrix math, since a mesh isn't a matrix), and all the World Transforms do is rotate around and move the camera, etc. Can someone tell me what I'm missing here? (I'm a VB5 convert using VB.NET, managed DX, and total newbie on DirectX)

Second beef - I also cannot find a WORKING example of simply assigning the render target to a PictureBox - using the .Handle property of it invariably tells me that I have a "null" render target specified.

Thank you all in advance for your help!
 
OK got the first one figured out - have to perform a "World transformation-draw subsets" sequence for EACH mesh to be rendered, then the view and projection matrices after. Nothing in the sparse documentation, nor in the tutorials, tells you this.

Still trying to figure out how to successfully render to a picture box.
 
The second one is sorted by passing the handle of the picturebox when creating the device.

Visual Basic:
m_obj3DDevice = New Device(intAdapter, DeviceType.Hardware, Me.PictureBox1.Handle, CreateFlags.SoftwareVertexProcessing, m_objPresentationParameters)

works for me:)
 
Back
Top