[Bf-blender-cvs] [9c9efe7] soc-2014-viewport_context: Move private functions into own header (not to be used outside of GPU code).
Campbell Barton
noreply at git.blender.org
Sat Jul 26 04:39:04 CEST 2014
Commit: 9c9efe7a36aecc3e79f614778433f855fc5174c8
Author: Campbell Barton
Date: Sat Jul 26 12:36:56 2014 +1000
Branches: soc-2014-viewport_context
https://developer.blender.org/rB9c9efe7a36aecc3e79f614778433f855fc5174c8
Move private functions into own header (not to be used outside of GPU code).
===================================================================
M source/blender/gpu/CMakeLists.txt
M source/blender/gpu/GPU_extensions.h
M source/blender/gpu/intern/gpu_extensions.c
A source/blender/gpu/intern/gpu_extensions_private.h
M source/blender/gpu/intern/gpu_init_exit.c
===================================================================
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 7d97019..27657c4 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -63,6 +63,7 @@ set(SRC
GPU_simple_shader.h
GPU_select.h
intern/gpu_codegen.h
+ intern/gpu_extensions_private.h
)
data_to_c_simple(shaders/gpu_shader_material.glsl SRC)
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 756c377..3daf858 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -55,8 +55,6 @@ typedef struct GPUShader GPUShader;
/* GPU extensions support */
void GPU_extensions_disable(void);
-void gpu_extensions_init(void); /* call this before running any of the functions below */
-void gpu_extensions_exit(void);
int GPU_print_error(const char *str);
int GPU_glsl_support(void);
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 9795543..e524936 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -48,7 +48,9 @@
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "GPU_simple_shader.h"
-#include "gpu_codegen.h"
+
+#include "intern/gpu_codegen.h"
+#include "intern/gpu_extensions_private.h"
#include <stdlib.h>
#include <stdio.h>
diff --git a/source/blender/gpu/intern/gpu_extensions_private.h b/source/blender/gpu/intern/gpu_extensions_private.h
new file mode 100644
index 0000000..a4124b8
--- /dev/null
+++ b/source/blender/gpu/intern/gpu_extensions_private.h
@@ -0,0 +1,32 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file gpu_extensions_private.h
+ * \ingroup gpu
+ */
+
+#ifndef __GPU_EXTENSIONS_PRIVATE_H__
+#define __GPU_EXTENSIONS_PRIVATE_H__
+
+/* call this before running any of the functions below */
+void gpu_extensions_init(void);
+void gpu_extensions_exit(void);
+
+#endif /* __GPU_EXTENSIONS_PRIVATE_H__ */
diff --git a/source/blender/gpu/intern/gpu_init_exit.c b/source/blender/gpu/intern/gpu_init_exit.c
index 6f75a00..912774c 100644
--- a/source/blender/gpu/intern/gpu_init_exit.c
+++ b/source/blender/gpu/intern/gpu_init_exit.c
@@ -32,7 +32,9 @@
#include "BLI_sys_types.h"
#include "GPU_init_exit.h" /* interface */
#include "GPU_extensions.h" /* library */
+
#include "intern/gpu_codegen.h"
+#include "intern/gpu_extensions_private.h"
/**
* although the order of initialization and shutdown should not matter
More information about the Bf-blender-cvs
mailing list