The scene graph is identical at the level of appearances & geometries, the only things that you can use in pure immediate mode.
 
So, there is nothing you can precompute on lights, actually they are set only once at the creation of the GraphicContext3D and never touched anymore.
Same with the culling, it's just the same since I'm using the same appearance objects.
Yes, I'm avoiding material changes as much as possible.
I'm also caching the transform3d's of various nodes, so that the traversal of the entire scenegraph with the coresponding setting of the model transform in GraphicContext3D only takes 100 ms.
 
At the moment I'm grouping objects based on the model transforms, so that I'm minimizing the change in the model transforms. Would grouping based on material be more effective ?
 
Cheers,
 
Florin
-----Urspr�ngliche Nachricht-----
Von: Joerg 'Herkules' Plewe [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 3. M�rz 2003 15:19
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] Immediate Mode Rendering

If nothing is really bad with your code, it just depends. The SG is used for optimizations. Culling invisible geometry, sorting for material, avoiding material changes, precompute light, .....
 
Do you do the same optimizations? Or is your scene of a kind that SG optimizations cannot get hold?
 
- J
----- Original Message -----
Sent: Monday, March 03, 2003 1:51 PM
Subject: [JAVA3D] Immediate Mode Rendering

Hi J3D guys.
 
I have played in the last few days with the immediate mode rendering, and I'm wondering why it's so slow compared to the scenegraph mode ?
 
For example, drawing the geometries it takes 1.2 sec, flushing another 2.3 sec, total = 3.5 seconds. Exactly the same scene in scenegraph mode rendering takes aprox. 1 sec. Why the difference ? Can anybody from the j3d team comment on that ?
 
I think it's not my "drawing" code, since if I'm doing the same things but without creating a view, my part of code only takes 0.1 sec, so the rest of 3.4 sec. is spent in the j3d code.
 
Many thanks,
 
Florin

Reply via email to