Class WGLNVGPUAffinity
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNew error code set by wglShareLists, wglMakeCurrent andMakeContextCurrentARB.static final intNew error code set byMakeCurrentandMakeContextCurrentARB. -
Method Summary
Modifier and TypeMethodDescriptionstatic longnwglCreateAffinityDCNV(long gpuList) Unsafe version of:CreateAffinityDCNVstatic intnwglEnumGpuDevicesNV(long gpu, int deviceIndex, long gpuDevice) Unsafe version of:EnumGpuDevicesNVstatic intnwglEnumGpusFromAffinityDCNV(long affinityDC, int gpuIndex, long gpu) Unsafe version of:EnumGpusFromAffinityDCNVstatic intnwglEnumGpusNV(int gpuIndex, long gpu) Unsafe version of:EnumGpusNVstatic longwglCreateAffinityDCNV(org.lwjgl.PointerBuffer gpuList) Creates an affinity-DC.static booleanwglDeleteDCNV(long hdc) Deletes an affinity-DC.static booleanwglEnumGpuDevicesNV(long gpu, int deviceIndex, GPU_DEVICE gpuDevice) Retrieve information about the display devices supported by a GPU.static booleanwglEnumGpusFromAffinityDCNV(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 booleanwglEnumGpusNV(int gpuIndex, org.lwjgl.PointerBuffer gpu) Returns the handles for all GPUs in a system.
-
Field Details
-
ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV
public static final int ERROR_INCOMPATIBLE_AFFINITY_MASKS_NVNew error code set by wglShareLists, wglMakeCurrent andMakeContextCurrentARB.- See Also:
-
ERROR_MISSING_AFFINITY_MASK_NV
public static final int ERROR_MISSING_AFFINITY_MASK_NVNew error code set byMakeCurrentandMakeContextCurrentARB.- See Also:
-
-
Method Details
-
nwglEnumGpusNV
public static int nwglEnumGpusNV(int gpuIndex, long gpu) Unsafe version of:EnumGpusNV -
wglEnumGpusNV
public static boolean wglEnumGpusNV(int gpuIndex, org.lwjgl.PointerBuffer gpu) Returns the handles for all GPUs in a system.By looping over
wglEnumGpusNVand incrementinggpuIndex, 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 andgpuwill be unmodified. The function fails ifgpuIndexis greater or equal than the number of GPUs supported by the system.- Parameters:
gpuIndex- an index value that specifies a GPUgpu- returns a handle for GPU numbergpuIndex. The first GPU will be index 0.
-
nwglEnumGpuDevicesNV
public static int nwglEnumGpuDevicesNV(long gpu, int deviceIndex, long gpuDevice) Unsafe version of:EnumGpuDevicesNV -
wglEnumGpuDevicesNV
Retrieve information about the display devices supported by a GPU.- Parameters:
gpu- a handle to the GPU to querydeviceIndex- an index value that specifies a display device, supported bygpu, to query. The first display device will be index 0.gpuDevice- aGPU_DEVICEstructure which will receive information about the display device at indexdeviceIndex.
-
nwglCreateAffinityDCNV
public static long nwglCreateAffinityDCNV(long gpuList) Unsafe version of:CreateAffinityDCNV -
wglCreateAffinityDCNV
public static long wglCreateAffinityDCNV(org.lwjgl.PointerBuffer gpuList) Creates an affinity-DC. Affinity-DCs, a new type of DC, can be used to direct OpenGL commands to a specific GPU or set of GPUs. 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. An affinity-DC can be created directly, using the new functionwglCreateAffinityDCNVand also indirectly by callingCreatePbufferARBfollowed byGetPbufferDCARB.If successful, the function returns an affinity-DC handle. If it fails,
NULLwill be returned.- Parameters:
gpuList- aNULL-terminated array of GPU handles to which the affinity-DC will be restricted
-
nwglEnumGpusFromAffinityDCNV
public static int nwglEnumGpusFromAffinityDCNV(long affinityDC, int gpuIndex, long gpu) Unsafe version of:EnumGpusFromAffinityDCNV -
wglEnumGpusFromAffinityDCNV
public 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.By looping over
wglEnumGpusFromAffinityDCNVand incrementinggpuIndex, 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 andgpuwill be unmodified. The function fails ifgpuIndexis greater or equal than the number of GPUs associated withaffinityDC.- Parameters:
affinityDC- a handle of the affinity-DC to querygpuIndex- an index value of the GPU handle in the affinity mask ofaffinityDCto querygpu- returns a handle for GPU numbergpuIndex. The first GPU will be at index 0.
-
wglDeleteDCNV
public static boolean wglDeleteDCNV(long hdc) Deletes an affinity-DC.- Parameters:
hdc- a handle of an affinity-DC to delete
-