Working in progress, wanted to get an idea of what to change. Running into issues where glcolor is set in another file through calls to UI_ThemeColor(). Trying to figure out if I should rewrite resources.c functions to make it work how I need , where the UI_Theme Color functions are, or add my own functions that work with the imm api.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
We hit this problem before and created immUniformThemeColor functions. Look in GPU_immediate.h
Since the new functions set a uniform color, call them after you bind the shader/program but before immBegin.
The more set functions are good to go I think.
draw_cursor()
draw_brackets()
draw_textscroll()
draw_documentation()
Couple questions:
How should I be testing things, other than opening blender and poking things? Is there a set method, or something I can try to make sure I'm not breaking everything?
How worried should I be about all the times that UI_Theme color is called, to then have the actual gl drawing done in lower functions ( i.e. BLF_draw_mono() ). It looks like it pulls the color via glGetFloatv(GL_CURRENT_COLOR, temp_color) in blf.c . I'm trying (in my own google fueled manner) to figure out if this would still be valid if all the calls are swapped to immUniformThemeColor, and I guess I could figure it out if I knew what I was looking for with testing. Easier just to ask I suppose.