Blender Git Loki

Git Commits -> Revision d969192

Revision d969192 by Alexander Romanov (master)
April 8, 2016, 07:58 (GMT)
Wide lines + line stipple deprecated API replacement

The patch contains an implementation of the wide lines and the line stipple that is necessary for OpenGL upgrade.

For the implementation I have chosen the geometry shader because it required minimum changes for the wrapper calls and such implementation is the best for the "basic shader" architecture.

There are few shortcomings that can be corrected in future. They all are related to the fact that the lines in one strip are not connected with each other. So the stipple pattern is not continuous on the common vertex of two lines. There is also no continuity of form (each line is an independent rectangular).
But the advantage is that even outdated glBegin, glVertex work! Though with the above restrictions.
Continuity of form and stipple can be implemented with additional attributes, and it will require more changes in calls.

At the moment, the patch replaces calls for some "gestures". It works satisfactorily for "cross" or "rectangular" and not so good for "lasso" and "circle" due to the above-mentioned shortcomings.

Don't forget to set USE_GLSL to true for testing.

Alexander Romanov (Blend4Web Team)

Reviewers: merwin, brecht

Reviewed By: merwin, brecht

Subscribers: aligorith, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1880

Commit Details:

Full Hash: d969192fbe6129021f0399cc35c6c2be6aa72eda
Parent Commit: a51e9ec
Lines Changed: +210, -31

1 Added Path:

/source/blender/gpu/shaders/gpu_shader_basic_geom.glsl (+100, -0) (View)

8 Modified Paths:

/source/blender/gpu/CMakeLists.txt (+2, -0) (Diff)
/source/blender/gpu/GPU_basic_shader.h (+5, -1) (Diff)
/source/blender/gpu/intern/gpu_basic_shader.c (+58, -7) (Diff)
/source/blender/gpu/shaders/gpu_shader_basic_frag.glsl (+11, -3) (Diff)
/source/blender/gpu/shaders/gpu_shader_basic_vert.glsl (+8, -0) (Diff)
/source/blender/windowmanager/intern/wm_draw.c (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm_gesture.c (+24, -20) (Diff)
/source/blender/windowmanager/intern/wm_subwindow.c (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021