GraphicsDevice class

The Graphical Device provides a way for developers to interact with the GPU by binding different resources to it.

A single render call starts with a call to begin and only ends when end is called. Any resource that gets bound to the device in between these two method calls will be uploaded to the GPU and returns as an Image in end.

Constructors

GraphicsDevice.new({Color clearValue = const Color(0x00000000), GpuContext? gpuContext})
The Graphical Device provides a way for developers to interact with the GPU by binding different resources to it.

Properties

clearValue Color
The clear value, used to clear out the screen.
final
hashCode int
The hash code for this object.
no setterinherited
jointsInfo → JointsInfo
Must be set by the rendering pipeline before elements are bound. Can be accessed by elements in their bind method.
final
lightingInfo LightingInfo
Must be set by the rendering pipeline before elements are bound. Can be accessed by elements in their bind method.
final
model Matrix4
no setter
projection Matrix4
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
view Matrix4
no setter

Methods

begin(Size size, {BlendState blendState = BlendState.alphaBlend, DepthStencilState depthStencilState = DepthStencilState.depthRead}) → void
Begin a new rendering batch.
bindMaterial(Material material) → void
Bind a material and set up the buffer correctly.
bindMesh(Mesh mesh) → void
Bind a mesh.
bindSurface(Surface surface) → void
Bind a surface.
bindTexture(UniformSlot slot, Texture texture) → void
Bind a uniform slot to the texture.
bindUniform(UniformSlot slot, ByteBuffer buffer) → void
Bind a uniform slot to the buffer.
clearBindings() → void
end() Image
Submit the rendering batch and it's the commands to the GPU and return the result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited