public class WGLARBMakeCurrentRead
extends java.lang.Object
The association of a separate "read" and "draw" DC with the current context allows for preprocessing of image data in an "off screen" DC which is then read into a visible DC for final display.
Requires WGL_ARB_extensions_string.
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB
New errors returned by
WinBase.GetLastError(). |
static int |
ERROR_INVALID_PIXEL_TYPE_ARB
New errors returned by
WinBase.GetLastError(). |
| Modifier and Type | Method and Description |
|---|---|
static long |
wglGetCurrentReadDCARB()
Returns the "read" device context for the current OpenGL context.
|
static boolean |
wglMakeContextCurrentARB(long drawDC,
long readDC,
long hglrc)
Associates the context
hglrc with the device drawDC for draws and the device readDC for reads. |
public static final int ERROR_INVALID_PIXEL_TYPE_ARB
WinBase.GetLastError().public static final int ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB
WinBase.GetLastError().public static boolean wglMakeContextCurrentARB(long drawDC,
long readDC,
long hglrc)
hglrc with the device drawDC for draws and the device readDC for reads. All subsequent OpenGL calls made
by the calling thread are drawn on the device identified by drawDC and read on the device identified by readDC.
The drawDC and readDC parameters must refer to drawing surfaces supported by OpenGL. These parameters need not be the same hdc
that was passed to CreateContext when hglrc was created. drawDC must have the same pixel format and be created on the same
physical device as the hdc that was passed into wglCreateContext. readDC must be created on the same device as the hdc that was
passed to wglCreateContext and it must support the same pixel type as the pixel format of the hdc that was passed to wglCreateContext.
If wglMakeContextCurrentARB is used to associate a different device for reads than for draws, the "read" device will be used for the following
OpenGL operations:
READ_BUFFER. Note, that accumulation operations use the value of READ_BUFFER, but
are not allowed when a different device context is used for reads. In this case, the accumulation operation will generate INVALID_OPERATION.ReadPixels, CopyPixels, or any OpenGL extension that sources depth images from the frame buffer in the
manner of ReadPixels and CopyPixels.ReadPixels, CopyPixels, or any OpenGL extension that sources stencil images from the
framebuffer in the manner of ReadPixels and CopyPixels.These frame buffer values are taken from the surface associated with the device context specified by readDC.
drawDC - the "draw" device contextreadDC - the "read" device contexthglrc - the OpenGL contextpublic static long wglGetCurrentReadDCARB()
Copyright LWJGL. All Rights Reserved. License terms.