Page MenuHome

clip_draw.c immediate coding
ClosedPublic

Authored by Jhonny knaak de Vargas (JKVargas) on Jan 20 2017, 2:30 AM.

Details

Summary

Some modifications that I made in clip_draw.c
Let me know if there is anything you want me to change.
Thank you.

Diff Detail

Event Timeline

Jhonny knaak de Vargas (JKVargas) retitled this revision from to clip_draw.c immediate coding.

Hey, welcome!

Formatting looks a little weird. Use tabs and make sure indentation matches surrounding code.

Some parts of Gawain that might be unclear:
immUniform functions affect the current bound shader program. They can be called outside of any immBegin/End. immAttrib must be between Begin & End.

The built-in shaders are listed in GPU_shader.h and GLSL is in source/blender/gpu/shaders. Should give you an idea what is available. We're still adding more as they're needed.

source/blender/editors/space_clip/clip_draw.c
84

immVertex2i uses (COMP_I32, 2, CONVERT_INT_TO_FLOAT) so this needs to match.

95

immRect has its own Begin/End pair, and they can't be nested. Move Begin/End back inside the if (width == 1)

183

SMOOTH_COLOR is for gradients. Probably use UNIFORM_COLOR here to give each Rect one solid color. Replace glColor4ub with immUniformColor4ub

187–189

What lines?

Jhonny knaak de Vargas (JKVargas) edited edge metadata.

I made some modifications base on your review.
Let me know if it's ok.
Thanks.

Jhonny

This file has already been converted, we are sorry about forgetting this. Closing.

This revision is now accepted and ready to land.Jul 22 2017, 9:00 PM