Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3024 Members - Latest Member: floutleMili

07. February 2012, 03:38:34 AM
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)API changes - update hints
Pages: 1 [2] 3 4 ... 7
Print
Author Topic: API changes - update hints  (Read 28269 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #15 on: 15. February 2007, 04:19:05 AM »

So... this one is big...

I hope I explain here everything, I've changed. If not, I will complete this tomorrow.

The ExtXith3DEnvironment differed from Xith3DEnvironment in the way, that it implemented PickScheduler. ExtXith3DEnvironment is now deleted. Instead, just use Xith3DEnvironment and use getPickScheduler() to do scheduled picking.

Xith3DEnvironment doesn't implement SchreenshotEngine anymore. Instead it provides a getSchreenshotEngine() method.

The ExtRenderLoop has been deleted. Instead the RenderLoop class provides methods called getOperationScheduler(), getAnimator() and getInputManager(). There's a convenence class called InputAdapterRenderLoop, that implements InputListener and automatically adds itself to the getInputAdapter().addInputListener().
If you're not using schduled operations and want to tweak your app alittle bit, you can just invoke setOperationScheduler( null ).

The PickingLibrary is now fully GC-friendly. This is done by extending the pick*() signatures by one additional pick listener parameter. There are three pick listener interfaces: NearestPickListener and AllPickListener and a third one 'PickListener', that unites the first two.

Please be aware, that the the PickResult instances are not guaranteed to be valid, after the onObjectPicked() method is existed.

I think, that's all.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #16 on: 16. February 2007, 01:52:02 PM »

One thing, that I forgot: The FirstPersonInputHandler now also handles the the MouseDevice.setExclusive() calls. By default, it sets to exclusive. But when the (also previously existing) method setSuspended( true ) is called, it sets MouseDevice.setExclusive to !suspended.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #17 on: 17. February 2007, 03:23:22 PM »

I have moved the GeometricMath class to org.xith3d.utility.math.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #18 on: 18. February 2007, 03:55:43 PM »

The following code should be replaced from now on (to add a HUD to the SceneGraph):

old code:
Code:
SceneGraph sg = new Xith3DEnvironment( ... );

HUD hud = new HUD( ... );
sg.addRenderPass( hud.getRenderPass() );
rl.getInputManager().registerInputListener( hud );

new code:
Code:
SceneGraph sg = new Xith3DEnvironment( ... );

HUD hud = new HUD( ... );
sg.addHUD( hud, rl.getInputManager() );

It will work with the old code as well, but the new addHUD() mehtod additionally registers a resize-listener on the Xith3DEnvironment's first Canvas3D (even if it is not yet added).

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #19 on: 21. February 2007, 03:36:47 AM »

Xith3DDefaults.setNodeDefaultPickable() does not exist anymore. Instead use the Node.setDefaultPickable() method, which was deprecated and now is the method to use for that.

Node.getDefaultPickable() is now initially true (always).

RenderPassConfigProvider.PERSPECTIVE_PROJECTION and .PARALLEL_PROJECTION are now moved to a new enum ProjectionPolicy.

The class RenderPassConfig has been renamed to BaseRenderPassConfig.
The interface RenderPassConfigProvider has been renamed to RenderPassConfig.
Most of the time you will be confronted with the interface. So I wanted to get rid of the ugly name. It's much more sensible now.

The sorting policies constants have also been moved to a new enum, but this should not effect your code.

The RenderPassConfig now properly takes its defaults from View and Renderer as it should be.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #20 on: 25. February 2007, 02:02:20 PM »

Due to several speed optimizations I had to remove the Shape3D.Types enum together with the Shape3D.setType() method and replace this functionality with Geometry,setOptimization(). Should be easy to port and you'll have more possibilities.

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #21 on: 28. February 2007, 08:57:17 AM »

Not really API changes, but worth knowing :

JOAL support has been fixed. It all works now + upgraded to the latest version. Mind your natives !

JOGL has been upgraded to the latest version with now every amd64/i586 versions : please update your classpath accordingly. NEW : No need to extract the .jars on OSX : the jnilibs are there.

Enjoy!
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #22 on: 02. March 2007, 12:58:15 AM »

I have made the pick*() methods in PickingLibrary and PickScheduler more similar. This means, the Canvas3D is now the second or third parameter in both and userObject is always the last one.

There's a new int parameter for the mouse button, that has to be passed. This information can then be retrieved from the PickResult instance(s).

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #23 on: 06. March 2007, 01:36:47 AM »

HUD Button and Border changes:

The Button and Border Widgets are not built of (up to) nine Rectangles, but of only one TriangleStripArray. This means, that you only need to pass one simge texture to the button or border.

This only effects you, if you handle theming or create Button.Description instances. All the rest should be the same as before.

There is a deprecated OldButton Widget, that behaves like the old Button implementation. Please make sure to port your code/theme to the new implementation. I will remove tha OldButton Widget by time. (And you should really port, since it will boost performance of your game Wink).

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #24 on: 07. March 2007, 08:55:28 PM »

OpenAL binaries updated for macosx-ppc, macosx-universal and windows-i586.
Dir linux for joal renamed to linux-i586, windows and macosx dirs deleted.

Gluegen deleted from jogl dirs and moved into a separate "third-party/gluegen" dir.

UPDATE YOUR CLASSPATH IF YOU'RE NOT ON LINUX !
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #25 on: 11. March 2007, 06:12:41 PM »

If you're using Windows and LWJGL, place make sure, that you're using the corrent librarypath for the natives. The folder name for the win-natives has been changed from "windows" to "win32".

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #26 on: 14. March 2007, 01:25:43 AM »

The FPSCounter's API has changed a bit. It doesn't extend Label, but still extends BackgroundSettableRectangularWidget and implements TextWidget. This will most probably not effect you.

Additionally the FPSCounter doesn't work with a number formatter anymore. To tell it to format the number e.g without decimal places, just set no decimal separator like this:
Code:
fpsCounter.setDecimalSeparator( '\0' );

Everything else should be the same as before from the API side.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #27 on: 19. March 2007, 03:09:31 AM »

Several changes in the RenderLoop area:

All frames-per-second related methods now work with float instead of double.

The RenderLoop constructor parameter for the maximum FPS is handled as a float now instead of long to enable you to render at less than one FPS.

Don't override loopIteration(long, long) anymore. Instead override prepareNextFrame(long, long) or renderNextFrame(long, long).

The method RenderLoopController.nextIteration() has been renamed to nextFrame(). This will effect you, if you're using the RUN_IN_SEPARATE_THREAD_AND_WAIT RunMode.

All input event methods coming from HIAL now have an additional parameter, which takes the appropriate device.

Marvin
« Last Edit: 19. March 2007, 03:30:40 AM by Marvin Fröhlich » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #28 on: 22. March 2007, 12:16:13 AM »

I've moved the DisplayOptions class from org.xith3d.utility.canvas to the new package org.xith3d.utility.launching. The class org.xith3d.utility.general.Xith3DLauncher has also been moved to this package.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #29 on: 23. March 2007, 01:18:07 AM »

Canvas3DFactory is now the only supported way to create Canvas3Ds. There are no specific RenderPeer implementations per OpenGLLayer anymore and as a result no makeCanvas() methods. The Canvas3D constructors have all made protected and the set3DPeer() method has been deleted.

This reduces the code to be maintained and the possibilities for potential bugs.

Marvin
Logged
Pages: 1 [2] 3 4 ... 7
Print
Jump to:  

Theme orange-lt created by panic