From b3e228ef436be3af61dda6a35fc6856599dd8e90 Mon Sep 17 00:00:00 2001 From: cutealien Date: Wed, 24 Jan 2024 11:44:49 +0000 Subject: [PATCH] Make more internals for CVertexBuffer and CIndexBuffer public I don't see the point of giving access to Indices and Vertices if they are of a class type which is private. Now it's at least possible (with a few casts) to access the freaking array having the data which is often all we want. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6585 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/CIndexBuffer.h | 3 ++- include/CVertexBuffer.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/CIndexBuffer.h b/include/CIndexBuffer.h index a29d1379..b8059fdc 100644 --- a/include/CIndexBuffer.h +++ b/include/CIndexBuffer.h @@ -14,6 +14,8 @@ namespace scene class CIndexBuffer : public IIndexBuffer { + public: + // Virtual function wrapper around irr::core::array class IIndexList { @@ -88,7 +90,6 @@ namespace scene } }; - public: IIndexList *Indices; CIndexBuffer(video::E_INDEX_TYPE IndexType) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1) diff --git a/include/CVertexBuffer.h b/include/CVertexBuffer.h index 9b891f94..cf10081c 100644 --- a/include/CVertexBuffer.h +++ b/include/CVertexBuffer.h @@ -15,6 +15,7 @@ namespace scene class CVertexBuffer : public IVertexBuffer { + public: class IVertexList { public: @@ -92,7 +93,6 @@ namespace scene virtual video::E_VERTEX_TYPE getType() const IRR_OVERRIDE {return T::getType();} }; - public: IVertexList *Vertices; CVertexBuffer(video::E_VERTEX_TYPE vertexType) : Vertices(0),