|
|
|
|
@ -49,6 +49,14 @@ initGLContext(MemoryArena* arena,
|
|
|
|
|
gl_ctx->shaders = ARENA_ALLOC(arena, ShaderProgram, max_shaders); |
|
|
|
|
gl_ctx->max_ubos = max_ubos; |
|
|
|
|
gl_ctx->uniform_buffers = ARENA_ALLOC(arena, GLBuffer, max_ubos); |
|
|
|
|
|
|
|
|
|
// NOTE: initialize GLBuffer struct members to sane defaults
|
|
|
|
|
for (u32 i = 0; i < max_ubos; i++) { |
|
|
|
|
GLBuffer& buf = gl_ctx->uniform_buffers[i]; |
|
|
|
|
buf.location = -1; |
|
|
|
|
buf.binding_idx = -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
gl_ctx->max_textures = max_textures; |
|
|
|
|
gl_ctx->textures = ARENA_ALLOC(arena, GLTexture, max_textures); |
|
|
|
|
|
|
|
|
|
|