public class WGLNVGPUAffinity
extends java.lang.Object
On systems with more than one GPU it is desirable to be able to select which GPU(s) in the system become the target for OpenGL rendering commands. This extension introduces the concept of a GPU affinity mask. OpenGL rendering commands are directed to the GPU(s) specified by the affinity mask. GPU affinity is immutable. Once set, it cannot be changed.
This extension also introduces the concept called affinity-DC. An affinity-DC is a device context with a GPU affinity mask embedded in it. This restricts the device context to only allow OpenGL commands to be sent to the GPU(s) in the affinity mask.
Requires WGL_ARB_extensions_string.
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV
New error code set by wglShareLists, wglMakeCurrent and
MakeContextCurrentARB. |
static int |
ERROR_MISSING_AFFINITY_MASK_NV
New error code set by
MakeCurrent and MakeContextCurrentARB. |
| Modifier and Type | Method and Description |
|---|---|
static long |
nwglCreateAffinityDCNV(long gpuList)
Unsafe version of:
CreateAffinityDCNV |
static int |
nwglEnumGpuDevicesNV(long gpu,
int deviceIndex,
long gpuDevice)
Unsafe version of:
EnumGpuDevicesNV |
static int |
nwglEnumGpusFromAffinityDCNV(long affinityDC,
int gpuIndex,
long gpu)
Unsafe version of:
EnumGpusFromAffinityDCNV |
static int |
nwglEnumGpusNV(int gpuIndex,
long gpu)
Unsafe version of:
EnumGpusNV |
static long |
wglCreateAffinityDCNV(org.lwjgl.PointerBuffer gpuList)
Creates an affinity-DC.
|
static boolean |
wglDeleteDCNV(long hdc)
Deletes an affinity-DC.
|
static boolean |
wglEnumGpuDevicesNV(long gpu,
int deviceIndex,
GPU_DEVICE gpuDevice)
Retrieve information about the display devices supported by a GPU.
|
static boolean |
wglEnumGpusFromAffinityDCNV(long affinityDC,
int gpuIndex,
org.lwjgl.PointerBuffer gpu)
Retrieves a list of GPU handles that make up the affinity-mask of an affinity-DC.
|
static boolean |
wglEnumGpusNV(int gpuIndex,
org.lwjgl.PointerBuffer gpu)
Returns the handles for all GPUs in a system.
|
public static final int ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV
MakeContextCurrentARB.public static final int ERROR_MISSING_AFFINITY_MASK_NV
MakeCurrent and MakeContextCurrentARB.public static int nwglEnumGpusNV(int gpuIndex,
long gpu)
EnumGpusNVpublic static boolean wglEnumGpusNV(int gpuIndex,
org.lwjgl.PointerBuffer gpu)
By looping over wglEnumGpusNV and incrementing gpuIndex, starting at index 0, all GPU handles can be queried. If the function succeeds,
the return value is TRUE. If the function fails, the return value is FALSE and gpu will be unmodified. The function fails if gpuIndex is
greater or equal than the number of GPUs supported by the system.
gpuIndex - an index value that specifies a GPUgpu - returns a handle for GPU number gpuIndex. The first GPU will be index 0.public static int nwglEnumGpuDevicesNV(long gpu,
int deviceIndex,
long gpuDevice)
EnumGpuDevicesNVpublic static boolean wglEnumGpuDevicesNV(long gpu,
int deviceIndex,
GPU_DEVICE gpuDevice)
gpu - a handle to the GPU to querydeviceIndex - an index value that specifies a display device, supported by gpu, to query. The first display device will be index 0.gpuDevice - a GPU_DEVICE structure which will receive information about the display device at index deviceIndex.public static long nwglCreateAffinityDCNV(long gpuList)
CreateAffinityDCNVpublic static long wglCreateAffinityDCNV(org.lwjgl.PointerBuffer gpuList)
wglCreateAffinityDCNV and also indirectly by calling
CreatePbufferARB followed by GetPbufferDCARB.
If successful, the function returns an affinity-DC handle. If it fails, NULL will be returned.
gpuList - a NULL-terminated array of GPU handles to which the affinity-DC will be restrictedpublic static int nwglEnumGpusFromAffinityDCNV(long affinityDC,
int gpuIndex,
long gpu)
EnumGpusFromAffinityDCNVpublic static boolean wglEnumGpusFromAffinityDCNV(long affinityDC,
int gpuIndex,
org.lwjgl.PointerBuffer gpu)
By looping over wglEnumGpusFromAffinityDCNV and incrementing gpuIndex, starting at index 0, all GPU handles associated with the DC can
be queried. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE and gpu will be unmodified. The
function fails if gpuIndex is greater or equal than the number of GPUs associated with affinityDC.
affinityDC - a handle of the affinity-DC to querygpuIndex - an index value of the GPU handle in the affinity mask of affinityDC to querygpu - returns a handle for GPU number gpuIndex. The first GPU will be at index 0.public static boolean wglDeleteDCNV(long hdc)
hdc - a handle of an affinity-DC to deleteCopyright LWJGL. All Rights Reserved. License terms.