Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class WGLARBMakeCurrentRead

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

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

Modifier and TypeField and Description
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
wglGetCurrentReadDCARB()

Returns the "read" device context for the current OpenGL context.

public static boolean
wglMakeContextCurrentARB(long
the "draw" device context
drawDC
,
long
the "read" device context
readDC
,
long
the OpenGL context
hglrc
)

Associates the context hglrc with the device drawDC for draws and the device readDC for reads.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARBback to summary
public static final int ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB

New errors returned by org.lwjgl.system.windows.WinBase#GetLastError.

ERROR_INVALID_PIXEL_TYPE_ARBback to summary
public static final int ERROR_INVALID_PIXEL_TYPE_ARB

New errors returned by org.lwjgl.system.windows.WinBase#GetLastError.

Constructor Detail

WGLARBMakeCurrentReadback to summary
protected WGLARBMakeCurrentRead()

Method Detail

wglGetCurrentReadDCARBback to summary
public static long wglGetCurrentReadDCARB()

Returns the "read" device context for the current OpenGL context.

Annotations
@NativeType:HDC
wglMakeContextCurrentARBback to summary
public 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. 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:

  1. Any pixel data that are sourced based on the value of 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.
  2. Any depth values that are retrieved by ReadPixels, CopyPixels, or any OpenGL extension that sources depth images from the frame buffer in the manner of ReadPixels and CopyPixels.
  3. Any stencil values that are retrieved by 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.

Parameters
drawDC:long

the "draw" device context

readDC:long

the "read" device context

hglrc:long

the OpenGL context

Annotations
@NativeType:BOOL