diff options
Diffstat (limited to 'drivers/gles3/storage/mesh_storage.h')
-rw-r--r-- | drivers/gles3/storage/mesh_storage.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h index 25b15ab6a6..f52a60d067 100644 --- a/drivers/gles3/storage/mesh_storage.h +++ b/drivers/gles3/storage/mesh_storage.h @@ -84,6 +84,14 @@ struct Mesh { uint32_t index_count = 0; uint32_t index_buffer_size = 0; + struct Wireframe { + GLuint index_buffer = 0; + uint32_t index_count = 0; + uint32_t index_buffer_size = 0; + }; + + Wireframe *wireframe = nullptr; + struct LOD { float edge_length = 0.0; uint32_t index_count = 0; @@ -376,6 +384,16 @@ public: } } + _FORCE_INLINE_ GLuint mesh_surface_get_index_buffer_wireframe(void *p_surface) const { + Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface); + + if (s->wireframe) { + return s->wireframe->index_buffer; + } + + return 0; + } + _FORCE_INLINE_ GLenum mesh_surface_get_index_type(void *p_surface) const { Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface); |