Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I get the following error when i converted my vb6 directx app to vb.NET any one ever seen this, if so how did you fix it. going to directX 9 is not an option.

 

'D3DXMATH_MATRIX' is not a member of 'DxVBLibA'.

  • 5 weeks later...
Posted

Since no one else answered...

 

I got this today just after lunch. Three hours later, I finally found the answer at msdn.microsoft.com: you're up the creek. Going to DX9, even if it were an option, wouldn't fix the problem either: the only solution is to go back to VB6.

 

Technical answer: in .NET, COM objects only expose the methods in classes. Methods that are in modules are not allowed in .NET. (Interestingly, MS uses DirectX as an example of this "rare occurrence.") MS suggests you find whatever tool in .NET that allows the same functionality.

 

Well, I guess all the time I spent learning DX is out the window, and I have to start learning GDI+. Which doesn't have 3D. What fun.

 

R

  • *Experts*
Posted

What exactly are you trying to do with a Matrix? The Matrix object has numerous static methods for doing what the old Module used to do, such as Translate, Scale, LookAtLH, RotationQuaternion and more.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

>What exactly are you trying to do with a Matrix? The Matrix object

>has numerous static methods for doing what the old Module used to

>do, such as Translate, Scale, LookAtLH, RotationQuaternion and

>more.

 

So very nice of Microsoft's documentation to mention that. I'll dig into it....

 

R

Posted

Heh... The documentation on Managed Dx is downright painful. Most of it (if it exists) appears to be written by a summer student. :P

 

I particularly enjoyed example code commented with phrases like "get rid of this crap" and "blow out of here". Good work with the QC there, MS.

zig?
  • *Experts*
Posted

Well they get it at both ends. Everyone wanted DX9 "NOW!", but others complain that it wasn't documented well enough. It's a shame they couldn't wait for some better docs as that's what most people seem to be focusing on (since it's hard to figure anything out if you're not used to DX8 or prior and not willing to look at the C++ documentation).

 

Many of the DX9 objects have static methods and/or properties. You can browse them in the object browser or just type Matrix. and look through the intellisense.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

I _am_ looking at the C++ documentation... chuckle. (I'm new to VB, but C++, that I've been doing for over a decade.)

 

So I dug up Matrix-- interesting that it's in system.drawing.2d. I wondered why there wasn't a system.drawing.3d. Anyway, we have IsIdentity(), but I don't see a matching identity setter. The first line it chokes on is the basic

 

DxVBLibA.D3DMATH_MATRIX.D3DXMatrixIdentity(matWorld)

 

I can kludge RotateY, and of course Multiply is there (so is LookAtLH? Where?), but the next command down I can't fathom from playing in the Object Browser is

 

DxVBLibA.D3DXMATH_MATRIX.D3DXMatrixPerspectiveFovLH(add long string of parameters)

 

I guess the question to be asked, sort of referenced above, is: IS there a relatively simple way (and I do consider just going through the code and changing everything-- as long as there's some sort of one-to-one translation-- "relatively simple") to pull all the DX stuff that .NET doesn't like into .NET? Or, a related question: how much farther beyond that can I go? I'm guessing there's still going to be some COM in here, but if you take the basic spinning-cube program written in VB6/DirectX 8 (or 9), what percentage of the DX COM code can now be written natively in .NET? As an estimate of course.

 

And the most important question, is there a book/webpage/resource/tutorial that documents it all?

 

Sorry, got a bit long-winded there, all I was going to do was ask about MatrixIdentity...

 

R

Posted

And, though I'm sure it's obvious, most of what you want is in the Microsoft.DirectX.Direct3D namespace.

 

I haven't seen any simple standard Dx9 code that couldn't be written using managed Dx yet. Sometimes it's a pain in the arse (as the standard Dx way of doing things does not always have a direct equivalent in MDX). But even things like swap chains (which we found to be an interesting experience in Midget3D) can be done easily in MDX once you figure out how.

 

You mentioned the "basic cube spinning example". If you haven't been there yet, have a look at http://www.directx4vb.com/. Jack's tutorial takes you right through building a cube-spinning demo. :)

zig?

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...