Re: Official Pascal-Header (SDK 3.0)

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Official Pascal-Header (SDK 3.0)

Postby Stucuk » Sun Aug 26, 2012 6:40 pm

Below are Delphi/FreePascal headers for Newton Game Dynamics SDK 3.0:

User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Official Pascal-Header (SDK 3.0)

Postby Stucuk » Sun Aug 26, 2012 7:25 pm

Updated the Header to the latest version (2012/08/26, date is based on when i downloaded the latest newton SDK from the repository). The Serialise ID's were changed and NewtonUserMeshCollisionCollideDesc was updated.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Official Pascal-Header (SDK 3.0)

Postby Sascha Willems » Mon Aug 27, 2012 12:43 am

Well, I thought the newton.h included in the 300_core directory was the right one to base the 3.00 headers on. I guess this wasn't correct after all (afert using diff on mine and your headers). So as your are the correct ones I deleted my first post.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Re: Official Pascal-Header (SDK 3.0)

Postby Stucuk » Mon Aug 27, 2012 2:01 pm

Sascha Willems wrote:Well, I thought the newton.h included in the 300_core directory was the right one to base the 3.00 headers on.

If i remember correctly the directory structure was changed. coreLibrary_300\source\newton\ is the current directory structure (Well where to find newton.h). Note that the "Downloads" bit on Google Code Project are outdated, you have to download the repository if you want the latest version. Or you can just View Newton.h through Google Code's Browser Thing.

P.S I updated my posts. Feel Free to edit the first one any time you release a header.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Official Pascal-Header (SDK 3.0)

Postby armenha » Sun Sep 23, 2012 1:21 am

Dear Stucuk!
For version 1.01 boxes not collide.
Replacing newtonf.dll with 1.00 version newtonf.dll all ok!
Sorry for bad english!
armenha
 
Posts: 2
Joined: Sat Jun 30, 2012 2:33 am

Re: Official Pascal-Header (SDK 3.0)

Postby carli2 » Sun Sep 23, 2012 1:10 pm

armenha wrote:Dear Stucuk!
For version 1.01 boxes not collide.
Replacing newtonf.dll with 1.00 version newtonf.dll all ok!
Sorry for bad english!


You need set MaterialDefaultCollidable.
Newton has lot uninitialized data and bugs.
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Official Pascal-Header (SDK 3.0)

Postby Julio Jerez » Sun Sep 23, 2012 1:15 pm

were are thsoe uniliazed veriable? as far as I know there are zero uninitialized variables in the engine.

if you knwo of any please tell me so tha I can fix it.
Julio Jerez
Moderator
Moderator
 
Posts: 10973
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Official Pascal-Header (SDK 3.0)

Postby carli2 » Mon Sep 24, 2012 5:32 pm

Julio Jerez wrote:were are thsoe uniliazed veriable? as far as I know there are zero uninitialized variables in the engine.

if you knwo of any please tell me so tha I can fix it.


DefaultCollidable and the Friction thing.
But it could be a buffer (heap) overflow, too. That would explain a lot of side effects and crashes. Can you give me some background information about the allocator functions?
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Official Pascal-Header (SDK 3.0)

Postby Julio Jerez » Tue Sep 25, 2012 8:14 am

but what the memory allocation had to do with uninitilize variables?
I am confused.
Julio Jerez
Moderator
Moderator
 
Posts: 10973
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Official Pascal-Header (SDK 3.0)

Postby carli2 » Tue Sep 25, 2012 9:17 am

Julio Jerez wrote:but what the memory allocation had to do with uninitilize variables?
I am confused.


I'm linking the dynamic library to pascal code. afaik pascal has a other heap implementation so newton might be confused by the data structure of memory.

(btw the makefiles still don't work and I don't want to fix them every time you add or remove a file. you don't even apply the patches I send to you)
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Official Pascal-Header (SDK 3.0)

Postby Julio Jerez » Tue Sep 25, 2012 10:00 am

In the engine any application can set the memopry allocation rotine bu calling thsi function before any Newtopn world is created.
void NewtonSetMemorySystem (NewtonAllocMemory malloc, NewtonFreeMemory mfree);

all memory allocation and deallocation is done using those tow pointers.
When the application does no set memory allocatikon pointer, teh engien use malloc and free.
This is a funtionality that has being ther since newton 1.00

The patches when they are send to me I try to apply them but many time it fail to merge because they are not up todate with later SVN.
Julio Jerez
Moderator
Moderator
 
Posts: 10973
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Official Pascal-Header (SDK 3.0)

Postby carli2 » Tue Sep 25, 2012 5:42 pm

Maybe it's better you fix the makefiles instead of letting others gues which lines have to change.
You should find a way to update the makefiles for all platforms. Without forgetting or delaying a platform. (I recommend CMake)
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Official Pascal-Header (SDK 3.0)

Postby Stucuk » Sat Dec 22, 2012 7:17 am

Posted an updated header. Includes a compiled single precision DLL.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Official Pascal-Header (SDK 3.0)

Postby Schmackbolzen » Mon Feb 16, 2015 5:43 pm

Does this header still work with current trunk version of newton? I did not test it yet, because it is over two years old and I suppose much has changed since then...
Schmackbolzen
 
Posts: 26
Joined: Mon Feb 16, 2015 5:37 pm

Re: Official Pascal-Header (SDK 3.0)

Postby Schmackbolzen » Tue Feb 17, 2015 10:03 am

In case someone is interested: I was able to convert the current header of the github version using the h2pas tool (trunk version), some small modifications to the header and some regex search and replace steps afterwards. I converted the "tutorial_101_GettingStarted" to free pascal and it works with a fresh compiled version of Newton. So far so good...
Schmackbolzen
 
Posts: 26
Joined: Mon Feb 16, 2015 5:37 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron