java.lang.Object
overrungl.Pointer
overrungl.Struct
overrungl.glfw.GLFWVidMode
- All Implemented Interfaces:
Addressable
- Direct Known Subclasses:
GLFWVidMode.Buffer
GLFWVidMode relies on preview features of the Java platform:
GLFWVidModerefers to one or more preview APIs:MemoryLayout,MemorySegment,SegmentAllocator,StructLayout.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
This describes a single video mode.
Layout
struct GLFWvidmode {
int width();
int height();
int redBits();
int greenBits();
int blueBits();
int refreshRate();
}- Since:
- 0.1.0
- Author:
- squid233
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis describes video modes.static final recordThe immutable state ofGLFWVidMode. -
Field Summary
FieldsFields inherited from class overrungl.Pointer
address, allocator, managedSegment -
Constructor Summary
ConstructorsModifierConstructorDescriptionGLFWVidMode(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator) Create aGLFWvidmodeinstance.protectedGLFWVidMode(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, MemoryLayoutPREVIEW layout) Creates a struct instance with the given memory layout. -
Method Summary
Modifier and TypeMethodDescriptionintblueBits()Returns the bit depth of the blue channel of the video mode.static GLFWVidModecreate(SegmentAllocatorPREVIEW allocator) Creates aGLFWVidModeinstance with the given allocator.static GLFWVidMode.Buffercreate(SegmentAllocatorPREVIEW allocator, long count) Creates aGLFWVidMode.Bufferinstance with the given allocator and count.intReturns the bit depth of the green channel of the video mode.intheight()Returns the height, in screen coordinates, of the video mode.intredBits()Returns the bit depth of the red channel of the video mode.intReturns the refresh rate, in Hz, of the video mode.value()Returns an immutable state of this struct.intwidth()Returns the width, in screen coordinates, of the video mode.
-
Field Details
-
LAYOUT
The struct layout.
-
-
Constructor Details
-
GLFWVidMode
Create aGLFWvidmodeinstance.- Parameters:
address- the address.allocator- the allocator of this address.
-
GLFWVidMode
protected GLFWVidMode(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, MemoryLayoutPREVIEW layout) Creates a struct instance with the given memory layout.- Parameters:
address- the address.allocator- the allocator of this address.layout- the memory layout of this struct.
-
-
Method Details
-
create
Creates aGLFWVidModeinstance with the given allocator.- Parameters:
allocator- the allocator- Returns:
- the instance
-
create
Creates aGLFWVidMode.Bufferinstance with the given allocator and count.- Parameters:
allocator- the allocatorcount- the count- Returns:
- the instance
-
value
Returns an immutable state of this struct.- Returns:
- an immutable state of this struct
-
width
public int width()Returns the width, in screen coordinates, of the video mode.- Returns:
- the width, in screen coordinates, of the video mode
-
height
public int height()Returns the height, in screen coordinates, of the video mode.- Returns:
- the height, in screen coordinates, of the video mode
-
redBits
public int redBits()Returns the bit depth of the red channel of the video mode.- Returns:
- the bit depth of the red channel of the video mode
-
greenBits
public int greenBits()Returns the bit depth of the green channel of the video mode.- Returns:
- the bit depth of the green channel of the video mode
-
blueBits
public int blueBits()Returns the bit depth of the blue channel of the video mode.- Returns:
- the bit depth of the blue channel of the video mode
-
refreshRate
public int refreshRate()Returns the refresh rate, in Hz, of the video mode.- Returns:
- the refresh rate, in Hz, of the video mode
-
GLFWVidModewhen preview features are enabled.