Search in sources :

Example 6 with ModelCache

use of com.badlogic.gdx.graphics.g3d.ModelCache in project nhglib by VoidZombie.

the class GraphicsSystem method end.

@Override
protected void end() {
    super.end();
    for (int i = 0; i < cameras.size; i++) {
        Camera camera = cameras.get(i);
        ModelBatch modelBatch = modelBatches.get(i);
        ModelCache dynamicCache = dynamicCaches.get(i);
        ModelCache staticCache = staticCaches.get(i);
        dynamicCache.end();
        GLUtils.clearScreen(clearColor);
        modelBatch.begin(camera);
        modelBatch.render(staticCache, environment);
        modelBatch.render(dynamicCache, environment);
        modelBatch.end();
        if (Nhg.debugDrawPhysics && debugDrawer != null) {
            debugDrawer.begin(camera);
            physicsSystem.debugDraw();
            debugDrawer.end();
        }
    }
}
Also used : ModelBatch(com.badlogic.gdx.graphics.g3d.ModelBatch) Camera(com.badlogic.gdx.graphics.Camera) ModelCache(com.badlogic.gdx.graphics.g3d.ModelCache)

Aggregations

ModelCache (com.badlogic.gdx.graphics.g3d.ModelCache)6 Camera (com.badlogic.gdx.graphics.Camera)3 ModelBatch (com.badlogic.gdx.graphics.g3d.ModelBatch)2 InputMultiplexer (com.badlogic.gdx.InputMultiplexer)1 AssetManager (com.badlogic.gdx.assets.AssetManager)1 PerspectiveCamera (com.badlogic.gdx.graphics.PerspectiveCamera)1 SpriteBatch (com.badlogic.gdx.graphics.g2d.SpriteBatch)1 Material (com.badlogic.gdx.graphics.g3d.Material)1 Model (com.badlogic.gdx.graphics.g3d.Model)1 ModelInstance (com.badlogic.gdx.graphics.g3d.ModelInstance)1 Renderable (com.badlogic.gdx.graphics.g3d.Renderable)1 RenderableProvider (com.badlogic.gdx.graphics.g3d.RenderableProvider)1 Shader (com.badlogic.gdx.graphics.g3d.Shader)1 BaseShaderProvider (com.badlogic.gdx.graphics.g3d.utils.BaseShaderProvider)1 DefaultRenderableSorter (com.badlogic.gdx.graphics.g3d.utils.DefaultRenderableSorter)1 DefaultTextureBinder (com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder)1 FirstPersonCameraController (com.badlogic.gdx.graphics.g3d.utils.FirstPersonCameraController)1 MeshPartBuilder (com.badlogic.gdx.graphics.g3d.utils.MeshPartBuilder)1 ModelBuilder (com.badlogic.gdx.graphics.g3d.utils.ModelBuilder)1 RenderContext (com.badlogic.gdx.graphics.g3d.utils.RenderContext)1