www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: MichaelJPCT on June 29, 2017, 09:43:30 am
-
say i have several objects which have the same vertex positions and normals and UVs, but the primitives are different. in GL or DX, these objects can use the same VBO.
in JPCT, is it possible?
another question, if in a vertex list, some vertices are not pointed by any primitive, does JPCT remove these vertices?
-
in JPCT, is it possible?
Yes, you can use: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#shareCompiledData(com.threed.jpct.Object3D) (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#shareCompiledData(com.threed.jpct.Object3D))
if in a vertex list, some vertices are not pointed by any primitive, does JPCT remove these vertices?
Yes, it should.
-
i read the doc about shareCompiledData. it says the objects must have the same Mesh instance, then how can i define different primitives for the objects?
-
I'm confused now. The idea of reusing a VBO (or any other GL data structure for that matter) is that you render the same object multiple times based on the same definition. There's no point in reusing a VBO for different objects... ???
-
it's not very necessary. i just wanted to know.
sometimes, it can be used to save memory, such as different LODs of an object use the same VBO.