Expand description
The shape module contains structs and functions for drawing simple 2D
shapes to the screen.
Each shape instance will create a new VertexBuffer which need to
individually be sent to the GPU. For that reason, this module should only
be used for prototyping and applications where performance isn’t important.
Structs§
- Rectangle
- The
Rectanglestruct represents any 3 points in the 2d plane. Each point (vertex) is made up of: - Triangle
- The
Trianglestruct represents any 3 points in the 2d plane. Each point (vertex) is made up of:
Functions§
- shader_
2d - This function simply compiles and returns a
ShaderProgramwhich will be compatible with all shapes in this module.