Details
- Reviewers
Mike Erwin (merwin) - Maniphest Tasks
- T49043: replace OpenGL immediate mode in Blender 2.8
Diff Detail
- Repository
- rB Blender
Event Timeline
Looks good so far
| source/blender/gpu/gawain/immediate.c | ||
|---|---|---|
| 746 ↗ | (On Diff #7806) | FYI We recently switched away from glGetError. Instead run blender --debug-gpu and it will use a debug context & report errors directly. |
| source/blender/gpu/gawain/immediate.h | ||
| 82 ↗ | (On Diff #7806) | Hmmm do we want this? Or redesign calling code to not need this? Let me think about it some more... |
| source/blender/editors/animation/anim_markers.c | ||
|---|---|---|
| 420 | This color is for the text drawing (UI_fontstyle_draw_simple). Leave the glColor4fv but get its value with UI_GetThemeColor4fv like you're doing. Something like this: float col[4]; UI_GetThemeColor4fv(colorid, col); #ifdef DURIAN if (marker->camera ...) col[3] = 0.4; #endif glColor4fv(col); | |
| 492 | Have you tried to run this? I don't expect it to work. draw_marker does 3 things right now:
The icon and text label each use their own shader program, and will conflict with 2D_UNIFORM_COLOR used for the lines. If you separate the line drawing into its own function we can draw all lines within one immBegin/End. Which is good! Would have to repeat this loop -- once for lines, again for "other" stuff. | |
@Mike Erwin (merwin) is this ready to land?
| source/blender/gpu/gawain/immediate.c | ||
|---|---|---|
| 746 ↗ | (On Diff #7806) | Got rid of these changes. |
| source/blender/gpu/gawain/immediate.h | ||
| 82 ↗ | (On Diff #7806) | Redesigned to get rid of this call. |
This is inactive for far too long. I like what the refactor proposes (splitting the marker drawing in different functions), but I went to the simplest (inefficient) approach first. See rB9151f12d
If @Punya Biswal (punya) is willing to update the patch to the latest code (expect conflicts, since I went over a similar approach) we can re-open this, and eventually apply the more elegant approach the patch was going after.
That said, I find it overkill. The "lines" which were drawn were only for the markers which have cameras bound to it (Ctr+B). Which doesn't present a critical problem. We may not get any real benefit from it. @Mike Erwin (merwin) thoughts?