Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Immediate-mode rendering problems.  (Read 1277 times)
0 Members and 1 Guest are viewing this topic.
Offline Alfryd

Junior Member





« Posted 2006-04-20 05:46:16 »

Specifically, what I've been doing is taking a particular set of geometry objects, and rendering them in different locations after modification.
I call draw(geometry) once, then modify the geometry, moving it to a different location, then drawing again, moving, drawing, etc.  This way I can re-use the same geometry data without having to worry about redundant storage in multiple geometry objects.
The problem is, for some reason the GraphicsContext3D can't seem to render more than 3 of these.  Anything else disappears.  Would there be inherent limits here?
Offline rdcarvallo

Senior Member


Projects: 5
Exp: 15 years


2D Java games forever!


« Reply #1 - Posted 2006-04-21 21:31:06 »

Why don't you use shape3d objects that share the same Geometry object??
Each shape can have it's own transform, and you don't need to store multiple times the geometry data.
Something like this I used to make copies of my terrain.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
class MyShape extends Shape3D{
  public MyShape(){ //Constructor called for the first time, creates the geometry.
   setGeometry(createGeometry());
  }
  public MyShape(MyShape original){ //Constructor called for the other copies of the geometry.
   setGeometry(original.getGeometry());
  }
  private Geometry createGeometry(){
    //create your geometry  data.
 }
}

Hope this helps,   
   Rafael.-

Offline Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2006-04-21 23:11:25 »

Is there a good reason fro using immedaite mode?

In general I dont think J3D's immediate mode has been kept up because noone uses it.  If you are going to go immediate, you mihgt as well go straight to JOGL/LWJGL...

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline otelo

Junior Member





« Reply #3 - Posted 2006-04-27 08:02:55 »

Is there a good reason fro using immedaite mode?

In general I dont think J3D's immediate mode has been kept up because noone uses it.  If you are going to go immediate, you mihgt as well go straight to JOGL/LWJGL...

Pure immediate in Java3D = Xith3D with full Java3D features  :-)

I went for pure immediate for the full control you get... at least for testing purposes. I know of no other way how to make Java3D run fluently (low frame period variation).
Offline Jeff

JGO Coder




Got any cats?


« Reply #4 - Posted 2006-04-27 18:29:11 »

Is there a good reason fro using immedaite mode?

In general I dont think J3D's immediate mode has been kept up because noone uses it.  If you are going to go immediate, you mihgt as well go straight to JOGL/LWJGL...

Pure immediate in Java3D = Xith3D with full Java3D features  :-)

I went for pure immediate for the full control you get... at least for testing purposes. I know of no other way how to make Java3D run fluently (low frame period variation).

Hmm.  Fair enough if thats what you need, since J3D doesnt render unless the scene changes I woudl imagine the frame rate varies highly.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (25 views)
2014-09-19 03:14:18

Dwinin (39 views)
2014-09-12 09:08:26

Norakomi (69 views)
2014-09-10 13:57:51

TehJavaDev (94 views)
2014-09-10 06:39:09

Tekkerue (48 views)
2014-09-09 02:24:56

mitcheeb (69 views)
2014-09-08 06:06:29

BurntPizza (51 views)
2014-09-07 01:13:42

Longarmx (38 views)
2014-09-07 01:12:14

Longarmx (44 views)
2014-09-07 01:11:22

Longarmx (40 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!