Introduce off heap garbage collector

This commit is contained in:
2021-02-01 12:38:11 +01:00
parent 71a1e47d24
commit b6439e010a
25 changed files with 103 additions and 42 deletions

View File

@@ -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");
}
}

View File

@@ -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);
}