| Name |
| |
| CHROMIUM_discardable_texture |
| |
| Name Strings |
| |
| GL_CHROMIUM_discardable_texture |
| |
| Version |
| |
| Last Modified Date: April 11, 2017 |
| |
| Dependencies |
| |
| OpenGL ES 2.0 is required. |
| |
| Overview |
| |
| This extension defines a way to mark textures as "unlocked" or "not |
| currently in use", giving GL the opportunity to delete these textures as |
| needed (potentially in cases of memory pressure). Clients may try to |
| re-lock such a texture, and if successful may continue to use the texture |
| as normal. |
| |
| This allows a client to opportunistically cache data for future use, |
| without worrying about exact memory limits. |
| |
| New Procedures and Functions |
| |
| void glInitializeDiscardableTextureCHROMIUM (GLuint texture_id); |
| |
| Notifies GL that a texture may be unlocked in the future. Must be called |
| once on a texture, before any uses of glUnlockTextureCHROMIUM. Will set |
| GL_INVALID_VALUE if called with a texture ID that does not exist, or if |
| called with a texture ID that has already been initialized. |
| |
| void glUnlockTextureCHROMIUM (GLuint texture_id); |
| |
| Notifies GL that a texture is no longer in use. Once a client calls |
| glUnlockTextureCHROMIUM, they may not use the indicated texture in any |
| future GL calls. This includes using the texture indirectly, via objects |
| (FBOs, etc...) that the texture is bound to. Using a texture once it has |
| been unlocked will behave as though the texture is deleted. Will |
| set GL_INVALID_VALUE if called with a texture ID that has not been |
| initialized via glInitializeDiscardableTextureCHROMIUM. |
| |
| bool glLockTextureCHROMIUM (GLuint texture_id); |
| |
| Requests that GL re-lock the indicated texture, allowing it to be used in |
| future operations. If this function returns true, the client may continue |
| to use the indicated texture. The client should assume that unlocking a |
| texture clears all bindings (FBOs, etc...), so the client must re-bind the |
| texture as necessary. If this function returns false, the client may not |
| use texture again, and should behave as if the texture was deleted via |
| glDeleteTextures. Will set GL_INVALID_VALUE if called with a texture ID |
| that has not been initialized via glInitializeDiscardableTextureCHROMIUM. |
| |
| New Tokens |
| |
| None. |
| |
| Errors |
| |
| None. |
| |
| New State |
| |
| None. |
| |
| Revision History |
| |
| 3/11/2017 Documented the extension |