Class GpuCapabilities

java.lang.Object
com.codename1.gpu.GpuCapabilities

public final class GpuCapabilities extends Object
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

    Constructors
    Constructor
    Description
    GpuCapabilities(int maxTextureSize, int maxVertexAttributes, boolean shaderLevel3, boolean depthTextureSupported, boolean intIndicesSupported, String rendererName)
    Constructs a capabilities descriptor.
  • Method Summary

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

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 an IndexBuffer is limited to 16 bit indices.
    • getRendererName

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