diff options
author | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2012-06-25 21:26:32 +0400 |
---|---|---|
committer | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2012-06-25 21:26:32 +0400 |
commit | 375c51d27ca29b63af3b863f520dc67f183a9a02 (patch) | |
tree | 08cb21498ac975dc63f923e205481cdd745d3a7f /source/blender/editors/space_console | |
parent | 7851749981da3485ca1e55343483541fce2c6fd1 (diff) |
Big Commit - Ported Blender/BGE to use GPU_compatibility for most drawing.
Replaces glBegin/glEnd with gpuBegin/gpuEnd
Replaces client side arrays with gpuDrawArrays/gpuDrawElements/gpuDrawElements
Replaces GLUquadric and other simple geometric primitives with a new primitive library
Replaces display lists with the ability to save geometry buffers and invoke them with glDraw/glRepeat
Not complete, there are still some places where old functions remain. Especially in test programs and external libraries.
Not tested thoroughly yet! I've tested a lot, but there are still lots of regressions.
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r-- | source/blender/editors/space_console/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/space_console/console_draw.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_console/CMakeLists.txt b/source/blender/editors/space_console/CMakeLists.txt index 06d7bf94607..0f90841ba12 100644 --- a/source/blender/editors/space_console/CMakeLists.txt +++ b/source/blender/editors/space_console/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blenloader + ../../gpu ../../makesdna ../../makesrna ../../windowmanager diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c index 2897c5d7d67..72893348156 100644 --- a/source/blender/editors/space_console/console_draw.c +++ b/source/blender/editors/space_console/console_draw.c @@ -41,9 +41,10 @@ #include "BKE_report.h" - #include "MEM_guardedalloc.h" +#include "GPU_compatibility.h" + #include "BIF_gl.h" #include "BIF_glutil.h" @@ -176,9 +177,9 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha /* cursor */ UI_GetThemeColor3ubv(TH_CONSOLE_CURSOR, fg); - glColor3ubv(fg); + gpuCurrentColor3ubv(fg); - glRecti((xy[0] + pen[0]) - 1, + gpuSingleFilledRecti((xy[0] + pen[0]) - 1, (xy[1] + pen[1]), (xy[0] + pen[0]) + 1, (xy[1] + pen[1] + tvc->lheight) |