Package arc
Class Graphics
java.lang.Object
arc.Graphics
- All Implemented Interfaces:
Disposable
- Direct Known Subclasses:
MockGraphics
Deprecated.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Deprecated.abstract floatDeprecated.UseApplication.getDeltaTime()instead.abstract longDeprecated.UseApplication.getFrameId()instead.abstract intDeprecated.UseApplication.getFramesPerSecond()instead.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface arc.util.Disposable
isDisposed
-
Constructor Details
-
Graphics
public Graphics()Deprecated.
-
-
Method Details
-
getFrameId
Deprecated.UseApplication.getFrameId()instead.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 theApplicationListener.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.UseApplication.getDeltaTime()instead.- Returns:
- the time span between the current frame and the last frame in seconds. Might be smoothed over n frames.
-
getFramesPerSecond
Deprecated.UseApplication.getFramesPerSecond()instead.- Returns:
- the average number of frames per second
-
dispose
Deprecated.Description copied from interface:DisposableReleases all resources of this object.- Specified by:
disposein interfaceDisposable
-
Applicationinstead.