Package com.badlogic.gdx.backends.gwt
Class GwtGraphics
- java.lang.Object
-
- com.badlogic.gdx.backends.gwt.GwtGraphics
-
- All Implemented Interfaces:
com.badlogic.gdx.Graphics
public class GwtGraphics extends java.lang.Object implements com.badlogic.gdx.Graphics
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGwtGraphics.OrientationLockType
-
Constructor Summary
Constructors Constructor Description GwtGraphics(com.google.gwt.user.client.ui.Panel root, com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBackBufferHeight()intgetBackBufferWidth()com.badlogic.gdx.Graphics.BufferFormatgetBufferFormat()com.google.gwt.webgl.client.WebGLRenderingContextgetContext()floatgetDeltaTime()floatgetDensity()static doublegetDevicePixelRatioJSNI()com.badlogic.gdx.Graphics.DisplayModegetDisplayMode()com.badlogic.gdx.Graphics.DisplayModegetDisplayMode(com.badlogic.gdx.Graphics.Monitor monitor)com.badlogic.gdx.Graphics.DisplayMode[]getDisplayModes()com.badlogic.gdx.Graphics.DisplayMode[]getDisplayModes(com.badlogic.gdx.Graphics.Monitor monitor)longgetFrameId()intgetFramesPerSecond()com.badlogic.gdx.graphics.GL20getGL20()com.badlogic.gdx.graphics.GL30getGL30()com.badlogic.gdx.graphics.glutils.GLVersiongetGLVersion()intgetHeight()com.badlogic.gdx.Graphics.MonitorgetMonitor()com.badlogic.gdx.Graphics.Monitor[]getMonitors()floatgetPpcX()floatgetPpcY()floatgetPpiX()floatgetPpiY()com.badlogic.gdx.Graphics.MonitorgetPrimaryMonitor()floatgetRawDeltaTime()com.badlogic.gdx.Graphics.GraphicsTypegetType()intgetWidth()static intgetWindowHeightJSNI()static intgetWindowWidthJSNI()booleanisContinuousRendering()booleanisFullscreen()booleanisGL30Available()booleanlockOrientation(GwtGraphics.OrientationLockType orientation)Attempt to lock the orientation.com.badlogic.gdx.graphics.CursornewCursor(Pixmap pixmap, int xHotspot, int yHotspot)voidrequestRendering()voidsetContinuousRendering(boolean isContinuous)voidsetCursor(com.badlogic.gdx.graphics.Cursor cursor)booleansetFullscreenMode(com.badlogic.gdx.Graphics.DisplayMode displayMode)voidsetGL20(com.badlogic.gdx.graphics.GL20 gl20)voidsetGL30(com.badlogic.gdx.graphics.GL30 gl30)voidsetResizable(boolean resizable)voidsetSystemCursor(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor)voidsetTitle(java.lang.String title)voidsetUndecorated(boolean undecorated)voidsetVSync(boolean vsync)booleansetWindowedMode(int width, int height)booleansupportsDisplayModeChange()booleansupportsExtension(java.lang.String extensionName)booleanunlockOrientation()Attempt to unlock the orientation.voidupdate()
-
-
-
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:
getGL20in interfacecom.badlogic.gdx.Graphics
-
setGL20
public void setGL20(com.badlogic.gdx.graphics.GL20 gl20)
- Specified by:
setGL20in interfacecom.badlogic.gdx.Graphics
-
isGL30Available
public boolean isGL30Available()
- Specified by:
isGL30Availablein interfacecom.badlogic.gdx.Graphics
-
getGL30
public com.badlogic.gdx.graphics.GL30 getGL30()
- Specified by:
getGL30in interfacecom.badlogic.gdx.Graphics
-
setGL30
public void setGL30(com.badlogic.gdx.graphics.GL30 gl30)
- Specified by:
setGL30in interfacecom.badlogic.gdx.Graphics
-
getWidth
public int getWidth()
- Specified by:
getWidthin interfacecom.badlogic.gdx.Graphics
-
getHeight
public int getHeight()
- Specified by:
getHeightin interfacecom.badlogic.gdx.Graphics
-
getBackBufferWidth
public int getBackBufferWidth()
- Specified by:
getBackBufferWidthin interfacecom.badlogic.gdx.Graphics
-
getBackBufferHeight
public int getBackBufferHeight()
- Specified by:
getBackBufferHeightin interfacecom.badlogic.gdx.Graphics
-
getFrameId
public long getFrameId()
- Specified by:
getFrameIdin interfacecom.badlogic.gdx.Graphics
-
getDeltaTime
public float getDeltaTime()
- Specified by:
getDeltaTimein interfacecom.badlogic.gdx.Graphics
-
getFramesPerSecond
public int getFramesPerSecond()
- Specified by:
getFramesPerSecondin interfacecom.badlogic.gdx.Graphics
-
getType
public com.badlogic.gdx.Graphics.GraphicsType getType()
- Specified by:
getTypein interfacecom.badlogic.gdx.Graphics
-
getGLVersion
public com.badlogic.gdx.graphics.glutils.GLVersion getGLVersion()
- Specified by:
getGLVersionin interfacecom.badlogic.gdx.Graphics
-
getPpiX
public float getPpiX()
- Specified by:
getPpiXin interfacecom.badlogic.gdx.Graphics
-
getPpiY
public float getPpiY()
- Specified by:
getPpiYin interfacecom.badlogic.gdx.Graphics
-
getPpcX
public float getPpcX()
- Specified by:
getPpcXin interfacecom.badlogic.gdx.Graphics
-
getPpcY
public float getPpcY()
- Specified by:
getPpcYin interfacecom.badlogic.gdx.Graphics
-
supportsDisplayModeChange
public boolean supportsDisplayModeChange()
- Specified by:
supportsDisplayModeChangein interfacecom.badlogic.gdx.Graphics
-
getDisplayModes
public com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes()
- Specified by:
getDisplayModesin interfacecom.badlogic.gdx.Graphics
-
getDisplayMode
public com.badlogic.gdx.Graphics.DisplayMode getDisplayMode()
- Specified by:
getDisplayModein interfacecom.badlogic.gdx.Graphics
-
setFullscreenMode
public boolean setFullscreenMode(com.badlogic.gdx.Graphics.DisplayMode displayMode)
- Specified by:
setFullscreenModein interfacecom.badlogic.gdx.Graphics
-
setWindowedMode
public boolean setWindowedMode(int width, int height)- Specified by:
setWindowedModein interfacecom.badlogic.gdx.Graphics
-
getPrimaryMonitor
public com.badlogic.gdx.Graphics.Monitor getPrimaryMonitor()
- Specified by:
getPrimaryMonitorin interfacecom.badlogic.gdx.Graphics
-
getMonitor
public com.badlogic.gdx.Graphics.Monitor getMonitor()
- Specified by:
getMonitorin interfacecom.badlogic.gdx.Graphics
-
getMonitors
public com.badlogic.gdx.Graphics.Monitor[] getMonitors()
- Specified by:
getMonitorsin interfacecom.badlogic.gdx.Graphics
-
getDisplayModes
public com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes(com.badlogic.gdx.Graphics.Monitor monitor)
- Specified by:
getDisplayModesin interfacecom.badlogic.gdx.Graphics
-
getDisplayMode
public com.badlogic.gdx.Graphics.DisplayMode getDisplayMode(com.badlogic.gdx.Graphics.Monitor monitor)
- Specified by:
getDisplayModein interfacecom.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:
getBufferFormatin interfacecom.badlogic.gdx.Graphics
-
supportsExtension
public boolean supportsExtension(java.lang.String extensionName)
- Specified by:
supportsExtensionin interfacecom.badlogic.gdx.Graphics
-
update
public void update()
-
setTitle
public void setTitle(java.lang.String title)
- Specified by:
setTitlein interfacecom.badlogic.gdx.Graphics
-
setUndecorated
public void setUndecorated(boolean undecorated)
- Specified by:
setUndecoratedin interfacecom.badlogic.gdx.Graphics
-
setResizable
public void setResizable(boolean resizable)
- Specified by:
setResizablein interfacecom.badlogic.gdx.Graphics
-
setVSync
public void setVSync(boolean vsync)
- Specified by:
setVSyncin interfacecom.badlogic.gdx.Graphics
-
getDensity
public float getDensity()
- Specified by:
getDensityin interfacecom.badlogic.gdx.Graphics
-
setContinuousRendering
public void setContinuousRendering(boolean isContinuous)
- Specified by:
setContinuousRenderingin interfacecom.badlogic.gdx.Graphics
-
isContinuousRendering
public boolean isContinuousRendering()
- Specified by:
isContinuousRenderingin interfacecom.badlogic.gdx.Graphics
-
requestRendering
public void requestRendering()
- Specified by:
requestRenderingin interfacecom.badlogic.gdx.Graphics
-
getRawDeltaTime
public float getRawDeltaTime()
- Specified by:
getRawDeltaTimein interfacecom.badlogic.gdx.Graphics
-
isFullscreen
public boolean isFullscreen()
- Specified by:
isFullscreenin interfacecom.badlogic.gdx.Graphics
-
newCursor
public com.badlogic.gdx.graphics.Cursor newCursor(Pixmap pixmap, int xHotspot, int yHotspot)
- Specified by:
newCursorin interfacecom.badlogic.gdx.Graphics
-
setCursor
public void setCursor(com.badlogic.gdx.graphics.Cursor cursor)
- Specified by:
setCursorin interfacecom.badlogic.gdx.Graphics
-
setSystemCursor
public void setSystemCursor(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor)
- Specified by:
setSystemCursorin interfacecom.badlogic.gdx.Graphics
-
-