Package org.lwjgl.sdl
Class SDL_Vertex
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct SDL_Vertex {
{@link SDL_FPoint SDL_FPoint} position;
{@link SDL_FColor SDL_FColor} color;
{@link SDL_FPoint SDL_FPoint} tex_coord;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The 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_Vertex
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_Vertex
calloc()
Returns a newSDL_Vertex
instance allocated withmemCalloc
.static SDL_Vertex.Buffer
calloc
(int capacity) Returns a newSDL_Vertex.Buffer
instance allocated withmemCalloc
.static SDL_Vertex.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_Vertex.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_Vertex
calloc
(MemoryStack stack) Returns a newSDL_Vertex
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.color()
color
(Consumer<SDL_FColor> consumer) Passes thecolor
field to the specifiedConsumer
.color
(SDL_FColor value) Copies the specifiedSDL_FColor
to thecolor
field.static SDL_Vertex
create()
Returns a newSDL_Vertex
instance allocated withBufferUtils
.static SDL_Vertex.Buffer
create
(int capacity) Returns a newSDL_Vertex.Buffer
instance allocated withBufferUtils
.static SDL_Vertex
create
(long address) Returns a newSDL_Vertex
instance for the specified memory address.static SDL_Vertex.Buffer
create
(long address, int capacity) Create aSDL_Vertex.Buffer
instance at the specified memory.static @Nullable SDL_Vertex
createSafe
(long address) static @Nullable SDL_Vertex.Buffer
createSafe
(long address, int capacity) static SDL_Vertex
malloc()
Returns a newSDL_Vertex
instance allocated withmemAlloc
.static SDL_Vertex.Buffer
malloc
(int capacity) Returns a newSDL_Vertex.Buffer
instance allocated withmemAlloc
.static SDL_Vertex.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_Vertex.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_Vertex
malloc
(MemoryStack stack) Returns a newSDL_Vertex
instance allocated on the specifiedMemoryStack
.static SDL_FColor
ncolor
(long struct) Unsafe version ofcolor()
.static void
ncolor
(long struct, SDL_FColor value) Unsafe version ofcolor
.static SDL_FPoint
nposition$
(long struct) Unsafe version ofposition$()
.static void
nposition$
(long struct, SDL_FPoint value) Unsafe version ofposition$
.static SDL_FPoint
ntex_coord
(long struct) Unsafe version oftex_coord()
.static void
ntex_coord
(long struct, SDL_FPoint value) Unsafe version oftex_coord
.position$
(Consumer<SDL_FPoint> consumer) Passes theposition
field to the specifiedConsumer
.position$
(SDL_FPoint value) Copies the specifiedSDL_FPoint
to theposition
field.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.int
sizeof()
Returnssizeof(struct)
.tex_coord
(Consumer<SDL_FPoint> consumer) Passes thetex_coord
field to the specifiedConsumer
.tex_coord
(SDL_FPoint value) Copies the specifiedSDL_FPoint
to thetex_coord
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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_Vertex
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<SDL_Vertex>
-
position$
- Returns:
- a
SDL_FPoint
view of theposition
field.
-
color
- Returns:
- a
SDL_FColor
view of thecolor
field.
-
tex_coord
- Returns:
- a
SDL_FPoint
view of thetex_coord
field.
-
position$
Copies the specifiedSDL_FPoint
to theposition
field. -
position$
Passes theposition
field to the specifiedConsumer
. -
color
Copies the specifiedSDL_FColor
to thecolor
field. -
color
Passes thecolor
field to the specifiedConsumer
. -
tex_coord
Copies the specifiedSDL_FPoint
to thetex_coord
field. -
tex_coord
Passes thetex_coord
field 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_Vertex
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_Vertex
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_Vertex
instance allocated withBufferUtils
. -
create
Returns a newSDL_Vertex
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_Vertex.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_Vertex.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_Vertex.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_Vertex.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_Vertex
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_Vertex
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_Vertex.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_Vertex.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-