Age | Commit message (Collapse) | Author |
|
|
|
|
|
This translates the gl calls to the new GPU_ wrappers from D3501.
Given it's tedious and repetitive work, this patch does as much as it can with search + replace, the remainder of the gl calls will need to be manually dealt with on a case by case basis.
This fixes 13 of the 28 failing editors when building without opengl.
For the list of substitutions see D3502
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3502
|
|
This includes a few modification:
- The biggest one is call glActiveTexture before doing any call to
glBindTexture for rendering purpose (uniform value depends on it).
This is also better to know what's going on when rendering UI. So if
there is missing UI elements because of this commit look for this first.
This allows us to have "less calls" to glActiveTexture (I did not
measure the final count) and less checks inside GPU_texture.
- Remove use of GL_TEXTURE0 as a uniform value in a few places.
- Be more strict and use BLI_assert for bad usage of GPU_texture functions.
- Disable filtering for integer and stencil textures (not supported by
OGL specs).
- Replace bools inside GPUTexture by a bitflag supporting more options to
identify texture types.
|
|
It's unlikely to ever be intentional to square the source alpha, as happens
with glBlendFunc, so this changes the blending throughout the code.
|
|
|
|
Avoid ambiguity between 2d/3d (which were already named).
|
|
|
|
Missed this in previous commit.
|
|
Was quite stupid reason for this: static size of array.
Now we allocate needed amount of points in heap if requested path length is
getting too big.
|
|
Goal is to make them more modular, to allow more variants (variable
single-color, thickness, ...) to be added without having to
copy-and-change-one-line of whole chain of shaders.
|
|
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
|
|
Using geometry shader allows us to get rid of the 'line origin' extra
vertex attribute, which means dashed shader no longer requires fiddling
with those vertex attributes definition, and, most importantly, does not
require anymore special drawing code!
As you can see, this makes code much simpler, and much less verbose,
especially in complex cases.
In addition, changed how dashes are handled, to have two 'modes', a
simple one with single color (using default "color" uniform name), and a
more advanced one allowing more complex and multi-color patterns.
Note that since GLSL 1.2 does not support geometry shaders, a hack was
added for now (which gives solid lines, but at least does not make
Blender crash).
|
|
This one has been painful, it's doing lots of nifty conditional drawing
of all kind... Also, very nice illustration of how cumbersome it is to
use dashed shader currently, we really need to find a simpler way at
some point imho. But this is not critical issue either, for now we can
live with some uglyness like that. :/
|
|
The specialized color functions are better in every way:
- faster lookup (don't have to match "color" string)
- flexible inputs (RGB with separate alpha)
- automatic alpha = 1.0 if not specified
Sort of related to T49043
|
|
See GPU_matrix.h & gpu_matrix.c for the important changes. Other files are mostly just updated to use the latest API.
- remove unused functions, defines, enums, comments
- remove "3D" from function names
- init to Identity transform (otherwise empty stack)
- gpuMatrixReset lets outside code return to initial state
Part of T49450
Follow up to D2626 and 49fc9cff3b90
|
|
Getting ready for a Gawain API change...
Part of T49043
|
|
Single quads are drawn as a TRIANGLE_FAN, with 4 verts in the same order.
Multiple quads now use PRIM_QUADS_XXX and will need further work. Only 8 places still use this.
Part of T49043
|
|
See intern/gawain for the API change. Other files are updated to use the new name. Also updated every call site to the recommended style:
unsigned int foo = VertexFormat_add_attrib(format, "foo", COMP_ ... )
|
|
These were in BIF_glutil which is documented to be removed,
so best not define new API's there.
|
|
Part of T49450
For this batch I focused on usage of gpuMatrixUpdate_legacy.
|
|
Part of T49450
For this batch I focused on usage of (now-obsolete) macros in BIF_gl.h
|
|
|
|
And change relevant function calls.
|
|
Fixed little typo in clip_draw.c and special case assert in
clip_graph_draw.c (track segments with single point).
Part of T49043
|
|
Part of T49043
|
|
|
|
|
|
Original patch didn't have any tests or what? =\
|
|
Each LINES draw call is now responsible for its own line width. No need
to set it back to its 1.0 default after every draw.
This eliminates half our calls to glLineWidth , similar to last week’s
work on glPointSize.
|
|
- LINE_STRIP to LINES when only drawing one
- group state changes for easier reading
- general cleanup
|
|
I put all usage of GL_POINTS under the microscope. Fixed problems &
optimized a couple of spots.
- reduce calls to glPointSize by about 50%
- draw selected & unselected vertices together for UV editor & EditMesh
- draw initial gpencil stroke point the proper size
- a few other smaller fixes
New policy: each GL_POINTS draw call needs to set its desired point
size. This eliminates half our calls to glPointSize (setting it back to
its 1.0 default after every draw).
|
|
|
|
Differential Revision: https://developer.blender.org/D1645
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Importantly, reversed mul_serie_m3 argument order (so it matches the m4 function)
|
|
NULL's)
|
|
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|