Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-20 14:05:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-20 17:11:14 +0300
commit19d72175bac1d78a05e9141e21c234a15b151e89 (patch)
tree47d581306f13dd93b246637455371dd949de0241 /source/blender/gpu/opengl/gl_vertex_array.cc
parent14fcd46ca7e569c1da11d0e4a02d12975226f91a (diff)
GPUShaderInterface: GL backend isolation
Diffstat (limited to 'source/blender/gpu/opengl/gl_vertex_array.cc')
-rw-r--r--source/blender/gpu/opengl/gl_vertex_array.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_array.cc b/source/blender/gpu/opengl/gl_vertex_array.cc
index 907dc37e46f..b2d2445f113 100644
--- a/source/blender/gpu/opengl/gl_vertex_array.cc
+++ b/source/blender/gpu/opengl/gl_vertex_array.cc
@@ -23,9 +23,9 @@
#include "GPU_glew.h"
-#include "GPU_shader_interface.h"
#include "GPU_vertex_buffer.h"
+#include "gpu_shader_interface.hh"
#include "gpu_vertex_format_private.h"
#include "gl_batch.hh"
@@ -33,14 +33,14 @@
#include "gl_vertex_array.hh"
-using namespace blender::gpu;
+namespace blender::gpu {
/* -------------------------------------------------------------------- */
/** \name Vertex Array Bindings
* \{ */
/* Returns enabled vertex pointers as a bitflag (one bit per attrib). */
-static uint16_t vbo_bind(const GPUShaderInterface *interface,
+static uint16_t vbo_bind(const ShaderInterface *interface,
const GPUVertFormat *format,
uint v_first,
uint v_len,
@@ -68,7 +68,7 @@ static uint16_t vbo_bind(const GPUShaderInterface *interface,
for (uint n_idx = 0; n_idx < a->name_len; n_idx++) {
const char *name = GPU_vertformat_attr_name_get(format, a, n_idx);
- const GPUShaderInput *input = GPU_shaderinterface_attr(interface, name);
+ const ShaderInput *input = interface->attr_get(name);
if (input == NULL) {
continue;
@@ -111,10 +111,10 @@ static uint16_t vbo_bind(const GPUShaderInterface *interface,
/* Update the Attrib Binding of the currently bound VAO. */
void GLVertArray::update_bindings(const GLuint vao,
const GPUBatch *batch,
- const GPUShaderInterface *interface,
+ const ShaderInterface *interface,
const int base_instance)
{
- uint16_t attr_mask = interface->enabled_attr_mask;
+ uint16_t attr_mask = interface->enabled_attr_mask_;
glBindVertexArray(vao);
@@ -156,3 +156,5 @@ void GLVertArray::update_bindings(const GLuint vao,
}
/** \} */
+
+} // namespace blender::gpu \ No newline at end of file