jPCT - a 3d engine for Java > Support

Object/Sprite Batching

(1/3) > >>

Jakes:
Hello,

I was wondering if there is a prebuilt method for batching up sprites to the GPU instead of sending multiple objects individualy, as it increases a lot the performance when using particle systems or packs of elements sharing same mesh,

thanks,
Jakes

AGP:
Other than new Object3D(object3D, true) with true being reuseMesh, I don't think so.

Jakes:
That is not batching the objects per se, rather just reusing the same mesh data in order to reduce memory usage.
What I'm talking about is batching objects (not meshes) in a single call to the GPU in order to reduce callback bottleneck caused by multiple calls to the pipeline.

I've seen this:

https://www.jpct.net/wiki/index.php?title=Instance_Batch_Rendering

but this is not bundled in the JPCT API, so I have some concerns regading Desktop version, and there are no examples on how to use and documentation about understanding it.

does anyone know if this will work with the Desktop vesion and requires a shader explicitly for this?

EgonOlsen:
It should work on desktop jPCT as well, I guess. But it would need a different shader, because desktop jPCT relies on OpenGL's magic uniforms for vertex, lighting and texture data were jPCT-AE manages the uniforms all by itself because there is no magic anymore in OpenGL ES.

Edit: Not sure if it's worth the hassle for most usecases, though...

Jakes:
My main concern is about reducing overhead on low end computers in game development.

But TBF, the reason I was looking for an improvement on what I have, is mainly because I tend to use a lot of fixed and static objects that are clones, differing only on their position, but sharing not only mesh and texture data as well, and I am already using the shareCompiledData and shareTextureData, but I was having some bottlenecks when having 2000+ more objects on the same scene, and even inside the frustum.

But when it comes to shaders that is not my best preference, because everytime I need to add a shader to an already existing shader, I need to combine them and check if the code still remains valid

Regards,
Jakes

Navigation

[0] Message Index

[#] Next page

Go to full version