A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.khronos.org/opengles/sdk/docs/man3/html/glMapBufferRange.xhtml below:

OpenGL ES 3 Reference Pages

Name

glMapBufferRange — map a section of a buffer object's data store

C Specification void *glMapBufferRange( GLenum target,   GLintptr offset,   GLsizeiptr length,   GLbitfield access);

 

GLboolean glUnmapBuffer( GLenum target);

 

Parameters for glMapBufferRange
target

Specifies a binding to which the target buffer is bound.

offset

Specifies the starting offset within the buffer of the range to be mapped.

length

Specifies the length of the range to be mapped.

access

Specifies a combination of access flags indicating the desired access to the range.

Parameters for glUnmapBuffer
target

Specifies a binding to which the target buffer is bound.

Description

glMapBufferRange maps all or part of the data store of a buffer object into the client's address space. target specifies the target to which the buffer is bound and must be one of GL_ARRAY_BUFFER, GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, or GL_UNIFORM_BUFFER. offset and length indicate the range of data in the buffer object that is to be mapped, in terms of basic machine units. access is a bitfield containing flags which describe the requested mapping. These flags are described below.

If no error occurs, a pointer to the beginning of the mapped range is returned once all pending operations on that buffer have completed, and may be used to modify and/or query the corresponding range of the buffer, according to the following flag bits set in access:

Furthermore, the following optional flag bits in access may be used to modify the mapping:

If an error occurs, glMapBufferRange returns a NULL pointer.

A mapped data store must be unmapped with glUnmapBuffer before its buffer object is used. Otherwise an error will be generated by any GL command that attempts to dereference the buffer object's data store. When a data store is unmapped, the pointer to its data store becomes invalid. glUnmapBuffer returns GL_TRUE unless the data store contents have become corrupt during the time the data store was mapped. This can occur for system-specific reasons that affect the availability of graphics memory, such as screen mode changes. In such situations, GL_FALSE is returned and the data store contents are undefined. An application must detect this rare condition and reinitialize the data store.

A buffer object's mapped data store is automatically unmapped when the buffer object is deleted or its data store is recreated with glBufferData.

Notes

Mappings to the data stores of buffer objects may have nonstandard performance characteristics. For example, such mappings may be marked as uncacheable regions of memory, and in such cases reading from them may be very slow. To ensure optimal performance, the client should use the mapping in a fashion consistent with the values of GL_BUFFER_USAGE and access. Using a mapping in a fashion inconsistent with these values is liable to be multiple orders of magnitude slower than using normal memory.

Errors

GL_INVALID_VALUE is generated if either of offset or length is negative, or if offset + length is greater than the value of GL_BUFFER_SIZE.

GL_INVALID_VALUE is generated if access has any bits set other than those defined above.

GL_INVALID_OPERATION is generated for any of the following conditions:

GL_OUT_OF_MEMORY is generated if glMapBufferRange fails because memory for the mapping could not be obtained.

API Version Support OpenGL ES API Version Function Name 2.0 3.0 glMapBufferRange - ✔ glUnmapBuffer - ✔ Copyright

Copyright © 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. https://opencontent.org/openpub/.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4