diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-06-22 03:35:37 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-06-22 03:36:05 +0300 |
commit | 84ae0fe3a5f5707a5ff658292fefcfc5f9cf04b8 (patch) | |
tree | 1a1ac643881b2b8c0fc891589cf3f7ef057f6015 /source/blender/blenfont/intern/blf_internal_types.h | |
parent | 4f83fd4cf8b69497beddc498033a7a2beea24d80 (diff) |
GLRefactor: Refactor bf_blenfont to use GPUTexture instead of raw GL calls and types.
In an effort to centralize all opengl calls in the codebase, this patch replaces
the raw opengl calls in bf_blenfont with GPUTexture so it's no longer depended
on opengl headers.
reviewer: Brecht
Differential Revision: https://developer.blender.org/D3483
Diffstat (limited to 'source/blender/blenfont/intern/blf_internal_types.h')
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index d7b526735d1..a8ed10bc0bc 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -32,6 +32,7 @@ #define __BLF_INTERNAL_TYPES_H__ #include "../../../intern/gawain/gawain/gwn_vertex_buffer.h" +#include "GPU_texture.h" #define BLF_BATCH_DRAW_LEN_MAX 2048 /* in glyph */ @@ -45,7 +46,7 @@ typedef struct BatchBLF { float ofs[2]; /* copy of font->pos */ float mat[4][4]; /* previous call modelmatrix. */ bool enabled, active, simple_shader; - unsigned int tex_bind_state; + GPUTexture *tex_bind_state; } BatchBLF; extern BatchBLF g_batch; @@ -78,7 +79,7 @@ typedef struct GlyphCacheBLF { struct GlyphBLF *glyph_ascii_table[256]; /* texture array, to draw the glyphs. */ - unsigned int *textures; + GPUTexture **textures; /* size of the array. */ unsigned int textures_len; @@ -133,7 +134,7 @@ typedef struct GlyphBLF { int advance_i; /* texture id where this glyph is store. */ - unsigned int tex; + GPUTexture* tex; /* position inside the texture where this glyph is store. */ int offset_x; @@ -244,7 +245,7 @@ typedef struct FontBLF { int tex_size_max; /* cache current OpenGL texture to save calls into the API */ - unsigned int tex_bind_state; + GPUTexture *tex_bind_state; /* font options. */ int flags; |