Jump to content
  • Advertisement
Sign in to follow this  
drarem

how do i define a loadmesh parameter?

This topic is 4636 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

param #7 I have tried: DWORD ... int (DWORD *)... int int * int ** dword * dword ** for variable g_dwNumMaterials. Why am I getting this error? here is the error message: e:\programming\dxtest_cpp\cpptest1\cpptest1\cpptest1.cpp(149): error C2664: 'D3DXLoadMeshFromXA' : cannot convert parameter 7 from 'INT *__w64 ' to 'DWORD *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast here is the call: if( FAILED( D3DXLoadMeshFromX( "Tiger.x", D3DXMESH_SYSTEMMEM, g_pd3dDevice, NULL, &pD3DXMtrlBuffer, NULL, &g_dwNumMaterials, &g_pMesh ) ) ) Thanks.

Share this post


Link to post
Share on other sites
Advertisement
How did you declare g_dwNumMaterials ?

it needs to be :

dword g_dwNumMaterils

and you should pass it to the function as you did : &g_dwNumMaterials ?

By the way, are you using Visual C++ 2005 ?

Share this post


Link to post
Share on other sites
I'm using VS 2003 and that was right, but I had to capitalize DWORD.

Now it's unable to link to LoadMeshFromX()... is that because it is a dll and it's in 'debug' status still?

How can all those free online tutorials assume you know that or know how to link to them?

Did I answer my own question?

I did download the betas, I tried C#, it's not as bad as I thought after I tried a couple of examples - I went back to C++ when I learned there was a beta C++. The only downfall is they are ticking timebombs - not all the code is guaranteed to work after the vs 2005 release. Just like their so-called backwards compatibility stuff. Then I have to dish out more money for upgrades, like from vs2003 to vs2005.


Thanks again.

Share this post


Link to post
Share on other sites
and the VC++ beta2 gives me this error:

1>c:\documents and settings\owner4\my documents\visual studio 2005\projects\vcpp_beta2\vcpp_beta2\vcpp_beta2.cpp(1) : fatal error C1083: Cannot open precompiled header file: 'Debug\vcpp_beta2.pch': No such file or directory


when I tried to install the SDK (OCT 2005 update) it gives me some message box about missing something from the F:\ drive and quits - maybe because I had an F: drive a month ago, then I switched it out for a bigger drive which is now the E: drive.

AAAHhhhhhrghhh!!! Maybe I just need to reformat my puter and start over.

Share this post


Link to post
Share on other sites
Quote:
Original post by drarem
I'm using VS 2003 and that was right, but I had to capitalize DWORD.

Now it's unable to link to LoadMeshFromX()... is that because it is a dll and it's in 'debug' status still?



You need to add the SDK\Lib directory to your library project settings for the VS2003 to find the proper libraries. (It doesn't, so thats why you get this link error)

Never used VS2003 but I'm sure its not much of a problem to find how to add lib directories to your project.

Share this post


Link to post
Share on other sites
no, I do have the e:\dxsdk\Lib folder added to the linker project. I did a search for LoadMesh in the lib folder, it didn't find it within any of the .lib files.

I did grab the August 2005 sdk and installed it, but i'm having trouble installing the oct 2005 update. Looks like it needs something from my missing F:\ drive - and I did add/remove the previous directx sdk on it.

Share this post


Link to post
Share on other sites
Even though they're called "updates" each SDK is complete in and of itself. That means that if you want to use the October SDK, there is no need to install the August SDK. If you take a look at the readme file, it will say that you should completely uninstall older SDK's before installing a newer one.

Granted, there are people that have gotten things to work while running multiple SDK's but if you don't have a specific need to do this, it will make your life simpler if you just install one.

When you install the SDK and tell it to install the Extensions for Visual Studio, it will set up all the paths to the libraries you need.

neneboricua

Share this post


Link to post
Share on other sites
I've uninstalled the sdk and re-downloaded the OCT 2005 sdk, trying to run the setup.exe afterwards. It gives me this:

Error 1327.Invalid drive:F:
Prob due to fact before I had both an E and F partitioned drive in my setup, then I went to a larger E: drive. Do I need to create a small F: partition on my drive? How do I do it?

When I browse it, it doesn't look compacted - what's the reason for running setup?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!