Skip to content

Implement resource usage parameters #7

@jvanverth

Description

@jvanverth

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions