diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-15 19:50:02 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-15 19:50:02 +0300 |
commit | 13c39e90b3c0ec6a470fbc3696cd73c2a65b49cf (patch) | |
tree | c4e7113f2dd911e5438eb68d4e9f49efa7e1fe1e /source/blender/windowmanager/intern/wm_subwindow.c | |
parent | 2daa4db8a0cb23dfd0ca417ead2413e20ec18fe7 (diff) |
VBO offscreen selection drawing, cdderivedmesh
Get rid of legacy drawing, it's only used for selection,
in which case we can prepare a temporary color buffer and draw
at once. Code is not complete here because we still redundantly
set the draw color in the draw function and don't ommit hidden
faces automatically. Still it works 100% without immediate mode
now.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_subwindow.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_subwindow.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 1583f9f9095..6b286bd19a5 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -459,6 +459,13 @@ void WM_framebuffer_index_set(int index) cpack(col); } +void WM_framebuffer_index_get(int index, int *r_col) +{ + *r_col = index_to_framebuffer(index); +} + + + #define INDEX_FROM_BUF_8(col) (((col & 0xC00000) >> 18) + ((col & 0xC000) >> 12) + ((col & 0xC0) >> 6)) #define INDEX_FROM_BUF_12(col) (((col & 0xF00000) >> 12) + ((col & 0xF000) >> 8) + ((col & 0xF0) >> 4)) #define INDEX_FROM_BUF_15_16(col) (((col & 0xF80000) >> 9) + ((col & 0xF800) >> 6) + ((col & 0xF8) >> 3)) |