Search in sources :

Example 1 with HeightmapArrayTexture

use of io.xol.chunkstories.renderer.terrain.HeightmapArrayTexture in project chunkstories by Hugobros3.

the class WorldRendererImplementation method renderWorld.

public void renderWorld(RenderingInterface renderingInterface) {
    ((HeightmapArrayTexture) summariesTexturesHolder).update();
    // if(RenderingConfig.doDynamicCubemaps)
    // cubemapRenderer.renderWorldCubemap(renderingInterface,
    // renderBuffers.rbEnvironmentMap, 128, true);
    // Step one, set the camera to the proper spot
    CameraInterface mainCamera = renderingInterface.getCamera();
    EntityControllable entity = world.getClient().getPlayer().getControlledEntity();
    if (entity != null)
        entity.setupCamera(renderingInterface);
    animationTimer = ((float) (System.currentTimeMillis() & 0x7FFF)) / 100.0f;
    // TODO remove entirely
    FakeImmediateModeDebugRenderer.setCamera(mainCamera);
    chunksRenderer.updatePVSSet(mainCamera);
    // Prepare matrices
    mainCamera.setupUsingScreenSize(gameWindow.getWidth(), gameWindow.getHeight());
    this.renderWorldInternal(renderingInterface);
}
Also used : HeightmapArrayTexture(io.xol.chunkstories.renderer.terrain.HeightmapArrayTexture) CameraInterface(io.xol.chunkstories.api.rendering.CameraInterface) EntityControllable(io.xol.chunkstories.api.entity.interfaces.EntityControllable)

Aggregations

EntityControllable (io.xol.chunkstories.api.entity.interfaces.EntityControllable)1 CameraInterface (io.xol.chunkstories.api.rendering.CameraInterface)1 HeightmapArrayTexture (io.xol.chunkstories.renderer.terrain.HeightmapArrayTexture)1