Share with us how are you using the powerrrr of the force
Moderator: Alain
by Stucuk » Tue Sep 12, 2006 1:04 pm
Note: This is for Delphi
The Newton Handler basicaly is designed to assist engines that use Plugins. It is basicaly a class which is passed from the DLL to an app as a pointer. The Class basicaly points to the newton.dll's functions and procedures allowing you to have Newton only loaded once, but can easily pass all of the functions/procedures to any dll/exe.
The NewtonHandler_Unit.pas allows APP's/DLLs to use the newton Procedures/Functions as they normaly would when including NewtonImport.pas . Basicaly u send it the NewtonHandler and it sets the list of Functions/Procedures to point to the newton dll, allowing you do just do NewtonCreate() insted of NewtonHandler.NewtonCreate().
Note: This is only rearly useful if your Engine uses plugins which can use Newton. This is also the first build.
Source
Binary (Note: ModelEditor.Exe the main app uses Sascha Willems's glPrimitives as a means to test the NewtonHandler works, this will be removed in future builds)
Note: Yes i know the modeleditor.exe doesn't edit models.... it will one day... just using it to test the engine currently.
-
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by aidave2 » Tue Sep 12, 2006 6:49 pm
i dont get it
are you saying Newton.dll is loaded more than once without your tool?
-
aidave2
-
- Posts: 56
- Joined: Sun Jan 08, 2006 7:09 pm
-
by Stucuk » Tue Sep 12, 2006 10:24 pm
The Newton Handler is for Engines that work on a Plugin system.
For example currently with Meaaov the VBSP.dll, W3D.dll and MODELS.dll could use Newton. If all 3 used newtonimport.pas then u would have 3 copys of newton loaded. The NewtonHandler dll stops this and makes it so u only have 1 copy loaded.
In the example above all 3 DLL's would get a pointer to the NewtonHandler, which would be used to setup the NewtonHandler_Unit. Newton.dll would only be loaded once by the NewtonHandler DLL.
Basicaly NewtonHandler is a load of pointers which point to the Newton's functions and procedures and is passed to anything that needs it.
As i keep saying, This is for engines which use Plugins which can use newton. Its unlikly anyone will find this useful but just in case iv posted it.
-
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by aidave2 » Wed Sep 13, 2006 11:11 am
oh ok ... thats interesting
thanx
-
aidave2
-
- Posts: 56
- Joined: Sun Jan 08, 2006 7:09 pm
-
Return to User Gallery
Who is online
Users browsing this forum: No registered users and 14 guests