Class GpuCapabilities
java.lang.Object
com.codename1.gpu.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().-
Constructor Summary
ConstructorsConstructorDescriptionGpuCapabilities(int maxTextureSize, int maxVertexAttributes, boolean shaderLevel3, boolean depthTextureSupported, boolean intIndicesSupported, String rendererName) Constructs a capabilities descriptor. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum supported texture edge length in pixels.intReturns the maximum number of vertex attributes supported per draw.Returns a human readable description of the backend and GPU.booleanReturns true if depth textures may be sampled (useful for shadow mapping).booleanReturns true if 32 bit (int) element indices are supported.booleanReturns true if GLSL ES 3 / WebGL2 class shading features are available.
-
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: the maximum supported texture edge length in pixels -
maxVertexAttributes: the maximum number of vertex attributes -
shaderLevel3: true if GLSL ES 3 / WebGL2 class shaders are available -
depthTextureSupported: true if sampling depth textures is supported -
intIndicesSupported: true if 32 bit element indices are supported -
rendererName: 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 anIndexBufferis limited to 16 bit indices. -
getRendererName
Returns a human readable description of the backend and GPU.
-