Class GwtGraphics

  • All Implemented Interfaces:
    com.badlogic.gdx.Graphics

    public class GwtGraphics
    extends java.lang.Object
    implements com.badlogic.gdx.Graphics
    • Constructor Detail

      • GwtGraphics

        public GwtGraphics​(com.google.gwt.user.client.ui.Panel root,
                           com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration config)
    • Method Detail

      • getDevicePixelRatioJSNI

        public static double getDevicePixelRatioJSNI()
      • getWindowWidthJSNI

        public static int getWindowWidthJSNI()
      • getWindowHeightJSNI

        public static int getWindowHeightJSNI()
      • getContext

        public com.google.gwt.webgl.client.WebGLRenderingContext getContext()
      • getGL20

        public com.badlogic.gdx.graphics.GL20 getGL20()
        Specified by:
        getGL20 in interface com.badlogic.gdx.Graphics
      • setGL20

        public void setGL20​(com.badlogic.gdx.graphics.GL20 gl20)
        Specified by:
        setGL20 in interface com.badlogic.gdx.Graphics
      • isGL30Available

        public boolean isGL30Available()
        Specified by:
        isGL30Available in interface com.badlogic.gdx.Graphics
      • getGL30

        public com.badlogic.gdx.graphics.GL30 getGL30()
        Specified by:
        getGL30 in interface com.badlogic.gdx.Graphics
      • setGL30

        public void setGL30​(com.badlogic.gdx.graphics.GL30 gl30)
        Specified by:
        setGL30 in interface com.badlogic.gdx.Graphics
      • getWidth

        public int getWidth()
        Specified by:
        getWidth in interface com.badlogic.gdx.Graphics
      • getHeight

        public int getHeight()
        Specified by:
        getHeight in interface com.badlogic.gdx.Graphics
      • getBackBufferWidth

        public int getBackBufferWidth()
        Specified by:
        getBackBufferWidth in interface com.badlogic.gdx.Graphics
      • getBackBufferHeight

        public int getBackBufferHeight()
        Specified by:
        getBackBufferHeight in interface com.badlogic.gdx.Graphics
      • getFrameId

        public long getFrameId()
        Specified by:
        getFrameId in interface com.badlogic.gdx.Graphics
      • getDeltaTime

        public float getDeltaTime()
        Specified by:
        getDeltaTime in interface com.badlogic.gdx.Graphics
      • getFramesPerSecond

        public int getFramesPerSecond()
        Specified by:
        getFramesPerSecond in interface com.badlogic.gdx.Graphics
      • getType

        public com.badlogic.gdx.Graphics.GraphicsType getType()
        Specified by:
        getType in interface com.badlogic.gdx.Graphics
      • getGLVersion

        public com.badlogic.gdx.graphics.glutils.GLVersion getGLVersion()
        Specified by:
        getGLVersion in interface com.badlogic.gdx.Graphics
      • getPpiX

        public float getPpiX()
        Specified by:
        getPpiX in interface com.badlogic.gdx.Graphics
      • getPpiY

        public float getPpiY()
        Specified by:
        getPpiY in interface com.badlogic.gdx.Graphics
      • getPpcX

        public float getPpcX()
        Specified by:
        getPpcX in interface com.badlogic.gdx.Graphics
      • getPpcY

        public float getPpcY()
        Specified by:
        getPpcY in interface com.badlogic.gdx.Graphics
      • supportsDisplayModeChange

        public boolean supportsDisplayModeChange()
        Specified by:
        supportsDisplayModeChange in interface com.badlogic.gdx.Graphics
      • getDisplayModes

        public com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes()
        Specified by:
        getDisplayModes in interface com.badlogic.gdx.Graphics
      • getDisplayMode

        public com.badlogic.gdx.Graphics.DisplayMode getDisplayMode()
        Specified by:
        getDisplayMode in interface com.badlogic.gdx.Graphics
      • setFullscreenMode

        public boolean setFullscreenMode​(com.badlogic.gdx.Graphics.DisplayMode displayMode)
        Specified by:
        setFullscreenMode in interface com.badlogic.gdx.Graphics
      • setWindowedMode

        public boolean setWindowedMode​(int width,
                                       int height)
        Specified by:
        setWindowedMode in interface com.badlogic.gdx.Graphics
      • getPrimaryMonitor

        public com.badlogic.gdx.Graphics.Monitor getPrimaryMonitor()
        Specified by:
        getPrimaryMonitor in interface com.badlogic.gdx.Graphics
      • getMonitor

        public com.badlogic.gdx.Graphics.Monitor getMonitor()
        Specified by:
        getMonitor in interface com.badlogic.gdx.Graphics
      • getMonitors

        public com.badlogic.gdx.Graphics.Monitor[] getMonitors()
        Specified by:
        getMonitors in interface com.badlogic.gdx.Graphics
      • getDisplayModes

        public com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes​(com.badlogic.gdx.Graphics.Monitor monitor)
        Specified by:
        getDisplayModes in interface com.badlogic.gdx.Graphics
      • getDisplayMode

        public com.badlogic.gdx.Graphics.DisplayMode getDisplayMode​(com.badlogic.gdx.Graphics.Monitor monitor)
        Specified by:
        getDisplayMode in interface com.badlogic.gdx.Graphics
      • lockOrientation

        public boolean lockOrientation​(GwtGraphics.OrientationLockType orientation)
        Attempt to lock the orientation. Typically only supported when in full-screen mode.
        Parameters:
        orientation - the orientation to attempt locking
        Returns:
        did the locking succeed
      • unlockOrientation

        public boolean unlockOrientation()
        Attempt to unlock the orientation.
        Returns:
        did the unlocking succeed
      • getBufferFormat

        public com.badlogic.gdx.Graphics.BufferFormat getBufferFormat()
        Specified by:
        getBufferFormat in interface com.badlogic.gdx.Graphics
      • supportsExtension

        public boolean supportsExtension​(java.lang.String extensionName)
        Specified by:
        supportsExtension in interface com.badlogic.gdx.Graphics
      • update

        public void update()
      • setTitle

        public void setTitle​(java.lang.String title)
        Specified by:
        setTitle in interface com.badlogic.gdx.Graphics
      • setUndecorated

        public void setUndecorated​(boolean undecorated)
        Specified by:
        setUndecorated in interface com.badlogic.gdx.Graphics
      • setResizable

        public void setResizable​(boolean resizable)
        Specified by:
        setResizable in interface com.badlogic.gdx.Graphics
      • setVSync

        public void setVSync​(boolean vsync)
        Specified by:
        setVSync in interface com.badlogic.gdx.Graphics
      • getDensity

        public float getDensity()
        Specified by:
        getDensity in interface com.badlogic.gdx.Graphics
      • setContinuousRendering

        public void setContinuousRendering​(boolean isContinuous)
        Specified by:
        setContinuousRendering in interface com.badlogic.gdx.Graphics
      • isContinuousRendering

        public boolean isContinuousRendering()
        Specified by:
        isContinuousRendering in interface com.badlogic.gdx.Graphics
      • requestRendering

        public void requestRendering()
        Specified by:
        requestRendering in interface com.badlogic.gdx.Graphics
      • getRawDeltaTime

        public float getRawDeltaTime()
        Specified by:
        getRawDeltaTime in interface com.badlogic.gdx.Graphics
      • isFullscreen

        public boolean isFullscreen()
        Specified by:
        isFullscreen in interface com.badlogic.gdx.Graphics
      • newCursor

        public com.badlogic.gdx.graphics.Cursor newCursor​(Pixmap pixmap,
                                                          int xHotspot,
                                                          int yHotspot)
        Specified by:
        newCursor in interface com.badlogic.gdx.Graphics
      • setCursor

        public void setCursor​(com.badlogic.gdx.graphics.Cursor cursor)
        Specified by:
        setCursor in interface com.badlogic.gdx.Graphics
      • setSystemCursor

        public void setSystemCursor​(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor)
        Specified by:
        setSystemCursor in interface com.badlogic.gdx.Graphics