GPUBatch: GL backend isolation
This changes the drawing paradigm a bit. The VAO configuration is done JIT-style and depends on context active shader. This is to allow more flexibility for implementations to do optimization at lower level. The vao cache is now its own class to isolate the concept. It is this class that is reference by the GLContext for ownership of the containing VAO ids.
This commit is contained in:
@@ -188,18 +188,6 @@ void GPU_tex_free(GLuint tex_id)
|
||||
* which are not shared across contexts. So we need to keep track of
|
||||
* ownership. */
|
||||
|
||||
void gpu_context_add_batch(GPUContext *ctx, GPUBatch *batch)
|
||||
{
|
||||
BLI_assert(ctx);
|
||||
static_cast<GLContext *>(ctx)->batch_register(batch);
|
||||
}
|
||||
|
||||
void gpu_context_remove_batch(GPUContext *ctx, GPUBatch *batch)
|
||||
{
|
||||
BLI_assert(ctx);
|
||||
static_cast<GLContext *>(ctx)->batch_unregister(batch);
|
||||
}
|
||||
|
||||
void gpu_context_add_framebuffer(GPUContext *ctx, GPUFrameBuffer *fb)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
Reference in New Issue
Block a user