2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2020 Blender Foundation. All rights reserved. */
|
2020-08-11 01:31:40 +02:00
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
|
* \ingroup gpu
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "glew-mx.h"
|
|
|
|
|
|
|
|
|
|
#include "GPU_batch.h"
|
2020-08-20 13:05:22 +02:00
|
|
|
#include "gl_shader_interface.hh"
|
2020-08-11 01:31:40 +02:00
|
|
|
|
|
|
|
|
namespace blender {
|
|
|
|
|
namespace gpu {
|
|
|
|
|
|
|
|
|
|
namespace GLVertArray {
|
|
|
|
|
|
2021-12-09 20:01:47 +11:00
|
|
|
/**
|
|
|
|
|
* Update the Attribute Binding of the currently bound VAO.
|
|
|
|
|
*/
|
2020-08-11 01:31:40 +02:00
|
|
|
void update_bindings(const GLuint vao,
|
|
|
|
|
const GPUBatch *batch,
|
2020-08-20 13:05:22 +02:00
|
|
|
const ShaderInterface *interface,
|
2022-01-07 11:38:08 +11:00
|
|
|
int base_instance);
|
2020-08-11 01:31:40 +02:00
|
|
|
|
2021-12-09 20:01:47 +11:00
|
|
|
/**
|
|
|
|
|
* Another version of update_bindings for Immediate mode.
|
|
|
|
|
*/
|
2020-08-31 15:14:47 +02:00
|
|
|
void update_bindings(const GLuint vao,
|
2022-01-07 11:38:08 +11:00
|
|
|
uint v_first,
|
2020-08-31 15:14:47 +02:00
|
|
|
const GPUVertFormat *format,
|
|
|
|
|
const ShaderInterface *interface);
|
|
|
|
|
|
2020-08-11 01:31:40 +02:00
|
|
|
} // namespace GLVertArray
|
|
|
|
|
|
|
|
|
|
} // namespace gpu
|
|
|
|
|
} // namespace blender
|