Struct Vertex

D struct that wraps SDL_Vertex (from SDL 2.0.18) containing 2D vertex information

struct Vertex ;

dsdl2.Vertex stores the position of the vertex, color modulation (as well as alpha), and mapped texture texCoordinate.

Constructors

NameDescription
this (sdlVertex) Constructs a dsdl2.Vertex from a vanilla SDL_Vertex from bindbc-sdl
this (position, color, texCoord) Constructs a dsdl2.Vertex by feeding in the position, color, and texture coordinate

Fields

NameTypeDescription
sdlVertex sdl.render.SDL_VertexInternal SDL_Vertex struct

Properties

NameTypeDescription
color[get] inout(Color)Proxy to the color of the dsdl2.Vertex
position[get] inout(FPoint)Proxy to the position of the dsdl2.Vertex
texCoord[get] inout(FPoint)Proxy to the texture coordinate of the dsdl2.Vertex
texX[get] inout(float)Proxy to the X texture coordinate of the dsdl2.Vertex
texY[get] inout(float)Proxy to the Y texture coordinate of the dsdl2.Vertex
x[get] inout(float)Proxy to the X position of the dsdl2.Vertex
y[get] inout(float)Proxy to the Y position of the dsdl2.Vertex

Methods

NameDescription
toString () Formats the dsdl2.Vertex into its construction representation: "dsdl2.Vertex(<position>, <color>, <texCoord>)"