Package org.lwjgl.bgfx
Class BGFXResolution
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXResolution
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXResolution extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Backbuffer resolution and reset parameters.Member documentation
format
– backbuffer formatwidth
– backbuffer widthheight
– backbuffer heightreset
– reset parametersnumBackBuffers
– number of back buffersmaxFrameLatency
– maximum frame latency
Layout
struct bgfx_resolution_t { bgfx_texture_format_t format; uint32_t width; uint32_t height; uint32_t reset; uint8_t numBackBuffers; uint8_t maxFrameLatency; }
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
FORMAT
HEIGHT
MAXFRAMELATENCY
NUMBACKBUFFERS
RESETThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
WIDTH
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description BGFXResolution(java.nio.ByteBuffer container)
Creates aBGFXResolution
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BGFXResolution
calloc()
Returns a newBGFXResolution
instance allocated withmemCalloc
.static BGFXResolution
callocStack()
Returns a newBGFXResolution
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXResolution
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXResolution
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXResolution
create()
Returns a newBGFXResolution
instance allocated withBufferUtils
.static BGFXResolution
create(long address)
Returns a newBGFXResolution
instance for the specified memory address.static BGFXResolution
createSafe(long address)
int
format()
Returns the value of theformat
field.BGFXResolution
format(int value)
Sets the specified value to theformat
field.int
height()
Returns the value of theheight
field.BGFXResolution
height(int value)
Sets the specified value to theheight
field.static BGFXResolution
malloc()
Returns a newBGFXResolution
instance allocated withmemAlloc
.static BGFXResolution
mallocStack()
Returns a newBGFXResolution
instance allocated on the thread-localMemoryStack
.static BGFXResolution
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXResolution
instance allocated on the specifiedMemoryStack
.byte
maxFrameLatency()
Returns the value of themaxFrameLatency
field.BGFXResolution
maxFrameLatency(byte value)
Sets the specified value to themaxFrameLatency
field.static int
nformat(long struct)
Unsafe version offormat()
.static void
nformat(long struct, int value)
Unsafe version offormat
.static int
nheight(long struct)
Unsafe version ofheight()
.static void
nheight(long struct, int value)
Unsafe version ofheight
.static byte
nmaxFrameLatency(long struct)
Unsafe version ofmaxFrameLatency()
.static void
nmaxFrameLatency(long struct, byte value)
Unsafe version ofmaxFrameLatency
.static byte
nnumBackBuffers(long struct)
Unsafe version ofnumBackBuffers()
.static void
nnumBackBuffers(long struct, byte value)
Unsafe version ofnumBackBuffers
.static int
nreset(long struct)
Unsafe version ofreset()
.static void
nreset(long struct, int value)
Unsafe version ofreset
.byte
numBackBuffers()
Returns the value of thenumBackBuffers
field.BGFXResolution
numBackBuffers(byte value)
Sets the specified value to thenumBackBuffers
field.static int
nwidth(long struct)
Unsafe version ofwidth()
.static void
nwidth(long struct, int value)
Unsafe version ofwidth
.int
reset()
Returns the value of thereset
field.BGFXResolution
reset(int value)
Sets the specified value to thereset
field.BGFXResolution
set(int format, int width, int height, int reset, byte numBackBuffers, byte maxFrameLatency)
Initializes this struct with the specified values.BGFXResolution
set(BGFXResolution src)
Copies the specified struct data to this struct.int
sizeof()
int
width()
Returns the value of thewidth
field.BGFXResolution
width(int value)
Sets the specified value to thewidth
field.
-
-
-
Constructor Detail
-
BGFXResolution
public BGFXResolution(java.nio.ByteBuffer container)
Creates aBGFXResolution
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
format
public int format()
Returns the value of theformat
field.
-
width
public int width()
Returns the value of thewidth
field.
-
height
public int height()
Returns the value of theheight
field.
-
reset
public int reset()
Returns the value of thereset
field.
-
numBackBuffers
public byte numBackBuffers()
Returns the value of thenumBackBuffers
field.
-
maxFrameLatency
public byte maxFrameLatency()
Returns the value of themaxFrameLatency
field.
-
format
public BGFXResolution format(int value)
Sets the specified value to theformat
field.
-
width
public BGFXResolution width(int value)
Sets the specified value to thewidth
field.
-
height
public BGFXResolution height(int value)
Sets the specified value to theheight
field.
-
reset
public BGFXResolution reset(int value)
Sets the specified value to thereset
field.
-
numBackBuffers
public BGFXResolution numBackBuffers(byte value)
Sets the specified value to thenumBackBuffers
field.
-
maxFrameLatency
public BGFXResolution maxFrameLatency(byte value)
Sets the specified value to themaxFrameLatency
field.
-
set
public BGFXResolution set(int format, int width, int height, int reset, byte numBackBuffers, byte maxFrameLatency)
Initializes this struct with the specified values.
-
set
public BGFXResolution set(BGFXResolution src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXResolution malloc()
Returns a newBGFXResolution
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXResolution calloc()
Returns a newBGFXResolution
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXResolution create()
Returns a newBGFXResolution
instance allocated withBufferUtils
.
-
create
public static BGFXResolution create(long address)
Returns a newBGFXResolution
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXResolution createSafe(long address)
-
mallocStack
public static BGFXResolution mallocStack()
Returns a newBGFXResolution
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXResolution callocStack()
Returns a newBGFXResolution
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXResolution mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXResolution
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXResolution callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXResolution
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
nformat
public static int nformat(long struct)
Unsafe version offormat()
.
-
nwidth
public static int nwidth(long struct)
Unsafe version ofwidth()
.
-
nheight
public static int nheight(long struct)
Unsafe version ofheight()
.
-
nreset
public static int nreset(long struct)
Unsafe version ofreset()
.
-
nnumBackBuffers
public static byte nnumBackBuffers(long struct)
Unsafe version ofnumBackBuffers()
.
-
nmaxFrameLatency
public static byte nmaxFrameLatency(long struct)
Unsafe version ofmaxFrameLatency()
.
-
nformat
public static void nformat(long struct, int value)
Unsafe version offormat
.
-
nwidth
public static void nwidth(long struct, int value)
Unsafe version ofwidth
.
-
nheight
public static void nheight(long struct, int value)
Unsafe version ofheight
.
-
nreset
public static void nreset(long struct, int value)
Unsafe version ofreset
.
-
nnumBackBuffers
public static void nnumBackBuffers(long struct, byte value)
Unsafe version ofnumBackBuffers
.
-
nmaxFrameLatency
public static void nmaxFrameLatency(long struct, byte value)
Unsafe version ofmaxFrameLatency
.
-
-