Page MenuHome

blender 2.8: OpenGL immediate mode: view3d_ruler.c
AbandonedPublic

Authored by Luca Rood (LucaRood) on Jan 27 2017, 6:39 AM.

Details

Summary

Note that three calls to glColor3ubv remain, two of which are for the text, and as far as I can tell can not be removed until we have a BLF_color function.

The third glColor3ubv is for circ, and was actually previously a cpack, but I replaced it as I changed the format of the color variable. But to be honest, I didn't really look into this third glColor3ubv and the circ function, as it ended up getting kinda late, so maybe this one can already be replaced...

Diff Detail

Repository
rB Blender

Event Timeline

Luca Rood (LucaRood) retitled this revision from to blender 2.8: OpenGL immediate mode: view3d_ruler.c.
Luca Rood (LucaRood) updated this object.
Luca Rood (LucaRood) set the repository for this revision to rB Blender.
Luca Rood (LucaRood) planned changes to this revision.Jan 28 2017, 3:17 PM

Will replace the immAttrib3ub calls with immUniformColor.

You're right about glColor being used by BLF. I've got BLF_color implemented, will commit soon!

source/blender/editors/space_view3d/view3d_ruler.c
44

Still need this?

source/blender/editors/space_view3d/view3d_ruler.c
708–709

Not sure exactly what circ is doing, but FYI we have imm_draw_lined_circle & imm_draw_filled_circle available.

Pushed to blender2.8

source/blender/editors/space_view3d/view3d_ruler.c
44

Yes, as long as the old matrix stuff is used.