SDL Wiki
(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_Vertex

Vertex structure

Header File

Defined in [SDL_render.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_render.h), but apps should _only_ `#include "SDL.h"`!

Syntax

typedef struct SDL_Vertex
{
    SDL_FPoint position;        /**< Vertex position, in SDL_Renderer coordinates  */
    SDL_Color  color;           /**< Vertex color */
    SDL_FPoint tex_coord;       /**< Normalized texture coordinates, if needed */
} SDL_Vertex;

Data Fields

SDL_FPoint

position

Vertex position, in SDL_Renderer coordinates

SDL_Color

color

Vertex color

SDL_FPoint

tex_coord

Normalized texture coordinates, if needed (Range from 0 to 1, i.ie for a 64x64px texture, beginning at 32x32px will be entered as 0.5,0,5)

SDL_FPoint
SDL_Color

CategoryAPI, CategoryAPIStruct, CategoryStruct


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.