client leverages block chunk short pool
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
90c27c0321
commit
de6876bf2f
@ -1991,6 +1991,7 @@ Performance improvements
|
||||
- Model anim calculations no longer allocate new matrix4d's
|
||||
- Undo most object pooling
|
||||
- ServerBlockChunkDiskMap uses short pool
|
||||
- Client leverages block chunk short pool
|
||||
Increase human move speed
|
||||
LOD components re-attach physics
|
||||
VectorPool->JomlPool
|
||||
|
||||
@ -17,6 +17,7 @@ import electrosphere.client.terrain.cells.DrawCell;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.logger.LoggerInterface;
|
||||
import electrosphere.mem.BlockChunkPool;
|
||||
import electrosphere.net.parser.net.message.TerrainMessage;
|
||||
import electrosphere.renderer.meshgen.BlockMeshgen.BlockMeshData;
|
||||
import electrosphere.server.physics.terrain.manager.ServerTerrainChunk;
|
||||
@ -114,8 +115,8 @@ public class ClientBlockManager {
|
||||
|
||||
//read main data
|
||||
if(data.getHomogenousValue() == BlockChunkData.NOT_HOMOGENOUS){
|
||||
short[] type = new short[BlockChunkData.TOTAL_DATA_WIDTH];
|
||||
short[] metadata = new short[BlockChunkData.TOTAL_DATA_WIDTH];
|
||||
short[] type = BlockChunkPool.getShort();
|
||||
short[] metadata = BlockChunkPool.getShort();
|
||||
ByteBuffer buffer = ByteBuffer.wrap(message.getchunkData());
|
||||
ShortBuffer shortBuffer = buffer.asShortBuffer();
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.ClientEntityUtils;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.logger.LoggerInterface;
|
||||
import electrosphere.mem.BlockChunkPool;
|
||||
import electrosphere.net.parser.net.message.TerrainMessage;
|
||||
import electrosphere.renderer.meshgen.TransvoxelModelGeneration;
|
||||
import electrosphere.renderer.model.Model;
|
||||
@ -204,8 +205,8 @@ public class ClientTerrainManager {
|
||||
|
||||
//read main data
|
||||
if(data.getHomogenousValue() == BlockChunkData.NOT_HOMOGENOUS){
|
||||
short[] type = new short[BlockChunkData.TOTAL_DATA_WIDTH];
|
||||
short[] metadata = new short[BlockChunkData.TOTAL_DATA_WIDTH];
|
||||
short[] type = BlockChunkPool.getShort();
|
||||
short[] metadata = BlockChunkPool.getShort();
|
||||
ByteBuffer buffer = ByteBuffer.wrap(message.getchunkData());
|
||||
ShortBuffer shortBuffer = buffer.asShortBuffer();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user