Page MenuHome

OpenGL immediate mode: finish editarmarture_sketch.c
ClosedPublic

Authored by Khanh Ha (khanh_ha) on Mar 7 2017, 11:05 AM.

Diff Detail

Event Timeline

Khanh Ha (khanh_ha) retitled this revision from to OpenGL immediate mode: finish editarmarture_sketch.c.
Khanh Ha (khanh_ha) updated this object.
Khanh Ha (khanh_ha) set the repository for this revision to rB Blender.

Appart from the misplaced code it's all fine for me.

source/blender/editors/armature/editarmature_sketch.c
431

This belongs to glutil.c. Create imm_cylinder below imm_cylinder_nor.

Thanks a lot, Looks nice! I can test it tonight before accepting.

Khanh Ha (khanh_ha) edited edge metadata.
Khanh Ha (khanh_ha) removed rB Blender as the repository for this revision.

move imm_cylinder to glutil.c

Thanks a lot.
I moved the function imm_cylinder to glutil.c

Tested armature sketching and it works same as 2.78. Awesome!

More notes & suggestions below.

source/blender/editors/armature/editarmature_sketch.c
43

Can remove this BIF_gl.h include.

441

Make this const float color[4] so we can pass in const colors. Not that it really matters but it's good practice.

451

Small change, but makes it easier to read & understand:

Batch *batch = Batch_get_sphere(0);

And remove the "= NULL" above. Here & the other places.

460

Same here, make it const color.

2067

I agree we should keep this disabled code even though it uses GLU. It is an example of what could be done here.

Thanks Mike,
updates:

  • remove BIF_gl
  • remove = NULL
  • change to const float color[4]

just another const color[4]

Mike Erwin (merwin) edited edge metadata.
This revision is now accepted and ready to land.Mar 8 2017, 4:01 AM

yaaaa. I am looking for new tasks

Pushed to blender2.8