Page MenuHome

Blender 2.8: OpenGL immediate mode: transform
ClosedPublic

Authored by Darwin Yip (darwin) on Nov 16 2016, 5:44 AM.

Details

Summary

Immediate mode for transform.c
It is dependent on D2358.

T49043

Diff Detail

Repository
rB Blender

Event Timeline

Darwin Yip (darwin) retitled this revision from to Blender 2.8: OpenGL immediate mode: transform.
Darwin Yip (darwin) updated this object.
Darwin Yip (darwin) set the repository for this revision to rB Blender.
source/blender/editors/transform/transform.c
1605

Since you're using the new immVertex2s function, should be:

unsigned pos = add_attrib(format, "pos", GL_SHORT, 2, CONVERT_INT_TO_FLOAT);

or

unsigned pos = add_attrib(format, "pos", COMP_I16, 2, CONVERT_INT_TO_FLOAT);

If you build with "make debug" or "make lite debug" or (on Windows) "make 2015 lite debug" it will catch things like this at runtime.

1647

same here

6860–6862

GL_FLOAT (or COMP_F32), 3, KEEP_FLOAT

GPU_SHADER_3D_UNIFORM_COLOR

Debug build will catch things like this. Would it be better if I enabled more error checking for non-debug builds too?

7480

Call immThemeColorShadeAlpha after immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR).

7483–7485

Same as above, use 3D versions of these.

7546

Use imm_cpack here.

source/blender/editors/transform/transform.c
6860–6862

My bad. Still getting used to the APIs.

7480

I can't find a definition for immThemeColorShadeAlpha().

source/blender/editors/transform/transform.c
6860–6862

They're new to everyone, it's expected!

Debug and release builds will now catch errors at runtime.

7480

Oops! immUniformThemeColorShadeAlpha

Got rid of the runtime errors and used corrected constants

Darwin Yip (darwin) marked 6 inline comments as done.Nov 18 2016, 5:07 AM

Tackled noted issues

Something about no new lines at the end of file.

Mike Erwin (merwin) edited edge metadata.

Put pieces of this into blender2.8. Thanks!

This revision is now accepted and ready to land.Jan 19 2017, 6:57 AM