Systems with integrated GPUs can share the same physical memory between CPU and GPU. This feature, if exposed by API, can bring significant performance benefits for graphics applications by reducing the complexity of uploading/accessing texture contents. This extension enables CPU direct access to the GPU memory holding textures.
The problem with texture memory directly exposed to clients is that textures are often 'tiled'. Texels are kept in specific layout to improve locality of reference and thus performance of texturing. This 'tiling' is specific to particular hardware and would be thus difficult to use.
This extension allows to create textures with 'linear' layout which allows for simplified access on user side (potentially sacrificing some performance during texture sampling).
Requires OpenGL 3..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_LAYOUT_DEFAULT_INTEL
Accepted by the |
| public static final int | GL_LAYOUT_LINEAR_CPU_CACHED_INTEL
Accepted by the |
| public static final int | GL_LAYOUT_LINEAR_INTEL
Accepted by the |
| public static final int | GL_TEXTURE_MEMORY_LAYOUT_INTEL
Accepted by the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | ||
|---|---|---|---|
| private static int | |||
| private static int | |||
| public static ByteBuffer | glMapTexture2DINTEL(int
the texture to map texture, int the mipmap level-of-detail of the texture level, int the type of access that will be performed by the application. One of: access, IntBuffer
returns the distance in bytes between subsequent rows in the texture stride, IntBuffer returns the internal layout of the texture in the graphics memory layout)Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the | ||
| public static ByteBuffer | glMapTexture2DINTEL(int
the texture to map texture, int the mipmap level-of-detail of the texture level, int the type of access that will be performed by the application. One of: access, IntBuffer
returns the distance in bytes between subsequent rows in the texture stride, IntBuffer returns the internal layout of the texture in the graphics memory layout, ByteBuffer old_buffer)Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the | ||
| public static ByteBuffer | glMapTexture2DINTEL(int
the texture to map texture, int the mipmap level-of-detail of the texture level, int the type of access that will be performed by the application. One of: access, IntBuffer
returns the distance in bytes between subsequent rows in the texture stride, IntBuffer returns the internal layout of the texture in the graphics memory layout, long length, ByteBuffer old_buffer)Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the | ||
| public static ByteBuffer | glMapTexture2DINTEL(int texture, int level, int access, int[] stride, int[] layout)
Array version of: | ||
| public static ByteBuffer | glMapTexture2DINTEL(int texture, int level, int access, int[] stride, int[] layout, ByteBuffer old_buffer)
Array version of: | ||
| public static ByteBuffer | glMapTexture2DINTEL(int texture, int level, int access, int[] stride, int[] layout, long length, ByteBuffer old_buffer)
Array version of: | ||
| public static native void | glSyncTextureINTEL(int
the texture to synchronize texture)Makes sure that changes made by CPU are visible to GPU by flushing texture cache in GPU. | ||
| public static native void | glUnmapTexture2DINTEL(int
the texture to unmap texture, int the mipmap level-of-detail of the texture level)Releases the pointer obtained previously via | ||
| public static native long | nglMapTexture2DINTEL(int texture, int level, int access, long stride, long layout)
Unsafe version of: |
| GL_LAYOUT_DEFAULT_INTEL | back to summary |
|---|---|
| public static final int GL_LAYOUT_DEFAULT_INTEL Accepted by the | |
| GL_LAYOUT_LINEAR_CPU_CACHED_INTEL | back to summary |
|---|---|
| public static final int GL_LAYOUT_LINEAR_CPU_CACHED_INTEL Accepted by the | |
| GL_LAYOUT_LINEAR_INTEL | back to summary |
|---|---|
| public static final int GL_LAYOUT_LINEAR_INTEL Accepted by the | |
| GL_TEXTURE_MEMORY_LAYOUT_INTEL | back to summary |
|---|---|
| public static final int GL_TEXTURE_MEMORY_LAYOUT_INTEL Accepted by the | |
| INTELMapTexture | back to summary |
|---|---|
| protected INTELMapTexture() | |
| getStride | back to summary |
|---|---|
| private static int getStride(IntBuffer stride) | |
| getStride | back to summary |
|---|---|
| private static int getStride(int[] stride) | |
| glMapTexture2DINTEL | back to summary | ||
|---|---|---|---|
| public static ByteBuffer glMapTexture2DINTEL(int texture, int level, int access, IntBuffer stride, IntBuffer layout) Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the LWJGL note: If glMapTexture2DINTEL without an explicit length argument is used and direct-state-access functionality is not available in the current context, the texture object must currently be bound to the GL_TEXTURE_2D target.
| |||
| glMapTexture2DINTEL | back to summary | ||
|---|---|---|---|
| public static ByteBuffer glMapTexture2DINTEL(int texture, int level, int access, IntBuffer stride, IntBuffer layout, ByteBuffer old_buffer) Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the LWJGL note: If glMapTexture2DINTEL without an explicit length argument is used and direct-state-access functionality is not available in the current context, the texture object must currently be bound to the GL_TEXTURE_2D target.
| |||
| glMapTexture2DINTEL | back to summary | ||
|---|---|---|---|
| public static ByteBuffer glMapTexture2DINTEL(int texture, int level, int access, IntBuffer stride, IntBuffer layout, long length, ByteBuffer old_buffer) Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the LWJGL note: If glMapTexture2DINTEL without an explicit length argument is used and direct-state-access functionality is not available in the current context, the texture object must currently be bound to the GL_TEXTURE_2D target.
| |||
| glMapTexture2DINTEL | back to summary |
|---|---|
| public static ByteBuffer glMapTexture2DINTEL(int texture, int level, int access, int[] stride, int[] layout) Array version of:
| |
| glMapTexture2DINTEL | back to summary |
|---|---|
| public static ByteBuffer glMapTexture2DINTEL(int texture, int level, int access, int[] stride, int[] layout, ByteBuffer old_buffer) Array version of:
| |
| glMapTexture2DINTEL | back to summary |
|---|---|
| public static ByteBuffer glMapTexture2DINTEL(int texture, int level, int access, int[] stride, int[] layout, long length, ByteBuffer old_buffer) Array version of:
| |
| glSyncTextureINTEL | back to summary |
|---|---|
| public static native void glSyncTextureINTEL(int texture) Makes sure that changes made by CPU are visible to GPU by flushing texture cache in GPU. The GL implementation tracks the cache usage and ignores the command if such flush is not needed. It is worth noting that this extension does not address automatic synchronization between CPU and GPU when both entities operate on the same texture at the same time. This is up to the application to assure such synchronization. Otherwise, the results may not be deterministic (writes from different entities may interleave in a non-deterministic way).
| |
| glUnmapTexture2DINTEL | back to summary |
|---|---|
| public static native void glUnmapTexture2DINTEL(int texture, int level) Releases the pointer obtained previously via
| |
| nglMapTexture2DINTEL | back to summary |
|---|---|
| public static native long nglMapTexture2DINTEL(int texture, int level, int access, long stride, long layout) Unsafe version of: | |