Campbell Barton
1f5d51e44e
Cleanup: style
2018-04-19 07:47:03 +02:00
Campbell Barton
2bc952fdb6
Merge branch 'master' into blender2.8
2018-02-18 22:33:05 +11:00
Campbell Barton
992ac8f942
Fix for fix w/ GPU_batch_wire_from_poly_2d_encoded
...
Was missing first edge
2018-01-25 00:47:01 +11:00
Campbell Barton
d8b5b4b7b1
Fix bug in view navigation icons
...
Own error in GPU_batch_wire_from_poly_2d_encoded
Wasn't correctly filling in the VBO with edges.
2018-01-24 22:58:02 +11:00
Campbell Barton
a3716f5945
GPU_batch: Add GPU_batch_wire_from_poly_2d_encoded
...
Draws wire around polygon shapes:
better visibility w/ any background color.
2018-01-20 18:45:27 +11:00
Campbell Barton
5e6c86cb1f
GPU_batch_from_poly_2d_encoded: skip winding check
...
Ensure all polygons have the same winding instead.
2018-01-16 00:59:52 +11:00
Campbell Barton
7ba07b7e64
GPU_batch_from_poly_2d_encoded: optional rctf arg
...
Also use compiler attributes
2018-01-16 00:16:54 +11:00
Campbell Barton
5cb43b0f20
Cleanup: update comments
2018-01-16 00:16:54 +11:00
Campbell Barton
bfada6cc4a
GPU_batch: Add utility to create 2D shapes
...
Shapes are represented by compact byte array,
encoded by 'make_shape_2d_from_blend.py' in the tools repo.
2018-01-15 20:38:06 +11:00
Campbell Barton
b1ac7571a8
Cleanup: split GPU_batch_presets into own file
...
Mixing other batch code in this file easily shadowed existing variables.
Keep presets separate (we may have more, 2D & 3D presets)
2018-01-15 16:24:02 +11:00
Campbell Barton
90aa02290a
Cleanup: rename GPU gawain functions
...
Were using Batch_ prefix still
2017-08-16 20:32:42 +10:00
Campbell Barton
846c11c8cf
Gawain: remove GWN_batch_discard_all
...
Use ownership flags instead.
2017-08-16 19:51:46 +10:00
Campbell Barton
b4d053efc7
Gawain API naming refactor
...
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
2017-06-19 20:18:04 +10:00
Mike Erwin
b02786ae6b
Gawain: use ShaderInterface to manage uniforms
...
This eliminates tons of glGetUniformLocation calls from the drawing loop. Vast majority of code can keep making the same function calls. They're just faster now!
- Batch_Uniform*
- immUniform*
- gpuBindMatrices
- and others
2017-04-13 01:07:51 -04:00
Mike Erwin
0947c97fad
OpenGL: use PRIM instead of GL enum everywhere else
...
Well, everywhere that uses Gawain for drawing. Places that call OpenGL directly still use GL enums.
Part of T49043
2017-04-08 01:19:48 -04:00
Mike Erwin
0debbe2b7f
Gawain: VertexFormat_add_attrib (function name change)
...
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_ ... )
2017-04-06 01:18:12 -04:00
Mike Erwin
c2f5cd8f64
Gawain: add VertexBuffer prefix to functions
...
See intern/gawain for the API change. Other files are updated to use the new names.
2017-04-06 01:18:12 -04:00
Campbell Barton
3b6eaf8d96
Cleanup: style
2017-04-03 22:10:39 +10:00
Clément Foucault
2a62ec8003
OpenGL: drawobject.c (cont)
2017-03-09 03:21:42 +01:00
Clément Foucault
583373f049
OpenGL: Object bound drawing.
2017-03-06 20:57:16 +01:00
Clément Foucault
0790976b6c
OpenGL immediate mode: fix inverted normal in sphere batch
2017-02-14 00:35:25 +01:00
Clément Foucault
dfadb45254
OpenGL immediate mode: gluSphere replacement
...
Updated interface_draw.c to use the new sphere batch.
2017-02-11 00:39:17 +01:00
Mike Erwin
5eddb80513
Extend Gawain to use Blender's built-in shaders
...
Was already done for immediate mode, but rearranged code to make a clean separation. Cleaned up #includes for code that uses this feature.
Added same for batched rendering.
2016-09-15 18:41:28 +02:00