public final class GpuCapabilities

  1. Object
  2. GpuCapabilities
Immutable description of the capabilities and limits of a GraphicsDevice. Backends create an instance describing the underlying GPU so portable code can adapt to the platform. Applications retrieve it via GraphicsDevice.getCapabilities().

Constructors

public GpuCapabilities(int maxTextureSize, int maxVertexAttributes, boolean shaderLevel3, boolean depthTextureSupported, boolean intIndicesSupported, String rendererName)Constructs a capabilities descriptor.

Methods

public int getMaxTextureSize()Returns the maximum supported texture edge length in pixels.
public int getMaxVertexAttributes()Returns the maximum number of vertex attributes supported per draw.
public boolean isShaderLevel3()Returns true if GLSL ES 3 / WebGL2 class shading features are available.
public boolean isDepthTextureSupported()Returns true if depth textures may be sampled (useful for shadow mapping).
public boolean isIntIndicesSupported()Returns true if 32 bit (int) element indices are supported.
public String getRendererName()Returns a human readable description of the backend and GPU.

Inherited methods

Constructor details

GpuCapabilities

public GpuCapabilities(int maxTextureSize, int maxVertexAttributes, boolean shaderLevel3, boolean depthTextureSupported, boolean intIndicesSupported, String rendererName)
Constructs a capabilities descriptor. Intended to be called by platform backends only.

Parameters

maxTextureSize int
the maximum supported texture edge length in pixels
maxVertexAttributes int
the maximum number of vertex attributes
shaderLevel3 boolean
true if GLSL ES 3 / WebGL2 class shaders are available
depthTextureSupported boolean
true if sampling depth textures is supported
intIndicesSupported boolean
true if 32 bit element indices are supported
rendererName String
a human readable backend/renderer description

Method details

getMaxTextureSize

public int getMaxTextureSize()
Returns the maximum supported texture edge length in pixels.

getMaxVertexAttributes

public int getMaxVertexAttributes()
Returns the maximum number of vertex attributes supported per draw.

isShaderLevel3

public boolean isShaderLevel3()
Returns true if GLSL ES 3 / WebGL2 class shading features are available.

isDepthTextureSupported

public boolean isDepthTextureSupported()
Returns true if depth textures may be sampled (useful for shadow mapping).

isIntIndicesSupported

public boolean isIntIndicesSupported()
Returns true if 32 bit (int) element indices are supported. When false an IndexBuffer is limited to 16 bit indices.

getRendererName

public String getRendererName()
Returns a human readable description of the backend and GPU.