Page MenuHome

blender 2.8; OpenGL. ui_panel_category_draw_tab with immediate API
ClosedPublic

Authored by Krantz Geoffroy (kgeogeo) on Oct 7 2016, 11:26 PM.

Diff Detail

Event Timeline

Krantz Geoffroy (kgeogeo) retitled this revision from to blender 2.8; OpenGL. ui_panel_category_draw_tab with immediate API.
Krantz Geoffroy (kgeogeo) updated this object.
Mike Erwin (merwin) edited edge metadata.

Looks good @Krantz Geoffroy (kgeogeo), is this one done?

This revision is now accepted and ready to land.Oct 8 2016, 1:01 AM

yes, it's done.

Quick question: is there someone who work on glutil.c? because I start it too and it's pretty big stuf, so I don't want to duplicate the work.
Thanks

source/blender/editors/interface/interface_panel.c
1542–1551

Just wondering, is this just for forcing non-GL_POLYGON drawing? Couldn't we simply add a BLI_assert for this?

1580

If color can change, using uniforms seems wrong?

Mike Erwin (merwin) requested changes to this revision.Oct 8 2016, 1:17 AM
Mike Erwin (merwin) edited edge metadata.
Mike Erwin (merwin) added inline comments.
source/blender/editors/interface/interface_panel.c
1542–1551

Leave this exactly as it is -- using TRIANGLE_FAN for POLYGON. No need to add assert because I have plans for this...

1580

Nice catch! We have to immEnd, then ... do something else to get the smooth highlight.

This revision now requires changes to proceed.Oct 8 2016, 1:17 AM

is there someone who work on glutil.c? because I start it too and it's pretty big stuf

Most functions in glutil.c will become obsolete. There's no point converting them since callers usually set current color themselves. You can add new functions here if they are useful (like I did with imm_draw_lined_circle & imm_draw_filled_circle). But only add things that are needed for some other code you're converting. Don't anticipate future needs too much.

Krantz Geoffroy (kgeogeo) edited edge metadata.

use GPU_SHADER_2D_SMOOTH_COLOR to be able to change the color

source/blender/editors/interface/interface_panel.c
1580

In fact there is only one immend used in the same time, because after this one there's a return, it go out of the function, so the second immend is not executed. it was so before anyway.
Is that a problem?

Mike Erwin (merwin) edited edge metadata.
Mike Erwin (merwin) added inline comments.
source/blender/editors/interface/interface_panel.c
1580

This is correct, End & Unbind before returning.

This revision is now accepted and ready to land.Oct 8 2016, 5:49 PM

Landed in blender2.8