Type of sprites
Module OgamlGraphics.Sprite
Creation and manipulation of 2D sprites
Creates a sprite.
Draws a sprite on a window using the given parameters.
See : OgamlGraphics.DrawParameter
See : OgamlGraphics.Window
parameters
defaults to DrawParameter.make ~depth_test:false ~blend_mode:DrawParameter.BlendMode.alpha
See : OgamlGraphics.DrawParameter
See : OgamlGraphics.Window
Sets the position of the origin of the sprite in the window.
Sets the position of the origin with respect to the top-left corner of the sprite. The origin is the center of all transformations.
Sets the angle of rotation of the sprite.
Sets the scale of the sprite.
Sets the base size of a sprite.
Sets the color of a sprite.
Translates the sprite by the given vector.
Rotates the sprite by the given angle.
Scales the sprite.
Returns the base size of a sprite
Returns the position of the origin in window coordinates.
Returns the position of the origin with respect to the first point of the sprite.
Returns the angle of rotation of the sprite.
Returns the color of a sprite.
Returns the scale of the sprite.
Vertex array access
Outputs a sprite to a vertex array source.
This outputs two triangles with UV coordinates and position attributes.
Use DrawMode.Triangles with this source.
This outputs two triangles with UV coordinates and position attributes.
Use DrawMode.Triangles with this source.
Outputs a sprite to a vertex array source by mapping its vertices.
See
See
to_source
for more information.