Clément Foucault
3a9ee33328
GPU: Fix partial draw of batches with index buffers
2018-10-01 15:14:46 +02:00
Clément Foucault
3ecba657bb
GPU: Replace malloc/calloc/realloc/free with MEM_* counterpart
2018-07-31 18:21:23 +02:00
Clément Foucault
5037dd8abd
GPU: Add GC to FBOs and UBOs and centralize all GCs
...
GPUFrameBuffers were being free when no context was attached or in the
wrong gl context. This make sure this does not happen again.
You can now safely free any gl resource from any thread (well as long as
it's not used anymore!).
2018-07-19 16:13:15 +02:00
Campbell Barton
428743a9b0
Cleanup: style for GPU module
2018-07-18 23:10:31 +10:00
Clément Foucault
8cd7828792
GWN: Port to GPU module: Replace GWN prefix by GPU
2018-07-18 11:49:15 +02:00
Clément Foucault
247ad2034d
GWN: Port to GPU module: Move files to GPU
...
This does not include all the struct and type renaming. Only files were
renamed.
gwn_batch.c/h was fusioned with GPU_batch.c/h
gwn_immediate.c/h was fusioned with GPU_immediate.c/h
gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-07-18 00:17:57 +02:00
Campbell Barton
09431033e9
Cleanup: split GPU_batch
...
Split out presets and utilities for creating batches.
These functions are quite specialized and not related to typical usage.
2018-07-15 10:51:49 +02:00
Campbell Barton
5a716701e8
GPU_batch: fix error w/ interior line removal
...
Caused glitch w/ navigation icons showing inner lines.
2018-07-14 15:59:47 +02:00
Campbell Barton
804205babe
Cleanup: rename 'ct' to 'len' for gawain
2018-07-08 13:05:41 +02:00
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