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:
GLFWVidMode
refers 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
Modifier and TypeClassDescriptionstatic class
This describes video modes.static final record
The immutable state ofGLFWVidMode
. -
Field Summary
Fields inherited from class overrungl.Pointer
address, allocator, managedSegment
-
Constructor Summary
ModifierConstructorDescriptionGLFWVidMode
(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator) Create aGLFWvidmode
instance.protected
GLFWVidMode
(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, MemoryLayoutPREVIEW layout) Creates a struct instance with the given memory layout. -
Method Summary
Modifier and TypeMethodDescriptionint
blueBits()
Returns the bit depth of the blue channel of the video mode.static GLFWVidMode
create
(SegmentAllocatorPREVIEW allocator) Creates aGLFWVidMode
instance with the given allocator.static GLFWVidMode.Buffer
create
(SegmentAllocatorPREVIEW allocator, long count) Creates aGLFWVidMode.Buffer
instance with the given allocator and count.int
Returns the bit depth of the green channel of the video mode.int
height()
Returns the height, in screen coordinates, of the video mode.int
redBits()
Returns the bit depth of the red channel of the video mode.int
Returns the refresh rate, in Hz, of the video mode.value()
Returns an immutable state of this struct.int
width()
Returns the width, in screen coordinates, of the video mode.
-
Field Details
-
LAYOUT
The struct layout.
-
-
Constructor Details
-
GLFWVidMode
Create aGLFWvidmode
instance.- 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 aGLFWVidMode
instance with the given allocator.- Parameters:
allocator
- the allocator- Returns:
- the instance
-
create
Creates aGLFWVidMode.Buffer
instance 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
-
GLFWVidMode
when preview features are enabled.