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-07-25 19:40:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-26 18:28:48 +0300
commitc276ef61d4ac52d40bbfc3fc82b84ed31fced49e (patch)
tree6a923d7bd90125ecf4ea550b78c963c19927d14e /source/blender/gpu
parentb296b68ff2dc92da2fd7f96c0c27966a9f7e9c5a (diff)
GPU: Move gpu_immediate.c to C++
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt2
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc (renamed from source/blender/gpu/intern/gpu_immediate.c)7
2 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 15f3c05de1c..dce49392e02 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -58,12 +58,12 @@ set(SRC
intern/gpu_batch_utils.c
intern/gpu_buffers.c
intern/gpu_codegen.c
- intern/gpu_immediate.c
intern/gpu_context.cc
intern/gpu_debug.cc
intern/gpu_element.cc
intern/gpu_extensions.cc
intern/gpu_framebuffer.cc
+ intern/gpu_immediate.cc
intern/gpu_immediate_util.c
intern/gpu_init_exit.c
intern/gpu_material.c
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.cc
index 4f5cb3fcc91..4780b2dc7b3 100644
--- a/source/blender/gpu/intern/gpu_immediate.c
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -29,6 +29,7 @@
#include "GPU_attr_binding.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "GPU_texture.h"
#include "gpu_attr_binding_private.h"
@@ -40,10 +41,6 @@
#include <stdlib.h>
#include <string.h>
-/* necessary functions from matrix API */
-extern void GPU_matrix_bind(const GPUShaderInterface *);
-extern bool GPU_matrix_dirty_get(void);
-
typedef struct ImmediateDrawBuffer {
GLuint vbo_id;
GLubyte *buffer_data;
@@ -281,7 +278,7 @@ void immBegin(GPUPrimType prim_type, uint vertex_len)
}
#endif
- active_buffer->buffer_data = glMapBufferRange(
+ active_buffer->buffer_data = (GLubyte *)glMapBufferRange(
GL_ARRAY_BUFFER,
active_buffer->buffer_offset,
bytes_needed,