struct

Tryst::SDL::Vertex

Inherits Struct < Value < Object

One corner of a triangle passed to Renderer#draw_geometry: where it is, what colour it is, and (only for a textured call) where in the texture it samples from. tex_coord defaults to the origin so a flat-coloured, untextured caller never has to touch it.

Constructors

new(position : Point, color : Color, tex_coord : Point = Point.new(0, 0))
Source

Instance methods

clone
Source
color
copy_with(position _position = @position, color _color = @color, tex_coord _tex_coord = @tex_coord)
Source
position
tex_coord
to_unsafe
Source