Introduce off heap garbage collector
This commit is contained in:
@@ -6,10 +6,12 @@ import com.bartlomiejpluta.base.core.util.mesh.MeshManager;
|
||||
import com.bartlomiejpluta.base.game.world.entity.model.Entity;
|
||||
import com.bartlomiejpluta.base.game.world.entity.config.EntitySpriteConfiguration;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.joml.Vector2f;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class DefaultEntityManager implements EntityManager {
|
||||
@@ -28,4 +30,9 @@ public class DefaultEntityManager implements EntityManager {
|
||||
var spriteHeight = texture.getHeight() / (float) dimension.x;
|
||||
return meshManager.createQuad(spriteWidth, spriteHeight, spriteWidth / 2, spriteHeight*0.9f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanUp() {
|
||||
log.info("There is nothing to clean up");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package com.bartlomiejpluta.base.game.world.entity.manager;
|
||||
|
||||
import com.bartlomiejpluta.base.core.gc.Cleanable;
|
||||
import com.bartlomiejpluta.base.core.gl.object.material.Material;
|
||||
import com.bartlomiejpluta.base.game.world.entity.model.Entity;
|
||||
import org.joml.Vector2f;
|
||||
|
||||
public interface EntityManager {
|
||||
public interface EntityManager extends Cleanable {
|
||||
Entity createEntity(Material material, Vector2f coordinateStepSize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user