Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!

Posted

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.

Posted

The second one is sorted by passing the handle of the picturebox when creating the device.

 

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

 

works for me:)

My website

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...