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. Anything that gets binded to the device in between will be uploaded to the GPU and returns as an Image in end.

Constructors

GraphicsDevice({Color clearValue = const Color(0x00000000)})
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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

begin(Size size, {BlendState blendState = BlendState.alphaBlend, DepthStencilState depthStencilState = DepthStencilState.depthRead, Matrix4? transformMatrix}) → 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.
bindShader(dynamic shader, ShaderBuffer buffer) → void
Bind a shader with the given buffer.
bindSurface(Surface surface) → void
Bind a surface.
bindTexture(dynamic shader, String name, Texture texture) → void
bindUniform(dynamic shader, String name, ByteData data) → void
Bind a uniform slot of name with the data on the shader.
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
setViewModel(Matrix4 mvp) → void
toString() String
A string representation of this object.
inherited

Operators

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