-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
Description
The book uses kImmutableUsage, kDynamicUsage, and kDefaultUsage. These map to the corresponding modes in DX11 for vertex buffers, index buffers and textures (i.e. any resource).
In desktop OpenGL, these correspond to using glBufferStorage and glTextureStorage for the immutable cases, and glBufferData and glTexSubImage for non-immutable cases. For vertex/index buffers, GL_STATIC and GL_DYNAMIC correspond to kDefaultUsage and kDynamicUsage. For textures, I'm not sure there's a distinction. Maybe use a PBO?
In OpenGL ES 2.0, just ignore the immutable case other than preventing the client from using BeginData/EndData. Or maybe use the extension if there's time/interest.