Package arc

Class Graphics

java.lang.Object
arc.Graphics
All Implemented Interfaces:
Disposable
Direct Known Subclasses:
MockGraphics

@Deprecated public abstract class Graphics extends Object implements Disposable
Deprecated.
Just here for compatibility reasons, only contains methods about frame rate. Please use same methods from Application instead.
This interface encapsulates communication with the graphics processor. Depending on the available hardware and the current Application configuration, access to GL20 and GL30 are provided here.

If supported by the backend, this interface lets you query the available display modes (graphics resolution and color depth) and change it.

This interface can be used to switch between continuous and non-continuous rendering (see #setContinuousRendering(boolean)), and to explicitly #requestRendering().

There are many more utility classes that are not directly generated by the Graphics interfaces. See VertexArray , VertexBufferObject, IndexBufferObject, Mesh, Shader and FrameBuffer, Font, Batch and so on. All these classes are managed, meaning they don't need to be reloaded on a context loss. Explore the arc.graphics package for more classes that might come in handy.

  • Constructor Details

    • Graphics

      public Graphics()
      Deprecated.
  • Method Details

    • getFrameId

      @Deprecated public abstract long getFrameId()
      Deprecated.
      Returns the id of the current frame. The general contract of this method is that the id is incremented only when the application is in the running state right before calling the ApplicationListener.update() method. Also, the id of the first frame is 0; the id of subsequent frames is guaranteed to take increasing values for 263-1 rendering cycles.
      Returns:
      the id of the current frame
    • getDeltaTime

      @Deprecated public abstract float getDeltaTime()
      Deprecated.
      Returns:
      the time span between the current frame and the last frame in seconds. Might be smoothed over n frames.
    • getFramesPerSecond

      @Deprecated public abstract int getFramesPerSecond()
      Deprecated.
      Returns:
      the average number of frames per second
    • dispose

      @Deprecated public void dispose()
      Deprecated.
      Description copied from interface: Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface Disposable