Package org.lwjgl.sdl
Class SDL_Vertex
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SDL_Vertex {
SDL_FPoint position;
SDL_FColor color;
SDL_FPoint tex_coord;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSDL_Vertex(ByteBuffer container) Creates aSDL_Vertexinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_Vertexcalloc()Returns a newSDL_Vertexinstance allocated withmemCalloc.static SDL_Vertex.Buffercalloc(int capacity) Returns a newSDL_Vertex.Bufferinstance allocated withmemCalloc.static SDL_Vertex.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_Vertex.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_Vertexcalloc(MemoryStack stack) Returns a newSDL_Vertexinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.color()color(Consumer<SDL_FColor> consumer) Passes thecolorfield to the specifiedConsumer.color(SDL_FColor value) Copies the specifiedSDL_FColorto thecolorfield.static SDL_Vertexcreate()Returns a newSDL_Vertexinstance allocated withBufferUtils.static SDL_Vertex.Buffercreate(int capacity) Returns a newSDL_Vertex.Bufferinstance allocated withBufferUtils.static SDL_Vertexcreate(long address) Returns a newSDL_Vertexinstance for the specified memory address.static SDL_Vertex.Buffercreate(long address, int capacity) Create aSDL_Vertex.Bufferinstance at the specified memory.static @Nullable SDL_VertexcreateSafe(long address) static @Nullable SDL_Vertex.BuffercreateSafe(long address, int capacity) static SDL_Vertexmalloc()Returns a newSDL_Vertexinstance allocated withmemAlloc.static SDL_Vertex.Buffermalloc(int capacity) Returns a newSDL_Vertex.Bufferinstance allocated withmemAlloc.static SDL_Vertex.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_Vertex.Bufferinstance allocated on the specifiedMemoryStack.static SDL_Vertexmalloc(MemoryStack stack) Returns a newSDL_Vertexinstance allocated on the specifiedMemoryStack.static SDL_FColorncolor(long struct) Unsafe version ofcolor().static voidncolor(long struct, SDL_FColor value) Unsafe version ofcolor.static SDL_FPointnposition$(long struct) Unsafe version ofposition$().static voidnposition$(long struct, SDL_FPoint value) Unsafe version ofposition$.static SDL_FPointntex_coord(long struct) Unsafe version oftex_coord().static voidntex_coord(long struct, SDL_FPoint value) Unsafe version oftex_coord.position$(Consumer<SDL_FPoint> consumer) Passes thepositionfield to the specifiedConsumer.position$(SDL_FPoint value) Copies the specifiedSDL_FPointto thepositionfield.set(SDL_FPoint position$, SDL_FColor color, SDL_FPoint tex_coord) Initializes this struct with the specified values.set(SDL_Vertex src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).tex_coord(Consumer<SDL_FPoint> consumer) Passes thetex_coordfield to the specifiedConsumer.tex_coord(SDL_FPoint value) Copies the specifiedSDL_FPointto thetex_coordfield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
POSITION
public static final int POSITIONThe struct member offsets. -
COLOR
public static final int COLORThe struct member offsets. -
TEX_COORD
public static final int TEX_COORDThe struct member offsets.
-
-
Constructor Details
-
SDL_Vertex
Creates aSDL_Vertexinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SDL_Vertex>
-
position$
- Returns:
- a
SDL_FPointview of thepositionfield.
-
color
- Returns:
- a
SDL_FColorview of thecolorfield.
-
tex_coord
- Returns:
- a
SDL_FPointview of thetex_coordfield.
-
position$
Copies the specifiedSDL_FPointto thepositionfield. -
position$
Passes thepositionfield to the specifiedConsumer. -
color
Copies the specifiedSDL_FColorto thecolorfield. -
color
Passes thecolorfield to the specifiedConsumer. -
tex_coord
Copies the specifiedSDL_FPointto thetex_coordfield. -
tex_coord
Passes thetex_coordfield to the specifiedConsumer. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_Vertexinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_Vertexinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_Vertexinstance allocated withBufferUtils. -
create
Returns a newSDL_Vertexinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_Vertex.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_Vertex.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_Vertex.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_Vertex.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_Vertexinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_Vertexinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_Vertex.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_Vertex.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nposition$
Unsafe version ofposition$(). -
ncolor
Unsafe version ofcolor(). -
ntex_coord
Unsafe version oftex_coord(). -
nposition$
Unsafe version ofposition$. -
ncolor
Unsafe version ofcolor. -
ntex_coord
Unsafe version oftex_coord.
-