public class ARBES31Compatibility
extends java.lang.Object
This extension adds support for features of OpenGL ES 3.1 that are missing from OpenGL 4.4. Enabling these features will ease the process of porting applications from OpenGL ES 3.1 to OpenGL. Enabling these features will ease the process of porting applications from OpenGL ES 3.1 to OpenGL.
In particular this adds the following features:
MemoryBarrierByRegion API which is potentially more efficient for specific localized memory access patterns.imageAtomicExchange, which performs atomic exchanges on r32f floating point images.gl_HelperInvocation, that identifies whether the current fragment shader input is a helper
invocation. Fragment shader code can use this variable to skip performing operations that are useless or potentially dangerous for helper
invocations.gl_MaxSamples.gl_Max * ImageUniforms,
gl_MaxCombinedShaderOutputResources.mix() to select between int, uint, and bool components.atomic* and imageAtomic* functions.Requires OpenGL 4.4, ARB_ES2_compatibility, ARB_ES3_compatibility. Promoted to core in OpenGL 4.5.
| Modifier and Type | Method and Description |
|---|---|
static void |
glMemoryBarrierByRegion(int barriers)
Behaves like
MemoryBarrier, with two differences: |
public static void glMemoryBarrierByRegion(int barriers)
MemoryBarrier, with two differences:
First, it narrows the region under consideration so that only reads/writes of prior fragment shaders that are invoked for a smaller region of the framebuffer will be completed/reflected prior to subsequent reads/write of following fragment shaders. The size of the region is implementation dependent and may be as small as one framebuffer pixel.
Second, it only applies to memory transactions that may be read by or written by a fragment shader.
When barriers is ALL_BARRIER_BITS, shader memory accesses will be synchronized relative to all these barrier bits, but not to other
barrier bits specific to MemoryBarrier. This implies that reads/writes for scatter/gather-like algorithms may or may not be
completed/reflected after a MemoryBarrierByRegion command. However, for uses such as deferred shading, where a linked list of visible
surfaces with the head at a framebuffer address may be constructed, and the entirety of the list is only dependent on previous executions at that
framebuffer address, MemoryBarrierByRegion may be significantly more efficient than MemoryBarrier.
barriers - the barriers to insert. One or more of:ATOMIC_COUNTER_BARRIER_BIT | FRAMEBUFFER_BARRIER_BIT | SHADER_IMAGE_ACCESS_BARRIER_BIT |
SHADER_STORAGE_BARRIER_BIT | TEXTURE_FETCH_BARRIER_BIT | UNIFORM_BARRIER_BIT |
Copyright LWJGL. All Rights Reserved. License terms.