Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 07:51:55 pm
Xith3D CommunityGeneral CategoryGeneral Discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Best approach..
Pages: [1]
Print
Author Topic: Best approach..  (Read 923 times)
hawkwind
Getting respectable
***
Offline Offline

Posts: 363



View Profile Email
« on: 28. February 2007, 06:25:49 pm »

I see a variety of code approaches accross the set of test examples.  Some code is like

Code:
BaseRenderPassConfig(ProjectionPolicy.PERSPECTIVE_PROJECTION)

other code is like

Code:
   env.addPerspectiveBranch( loadLevel() );
     

is there a suggested style?? Huh
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 28. February 2007, 07:17:52 pm »

Well, there's no "right" way. Just choose the way, that fits you needs best.

I mixed the used ways of adding RenderPasses a bit through the testcases to make clear, that there is more than one way to do it.

I would suggest to use the "shortest" one for your specific case.

e.g.
Code:
BranchGroup scene = createScene();
env.addPerspectiveBranch( scene );

or
Code:
BranchGroup scene = createScene();
RenderPassConfig rpConf = doSomethingThatCreatesARenderPassConfig();
env.addBranchGraph( scene, rpConf );

or
Code:
BranchGroup scene = createScene();
RenderPass rp = doSomethingThatCreatesARenderPass( scene );
env.addRenderPass( rp );

You see, there are shorter methods, that do the same, if you have less parameters, that carry the same information.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic