Initial Install Question

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Initial Install Question

      So I got everything to compile except for about 112 errors in:

      DXUTMisc.h

      Where is it trying to use the max() definition but it is not defined in the namespace. I am not sure what the best course of action here is. I could try including <windows.h> or probably even math.h but that is going to cause a problem with NxMath.h... Any ideas?
    • RE: Initial Install Question

      Here's what datniel did - in DXUTMisc.h, replace min and max with

      Source Code

      1. #define tmax(a,b) (((a) > (b)) ? (a) : (b))
      2. #define tmin(a,b) (((a) < (b)) ? (a) : (b))


      That should get rid of the compiler error
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Actually I got another question. The Novodex 2.2 physics source doesnt come with the NxFoundation.dll, lib, cpp or h files. As far as I can tell its not there any more. Oddly though the documentation still calls for it and my last 7 compile errors are all in the Physics.cpp code.

      1) Physics.cpp(611): error C2259: 'NxMaterial' : cannot instantiate abstract class

      2) Physics.cpp(611): error C2248: 'NxMaterial::NxMaterial' : cannot access protected member declared in class 'NxMaterial'

      3) Physics.cpp(611): error C2248: 'NxMaterial::~NxMaterial' : cannot access protected member declared in class 'NxMaterial'

      4) Physics.cpp(612): error C2039: 'setToDefault' : is not a member of 'NxMaterial'

      5) Physics.cpp(611): error C2039: 'setMaterialAtIndex' : is not a member of 'NxPhysicsSDK'

      6) Physics.cpp(886): error C2664: 'NxPhysicsSDK::createTriangleMesh' : cannot convert parameter 1 from 'NxTriangleMeshDesc' to 'const NxStream &'
      Reason: cannot convert from 'NxTriangleMeshDesc' to 'const NxStream'
      No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

      I hate to be the annoying new guy here but I have done extensive search's through the source for Novodex, and I have resolved many other problems where the code now protects its private members properly so I updated code to use the setters instead of directly accessing things but these last few issues are things I just cant track down and am not familiar with the SDK enough to start tearing apart.

      Any help would be greatly appreciated.
    • ssiva posted :
      OK so I bought this book and I like it, but it took some effort to get the examples to work. Here is what I did. It now compiles and runs.

      1. Copy NxFoundation.dll and NxPhysics.dll to GameCode2\Bin (as opposed to the .lib files mentioned in the readme).

      2. Added the code "using namespace std;" to line 12 in file DXUTMisc.h

      3. Changed line 562 in Physics.cpp to BoxDesc.shapeFlags |= NX_TRIGGER_ON_ENTER | NX_TRIGGER_ON_LEAVE


      And as for Novodex 2.2, download the docs - there is a section on porting from 2.1 to 2.2 that should answer all questions....
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."
    • Novodex 2.2 requires quite a few mods.

      Here's my attempt to make it work, and it will be included in the next publication of the source code.

      There's also a #define in here to completely disable physics entirely, for those that don't want to bother.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • I searched the Novodex files for the min/max macros to see why they want you to disable their definition. They actually have their own MAX/MIN that are #defined just as the min/max are. THey also have Min/Max template functions. I could find no use of min/max in Novodex at all.

      So, I removed the //#define NOMINMAX
      statment so that the windows defines would work, and went into the Novodex header file that spits out the error message stating you should have the NOMINMAX set, and added "#undef min" and "#undef max" to it to make Novodex happy.

      That solved that problem.