1
Support / Terminology of Object3D
« on: December 09, 2011, 03:59:40 pm »
I have a prototype I've been working on, which I originally started in OpenGL and am trying to port over to JPCT. The majority of this transfer was quite painless - JPCT is way easier to use than base OpenGL calls, and I can only see the benefits getting larger as the project progresses. However, I've not yet been able to get the same performance as the OpenGL solution. This morning I was thinking that a big part of the problem is I don't exactly know what some of these Object3D functions do behind the scenes.
From a high level, I view an Object3D as a set of triangles that, when added to a World, will be rendered. But that's perhaps not even accurate, and there's also several functions that need to be called that are in a lot ways very black-box in their description.
Here are the functions I'm curious about:
Based on this description this tells me an Object3D is initially in a state that is not renderable. At a high level what does build do to make it renderable?
Based on the Javadoc I'm assuming this sets up the Object3D in a display list or VBO (depending on settings).
From a high level, I view an Object3D as a set of triangles that, when added to a World, will be rendered. But that's perhaps not even accurate, and there's also several functions that need to be called that are in a lot ways very black-box in their description.
Here are the functions I'm curious about:
Quote
public void build()
Initializes some basic object properties that are needed for almost all further processing. build() should be called if the object is "ready to render" (loaded, Textures assigned, placed, rendering modes set...).
Adding new triangles to an object after calling build() may work but doesn't have to. If you want to do this, call unbuild() before.
Based on this description this tells me an Object3D is initially in a state that is not renderable. At a high level what does build do to make it renderable?
Quote
public void compile()
Compiles an Object3D. Don't confuse this with build(), which does something completely different. A compiled object can be rendered faster when using the hardware renderer but has some shortcomings...
Based on the Javadoc I'm assuming this sets up the Object3D in a display list or VBO (depending on settings).