## Integrate Newton Physics

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

### Integrate Newton Physics

Hi I'm creating a game similar to UNO STACKO. I've prepared all my objects (UNO blocks) and skybox. My problem is how can I use Newton to give all my objects their own mass and collision? Or do I have to use Newton to create new objects with their mass? If my question if possible, can u please provide a simple code for it. I'm new to physics for programming btw. Tnx!

Apps I'm using
------------------------
VC++ 2008 Express
Dark GDK
DirectX SDK Aug2007
bluekeezz

Posts: 2
Joined: Sat Dec 06, 2008 4:02 am

### Re: Integrate Newton Physics

Have you checked how the code for newton demos works? you have to create a newton body, which is a physical model representation for each of your game bodies / models that you want to have physical simulation applies to.
Help improving the Newton Game Dynamics WIKI

JernejL

Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

### Re: Integrate Newton Physics

The problem is i cant get newton sdk to integrate into my code. I'm trying to run the sample (Getting started), but an error appear. My compiler is looking for GLAUX.lib file. By the way Im using Vista Home Premium. Here's the OUTPUT BUILD i got.

Code: Select all
`1>------ Build started: Project: Tutorial_01_GettingStarted, Configuration: Debug Win32 ------1>Compiling...1>dBaseHierarchy.cpp1>dChunkParsel.cpp1>dCRC.cpp1>dGeometry.cpp1>dMatrix.cpp1>dQuaternion.cpp1>dSceneNode.cpp1>dTree.cpp1>HiResTimer.cpp1>OpenGlUtil.cpp1>RenderPrimitive.cpp1>tutorial.cpp1>Generating Code...1>Compiling manifest to resources...1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.11>Copyright (C) Microsoft Corporation.  All rights reserved.1>Linking...1>LINK : fatal error LNK1104: cannot open file 'GLAUX.LIB'1>Creating browse information file...1>Microsoft Browse Information Maintenance Utility Version 9.00.307291>Copyright (C) Microsoft Corporation. All rights reserved.1>Build log was saved at "file://C:\Program Files\NewtonSDK\samples\tutorial_01_GettingStarted\Debug\BuildLog.htm"1>Tutorial_01_GettingStarted - 1 error(s), 0 warning(s)========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========`

here are the LINKS I've done so you can check if I got it wrong.

include files
-----------------------------------
c:\program files\NewtonSDK\sdk
c:\program files\NewtonSDK\samples\toolbox
c:\program files\NewtonSDK\samples\common

library files
--------------------------------------
c:\program files\NewtonSDK\sdk\dll
bluekeezz

Posts: 2
Joined: Sat Dec 06, 2008 4:02 am

### Re: Integrate Newton Physics

send me a pm the new sdk do not uses the GLAUX library
Julio Jerez
Moderator

Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

### Re: Integrate Newton Physics

That is interesting, because the samples that come with the new SDK use the GLAUX.LIB. I just tried to compile the first sample in the new SDK and it gives me the same error. Have the samples not been updated in the new SDK?
sharp911

Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm

### Re: Integrate Newton Physics

sharp911 wrote:That is interesting, because the samples that come with the new SDK use the GLAUX.LIB. I just tried to compile the first sample in the new SDK and it gives me the same error. Have the samples not been updated in the new SDK?

Help improving the Newton Game Dynamics WIKI

JernejL

Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

### Re: Integrate Newton Physics

I downloaded the SDK yesterday, and julio hasnt sent me anything. Im not the original poster. Just have the same issue
sharp911

Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm

### Re: Integrate Newton Physics

Oh, my mistake, the SDK on website still imports glaux lib, but it doesn't use it, you can remove reference to glaux.lib. newton 2.0 sdk no longer has that reference, it's an error.
Help improving the Newton Game Dynamics WIKI

JernejL

Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

### Re: Integrate Newton Physics

Ok, Ive tried to look for the reference to the glaux library and I cant find it. Or is it possible to get the updated files anywhere?

Needless to say that Im new to Newton. Ive done programming before, and have tried Newton but never got it to compile property, and usually given up before trying to get help. But now Im trying to get it to work.

First off, I just want it to compile the samples properly, before I go back to my project.
sharp911

Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm

### Re: Integrate Newton Physics

it is an option in the link properties.
Julio Jerez
Moderator

Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

### Re: Integrate Newton Physics

Thanks, I got the glaux library off the link list, and I can compile all the samples except the Simple Vehicle sample. Not sure if this is related or not. Here is the error:

Code: Select all
`'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\Program Files\NewtonSDK\samples\bin\Tutorial_09_SimpleVehicle.exe', Symbols loaded.'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\Program Files\NewtonSDK\samples\bin\Newton.dll', Binary was not built with debug information.'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\Program Files\NewtonSDK\samples\bin\Glut32.dll', Binary was not built with debug information.'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\user32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\winmm.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\secur32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\glu32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\imm32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\msctf.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\version.dll''Tutorial_09_SimpleVehicle.exe': Unloaded 'C:\WINDOWS\system32\version.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\ole32.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\atioglxx.dll''Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll''Tutorial_09_SimpleVehicle.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'The program '[1452] Tutorial_09_SimpleVehicle.exe: Native' has exited with code 3 (0x3).`
sharp911

Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm