JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.VisualIDHolder Interface Reference

Visual ID holder interface. More...

Inheritance diagram for com.jogamp.nativewindow.VisualIDHolder:
Collaboration diagram for com.jogamp.nativewindow.VisualIDHolder:

Classes

class  VIDComparator
 Comparing VIDType#NATIVE. More...
 
enum  VIDType
 

Public Member Functions

int getVisualID (VIDType type) throws NativeWindowException
 Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported. More...
 
boolean isVisualIDSupported (VIDType type)
 Returns true if the given VIDType is supported, otherwise false. More...
 

Static Public Attributes

static final int VID_UNDEFINED = 0
 getVisualID(VIDType) result indicating an undefined value, which could be cause by an unsupported query. More...
 

Detailed Description

Visual ID holder interface.

Allows queries of different types of native visual IDs, see getVisualID(int).

Definition at line 40 of file VisualIDHolder.java.

Member Function Documentation

◆ getVisualID()

int com.jogamp.nativewindow.VisualIDHolder.getVisualID ( VIDType  type) throws NativeWindowException

Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.

Depending on the native windowing system, type is handled as follows:

  • X11 throws NativeWindowException on EGL_CONFIG, WIN32_PFD
    • INTRINSIC: X11 XVisual ID
    • NATIVE: X11 XVisual ID
    • X11_XVISUAL: X11 XVisual ID
    • X11_FBCONFIG: VID_UNDEFINED
  • X11/GL throws NativeWindowException on EGL_CONFIG, WIN32_PFD
    • INTRINSIC: X11 XVisual ID
    • NATIVE: X11 XVisual ID
    • X11_XVISUAL: X11 XVisual ID
    • X11_FBCONFIG: X11 FBConfig ID or VID_UNDEFINED
  • Windows/GL throws NativeWindowException on EGL_CONFIG, X11_XVISUAL, X11_FBCONFIG
    • INTRINSIC: Win32 PIXELFORMATDESCRIPTOR ID
    • NATIVE: Win32 PIXELFORMATDESCRIPTOR ID
    • WIN32_PFD: Win32 PIXELFORMATDESCRIPTOR ID
  • EGL/GL throws NativeWindowException on X11_XVISUAL, X11_FBCONFIG, WIN32_PFD
    • INTRINSIC: EGL Config ID
    • NATIVE: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)
    • EGL_CONFIG: EGL Config ID

One may use isVisualIDSupported(VIDType) to test upfront whether a VIDType is supported, e.g. to avoid an exception or query or compare all available.

Note: INTRINSIC and NATIVE are always handled, but may result in VID_UNDEFINED. The latter is true if the native value are actually undefined or the corresponding object is not mapped to a native visual object.

Exceptions
NativeWindowExceptionif type is neither INTRINSIC nor NATIVE and does not match the native implementation.
See also
isVisualIDSupported(VIDType)

Implemented in com.jogamp.nativewindow.Capabilities, and com.jogamp.nativewindow.DefaultGraphicsConfiguration.

Here is the caller graph for this function:

◆ isVisualIDSupported()

boolean com.jogamp.nativewindow.VisualIDHolder.isVisualIDSupported ( VIDType  type)

Returns true if the given VIDType is supported, otherwise false.

Note: INTRINSIC and NATIVE are always handled, but may result in VID_UNDEFINED. The latter is true if the native value are actually undefined or the corresponding object is not mapped to a native visual object.

See also
getVisualID(VIDType)

Implemented in com.jogamp.nativewindow.Capabilities, and com.jogamp.nativewindow.DefaultGraphicsConfiguration.

Here is the caller graph for this function:

Member Data Documentation

◆ VID_UNDEFINED

final int com.jogamp.nativewindow.VisualIDHolder.VID_UNDEFINED = 0
static

getVisualID(VIDType) result indicating an undefined value, which could be cause by an unsupported query.

We assume the const value 0 doesn't reflect a valid native visual ID and is interpreted as no value on all platforms. This is currently true for Android, X11 and Windows.

Definition at line 131 of file VisualIDHolder.java.


The documentation for this interface was generated from the following file: