OLD | NEW |
(Empty) | |
| 1 Name |
| 2 |
| 3 CHROMIUM_discardable_texture |
| 4 |
| 5 Name Strings |
| 6 |
| 7 GL_CHROMIUM_discardable_texture |
| 8 |
| 9 Version |
| 10 |
| 11 Last Modified Date: April 11, 2017 |
| 12 |
| 13 Dependencies |
| 14 |
| 15 OpenGL ES 2.0 is required. |
| 16 |
| 17 Overview |
| 18 |
| 19 This extension defines a way to mark textures as "unlocked" or "not |
| 20 currently in use", giving GL the opportunity to delete these textures as |
| 21 needed (potentially in cases of memory pressure). Clients may try to |
| 22 re-lock such a texture, and if successful may continue to use the texture |
| 23 as normal. |
| 24 |
| 25 This allows a client to opportunistically cache data for future use, |
| 26 without worrying about exact memory limits. |
| 27 |
| 28 New Procedures and Functions |
| 29 |
| 30 void glInitializeDiscardableTextureCHROMIUM (GLuint texture_id); |
| 31 |
| 32 Notifies GL that a texture may be unlocked in the future. Must be called |
| 33 once on a texture, before any uses of glUnlockTextureCHROMIUM. Will set |
| 34 GL_INVALID_VALUE if called with a texture ID that does not exist, or if |
| 35 called with a texture ID that has already been initialized. |
| 36 |
| 37 void glUnlockTextureCHROMIUM (GLuint texture_id); |
| 38 |
| 39 Notifies GL that a texture is no longer in use. Once a client calls |
| 40 glUnlockTextureCHROMIUM, they may not use the indicated texture in any |
| 41 future GL calls. This includes using the texture indirectly, via objects |
| 42 (FBOs, etc...) that the texture is bound to. Using a texture once it has |
| 43 been unlocked will behave as though the texture is deleted. Will |
| 44 set GL_INVALID_VALUE if called with a texture ID that has not been |
| 45 initialized via glInitializeDiscardableTextureCHROMIUM. |
| 46 |
| 47 bool glLockTextureCHROMIUM (GLuint texture_id); |
| 48 |
| 49 Requests that GL re-lock the indicated texture, allowing it to be used in |
| 50 future operations. If this function returns true, the client may continue |
| 51 to use the indicated texture. The client should assume that unlocking a |
| 52 texture clears all bindings (FBOs, etc...), so the client must re-bind the |
| 53 texture as necessary. If this function returns false, the client may not |
| 54 use texture again, and should behave as if the texture was deleted via |
| 55 glDeleteTextures. Will set GL_INVALID_VALUE if called with a texture ID |
| 56 that has not been initialized via glInitializeDiscardableTextureCHROMIUM. |
| 57 |
| 58 New Tokens |
| 59 |
| 60 None. |
| 61 |
| 62 Errors |
| 63 |
| 64 None. |
| 65 |
| 66 New State |
| 67 |
| 68 None. |
| 69 |
| 70 Revision History |
| 71 |
| 72 3/11/2017 Documented the extension |
OLD | NEW |