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:
authorMike Erwin <significant.bit@gmail.com>2017-02-02 00:01:25 +0300
committerMike Erwin <significant.bit@gmail.com>2017-02-02 00:21:08 +0300
commitba551014f8fc115b0d816d6d399022a897953059 (patch)
tree83502f0970a0d9f457560ccaeba6871f06b3b08a /source/blender/blenfont/BLF_api.h
parent13399d471e5a86081de7aba031043ce8f0578fdf (diff)
add BLF_color functions
Needed a way to pass main font color to BLF without using obsolete glColor. Could not use immUniform since BLF binds its shader internally.
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r--source/blender/blenfont/BLF_api.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 3da0434687c..afb391e33e6 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -64,6 +64,15 @@ void BLF_aspect(int fontid, float x, float y, float z);
void BLF_position(int fontid, float x, float y, float z);
void BLF_size(int fontid, int size, int dpi);
+/* goal: small but useful color API */
+void BLF_color4ubv(int fontid, const unsigned char rgba[4]);
+void BLF_color3ubv(int fontid, const unsigned char rgb[3]);
+void BLF_color3ubv_alpha(int fontid, const unsigned char rgb[3], unsigned char alpha);
+void BLF_color3ub(int fontid, unsigned char r, unsigned char g, unsigned char b);
+void BLF_color4fv(int fontid, const float rgba[4]);
+void BLF_color3f(int fontid, float r, float g, float b);
+void BLF_color3fv_alpha(int fontid, const float rgb[3], float alpha);
+
/* Set a 4x4 matrix to be multiplied before draw the text.
* Remember that you need call BLF_enable(BLF_MATRIX)
* to enable this.