Search in sources :

Example 1 with ScreenGrabber

use of org.terasology.engine.rendering.opengl.ScreenGrabber in project Terasology by MovingBlocks.

the class ReadWriteStorageManager method saveGamePreviewImage.

private void saveGamePreviewImage() {
    final ScreenGrabber screenGrabber = CoreRegistry.get(ScreenGrabber.class);
    final Game game = CoreRegistry.get(Game.class);
    if (screenGrabber != null && game != null) {
        screenGrabber.takeGamePreview(PathManager.getInstance().getSavePath(game.getName()));
    }
}
Also used : Game(org.terasology.engine.game.Game) ScreenGrabber(org.terasology.engine.rendering.opengl.ScreenGrabber)

Example 2 with ScreenGrabber

use of org.terasology.engine.rendering.opengl.ScreenGrabber in project Terasology by MovingBlocks.

the class WorldRendererImpl method initRenderingSupport.

private void initRenderingSupport() {
    ScreenGrabber screenGrabber = new ScreenGrabber(context);
    context.put(ScreenGrabber.class, screenGrabber);
    displayResolutionDependentFbo = new DisplayResolutionDependentFbo(context.get(Config.class).getRendering(), screenGrabber, context.get(DisplayDevice.class));
    context.put(DisplayResolutionDependentFbo.class, displayResolutionDependentFbo);
    shaderManager.initShaders();
    context.put(WorldRenderer.class, this);
    context.put(RenderQueuesHelper.class, renderQueues);
    context.put(RenderableWorld.class, renderableWorld);
}
Also used : DisplayResolutionDependentFbo(org.terasology.engine.rendering.opengl.fbms.DisplayResolutionDependentFbo) RenderingConfig(org.terasology.engine.config.RenderingConfig) Config(org.terasology.engine.config.Config) PlayerConfig(org.terasology.engine.config.PlayerConfig) ScreenGrabber(org.terasology.engine.rendering.opengl.ScreenGrabber)

Aggregations

ScreenGrabber (org.terasology.engine.rendering.opengl.ScreenGrabber)2 Config (org.terasology.engine.config.Config)1 PlayerConfig (org.terasology.engine.config.PlayerConfig)1 RenderingConfig (org.terasology.engine.config.RenderingConfig)1 Game (org.terasology.engine.game.Game)1 DisplayResolutionDependentFbo (org.terasology.engine.rendering.opengl.fbms.DisplayResolutionDependentFbo)1