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:
authorCampbell Barton <ideasman42@gmail.com>2015-12-28 13:40:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-28 13:40:49 +0300
commit225b02fcd66052b1d6dfa4a146798e41c44e0cd4 (patch)
tree01bb5381abf6ed7ea1dc9d6510447a29e491a3d1
parentc6e835346259d6289edbd875fb19907e246d215d (diff)
Fix for building ghost-tests
-rw-r--r--intern/ghost/test/CMakeLists.txt2
-rw-r--r--source/blender/blenfont/intern/blf.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt
index e1475966d47..fb9ef621ecf 100644
--- a/intern/ghost/test/CMakeLists.txt
+++ b/intern/ghost/test/CMakeLists.txt
@@ -79,6 +79,8 @@ if(UNIX AND NOT APPLE)
endif()
# for now... default to this
add_definitions(-DWITH_GL_PROFILE_COMPAT)
+# BLF needs this to ignore GPU library
+add_definitions(-DBLF_STANDALONE)
# ghost
include(${CMAKE_SOURCE_DIR}/../CMakeLists.txt)
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index a387b26ec3e..977fa771014 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -55,7 +55,9 @@
#include "IMB_colormanagement.h"
+#ifndef BLF_STANDALONE
#include "GPU_basic_shader.h"
+#endif
#include "blf_internal_types.h"
#include "blf_internal.h"
@@ -498,7 +500,9 @@ static void blf_draw_gl__start(FontBLF *font, GLint *mode)
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+#ifndef BLF_STANDALONE
GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
+#endif
/* Save the current matrix mode. */
glGetIntegerv(GL_MATRIX_MODE, mode);
@@ -539,7 +543,9 @@ static void blf_draw_gl__end(GLint mode)
if (mode != GL_MODELVIEW)
glMatrixMode(mode);
+#ifndef BLF_STANDALONE
GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
+#endif
glDisable(GL_BLEND);
}