Class WGLARBMakeCurrentRead
- java.lang.Object
-
- org.lwjgl.opengl.WGLARBMakeCurrentRead
-
public class WGLARBMakeCurrentRead extends java.lang.Object
Native bindings to the WGL_ARB_make_current_read extension.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
.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB
ERROR_INVALID_PIXEL_TYPE_ARBNew errors returned byWinBase.GetLastError()
.
-
Method Summary
All Methods Static Methods Concrete Methods 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 contexthglrc
with the devicedrawDC
for draws and the devicereadDC
for reads.
-
-
-
Field Detail
-
ERROR_INVALID_PIXEL_TYPE_ARB, ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB
New errors returned byWinBase.GetLastError()
.
-
-
Method Detail
-
wglMakeContextCurrentARB
public static boolean wglMakeContextCurrentARB(long drawDC, long readDC, long hglrc)
Associates the contexthglrc
with the devicedrawDC
for draws and the devicereadDC
for reads. All subsequent OpenGL calls made by the calling thread are drawn on the device identified bydrawDC
and read on the device identified byreadDC
.The
drawDC
andreadDC
parameters must refer to drawing surfaces supported by OpenGL. These parameters need not be the samehdc
that was passed toCreateContext
whenhglrc
was created.drawDC
must have the same pixel format and be created on the same physical device as thehdc
that was passed into wglCreateContext.readDC
must be created on the same device as thehdc
that was passed to wglCreateContext and it must support the same pixel type as the pixel format of thehdc
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:- Any pixel data that are sourced based on the value of
READ_BUFFER
. Note, that accumulation operations use the value ofREAD_BUFFER
, but are not allowed when a different device context is used for reads. In this case, the accumulation operation will generateINVALID_OPERATION
. - Any depth values that are retrieved by
ReadPixels
,CopyPixels
, or any OpenGL extension that sources depth images from the frame buffer in the manner ofReadPixels
andCopyPixels
. - Any stencil values that are retrieved by
ReadPixels
,CopyPixels
, or any OpenGL extension that sources stencil images from the framebuffer in the manner ofReadPixels
andCopyPixels
.
These frame buffer values are taken from the surface associated with the device context specified by
readDC
.- Parameters:
drawDC
- the "draw" device contextreadDC
- the "read" device contexthglrc
- the OpenGL context
- Any pixel data that are sourced based on the value of
-
wglGetCurrentReadDCARB
public static long wglGetCurrentReadDCARB()
Returns the "read" device context for the current OpenGL context.
-
-