diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 00:45:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 14:59:51 +0300 |
commit | bb2aeb4504907cab1cf8c4afc4dd1d6495c940e4 (patch) | |
tree | 550d043273b767d55ef32409e58de17cb75e724e /source/blender/gpu/intern/gpu_batch_private.hh | |
parent | 99e3541d3b1a1fc62fcd24e9f0d12a631e4caead (diff) |
GPUVertBuf: Rename GPUVertBuf to VertBuf and add some getters
to avoid more typecasts.
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch_private.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch_private.hh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_batch_private.hh b/source/blender/gpu/intern/gpu_batch_private.hh index dae9c885ee1..c71670d4f1f 100644 --- a/source/blender/gpu/intern/gpu_batch_private.hh +++ b/source/blender/gpu/intern/gpu_batch_private.hh @@ -30,6 +30,7 @@ #include "GPU_context.h" #include "gpu_index_buffer_private.hh" +#include "gpu_vertex_buffer_private.hh" namespace blender { namespace gpu { @@ -46,10 +47,18 @@ class Batch : public GPUBatch { virtual void draw(int v_first, int v_count, int i_first, int i_count) = 0; /* Convenience casts. */ - IndexBuf *elem_(void) + IndexBuf *elem_(void) const { return unwrap(elem); - }; + } + VertBuf *verts_(const int index) const + { + return unwrap(verts[index]); + } + VertBuf *inst_(const int index) const + { + return unwrap(inst[index]); + } }; } // namespace gpu |