Age | Commit message (Collapse) | Author |
|
Before now it lived in source/blender/gpu for convenience. Only a few files in the gpu module use Gawain directly.
Tested on Mac, time to push and test on Windows.
Todo: some CMake magic to make it easy to
#include "gawain/some_header.h"
from any C or H file. Main problem here is the many editors that include GPU_immediate.h which includes Gawain's immediate.h -- is there a way to avoid changing every editor's CMakeLists?
|
|
So we can store (for example) vertex positions in one buffer and normals + colors in another buffer. Not super exciting right now, but very useful once we start changing some attribute values.
Supports future work by Clément et al. Only tested with one VBO per Batch since that's all our current code uses.
|
|
This commit have a serrious perf issue when drawing nurbs (+5 times slower) but it gets rid of deprecated functions.
|
|
I had to make some changes to the sep_gaussian_blur shader to be compliant for gl 3.3 leap
|
|
Support more attribs for interesting instancing
|
|
|
|
to init a batch without allocating memory
|
|
Initial work by Clément Foucault with contributions from Dalai Felinto
(mainly per-collection engine settings logic, and depsgraph iterator placeholder).
This makes Blender require OpenGL 3.3. Which means Intel graphic card
and OSX will break. Disable CLAY_ENGINE in CMake in those cases.
This is a prototype render engine intended to help the design of real
render engines. This is mainly an engine with enphasis in matcap and
ambient occlusion.
Implemented Features
--------------------
* Clay Render Engine, following the new API, to be used as reference for
future engines
* A more complete Matcap customization with more options
* Per-Collection render engine settings
* New Ground Truth AO - not enabled
Missing Features
----------------
* Finish object edit mode
- Fix shaders to use new matrix
- Fix artifacts when edge does off screen
- Fix depth issue
- Selection sillhouette
- Mesh wires
- Use mesh normals (for higher quality matcap)
- Non-Mesh objects drawing
- Widget drawing
- Performance issues
* Finish mesh edit mode
- Derived-Mesh-less edit mode API (mesh_rende.c)
* General edit mode
- Per-collection edit mode settings
* General engines
- Per-collection engine settings
(they are their, but they still need to be flushed by depsgraph, and
used by the drawing code)
|
|
This includes a few fixes in the MBC_ api.
The idea here is for this to be the only interface the render engines
will deal with for the meshes.
If we need to expose special options for sculpting engine we refactor
this accordingly. But for now we are shaping this in a per-case base.
Note:
* We still need to hook up to the depsgraph to force clear/update of
batch_cache when mesh changes
(I'm waiting for Sergey Sharybin's depsgraph update for this though)
* Also ideally we could/should use BMesh directly instead of
DerivedMesh, but this will do for now.
Note 2:
In the end I renamed the `BKE_mesh_render` functions to `static
mesh_render`. We can re-expose them as BKE_* later once we need it.
Reviewers: merwin
Subscribers: fclem
Differential Revision: https://developer.blender.org/D2476
|
|
For a few reasons:
- separate enum sets for separate concepts
- debug with symbolic names instead of 0x4e72
- prepare for a Vulkan future
|
|
Typical pattern:
Batch_set_program
Batch_Uniform(s)
Batch_draw
|
|
|
|
Fixed compile error in debug build (thanks mont29)
Renamed some functions for consistency.
New features:
Create a Batch with immediate mode! Just use immBeginBatch instead of immBegin. You can keep the result and draw it as many times as you like. This partially replaces the need for display lists.
Copy a VertexFormat, and create a VertexBuffer using an existing format.
Resize a VertexBuffer to a different number of vertices. (can only resize BEFORE using it to draw)
|
|
Follow-up to rBddb1d5648dbd
API is nearly complete but untested.
1) create batch with vertex buffer & optional index buffer
2) choose shader program
3) draw!
|
|
Vertex Buffer to store vertex attribute data.
Element List (AKA Index Buffer) to select which vertices to use.
Batch combines these into an object that can be built once then drawn
many times.
Porting over from the C++ version… Most of this C code is compiled but
unused. Some of it is not even compiled. Committing now in case I’m
lost at sea.
|