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:10:43 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-26 18:28:48 +0300
commita77175c9b6c06dadc1df3c654e0e000140a53a39 (patch)
tree121a661d9378d8ea8c43723898036173650aea5e /source/blender
parent076d033e10eee29bfc8315344bd2ba1f0951ad06 (diff)
GPU: Add extern "C" to intern headers
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_attr_binding_private.h9
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h8
-rw-r--r--source/blender/gpu/intern/gpu_primitive_private.h9
-rw-r--r--source/blender/gpu/intern/gpu_private.h8
-rw-r--r--source/blender/gpu/intern/gpu_shader_private.h8
-rw-r--r--source/blender/gpu/intern/gpu_vertex_format_private.h8
6 files changed, 50 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_attr_binding_private.h b/source/blender/gpu/intern/gpu_attr_binding_private.h
index 301ec3333dd..7df403a3ea5 100644
--- a/source/blender/gpu/intern/gpu_attr_binding_private.h
+++ b/source/blender/gpu/intern/gpu_attr_binding_private.h
@@ -29,6 +29,11 @@
#include "GPU_shader_interface.h"
#include "GPU_vertex_format.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* TODO(fclem) remove, use shaderface directly. */
void AttrBinding_clear(GPUAttrBinding *binding);
void get_attr_locations(const GPUVertFormat *format,
@@ -36,4 +41,8 @@ void get_attr_locations(const GPUVertFormat *format,
const GPUShaderInterface *shaderface);
uint read_attr_location(const GPUAttrBinding *binding, uint a_idx);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __GPU_ATTR_BINDING_PRIVATE_H__ */
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index ce20f495ba3..18ff4c3241d 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -26,6 +26,10 @@
#ifndef __GPU_CODEGEN_H__
#define __GPU_CODEGEN_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct GPUMaterial;
struct GPUNodeGraph;
struct GPUOutput;
@@ -68,4 +72,8 @@ void GPU_pass_release(GPUPass *pass);
void gpu_codegen_init(void);
void gpu_codegen_exit(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __GPU_CODEGEN_H__ */
diff --git a/source/blender/gpu/intern/gpu_primitive_private.h b/source/blender/gpu/intern/gpu_primitive_private.h
index abefa6abd20..b7d7b262128 100644
--- a/source/blender/gpu/intern/gpu_primitive_private.h
+++ b/source/blender/gpu/intern/gpu_primitive_private.h
@@ -26,6 +26,15 @@
#ifndef __GPU_PRIMITIVE_PRIVATE_H__
#define __GPU_PRIMITIVE_PRIVATE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* TODO(fclem) move to OGL backend */
GLenum convert_prim_type_to_gl(GPUPrimType);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __GPU_PRIMITIVE_PRIVATE_H__ */
diff --git a/source/blender/gpu/intern/gpu_private.h b/source/blender/gpu/intern/gpu_private.h
index 7846bff87f4..ed729dd399c 100644
--- a/source/blender/gpu/intern/gpu_private.h
+++ b/source/blender/gpu/intern/gpu_private.h
@@ -21,6 +21,10 @@
#ifndef __GPU_PRIVATE_H__
#define __GPU_PRIVATE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* call this before running any of the functions below */
void gpu_platform_init(void);
void gpu_platform_exit(void);
@@ -41,4 +45,8 @@ void gpu_framebuffer_module_exit(void);
void gpu_pbvh_init(void);
void gpu_pbvh_exit(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __GPU_PRIVATE_H__ */
diff --git a/source/blender/gpu/intern/gpu_shader_private.h b/source/blender/gpu/intern/gpu_shader_private.h
index e4443e79a8d..e28c5f76426 100644
--- a/source/blender/gpu/intern/gpu_shader_private.h
+++ b/source/blender/gpu/intern/gpu_shader_private.h
@@ -24,6 +24,10 @@
#include "GPU_glew.h"
#include "GPU_shader_interface.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct GPUShader {
/** Handle for full program (links shader stages below). */
GLuint program;
@@ -47,4 +51,8 @@ struct GPUShader {
/* XXX do not use it. Special hack to use OCIO with batch API. */
void immGetProgram(GLuint *program, GPUShaderInterface **shaderface);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __GPU_SHADER_PRIVATE_H__ */
diff --git a/source/blender/gpu/intern/gpu_vertex_format_private.h b/source/blender/gpu/intern/gpu_vertex_format_private.h
index a850d17a1dd..22373a6394a 100644
--- a/source/blender/gpu/intern/gpu_vertex_format_private.h
+++ b/source/blender/gpu/intern/gpu_vertex_format_private.h
@@ -26,8 +26,16 @@
#ifndef __GPU_VERTEX_FORMAT_PRIVATE_H__
#define __GPU_VERTEX_FORMAT_PRIVATE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void VertexFormat_pack(GPUVertFormat *format);
uint padding(uint offset, uint alignment);
uint vertex_buffer_size(const GPUVertFormat *format, uint vertex_len);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __GPU_VERTEX_FORMAT_PRIVATE_H__ */