From 8d570441796bab4f2e84ebb391f60211ecf0f108 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 6 Dec 2018 21:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84GetData?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/graph/VertexBufferBase.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/hgl/graph/VertexBufferBase.h b/inc/hgl/graph/VertexBufferBase.h index a18fa0a6..8513a8c7 100644 --- a/inc/hgl/graph/VertexBufferBase.h +++ b/inc/hgl/graph/VertexBufferBase.h @@ -42,6 +42,7 @@ namespace hgl int GetCount()const { return count; } ///<取得数据数量 int GetStride()const { return dc_num*GetDataBytes();} ///<取得每一组数据字节数 void * GetData()const { return mem_data;} ///<取得数据指针 + void * GetData(const uint offset){return ((char *)mem_data)+GetDataBytes()*offset;}///<取得数据指针 int GetBytes()const { return bytes; } ///<取得数据字节数 public: //以下函数在各渲染器内部实现 @@ -49,7 +50,7 @@ namespace hgl bool CreateVertexBuffer(uint type); void ChangeVertexBuffer(int,int,void *); //void BindVertexBuffer(); - int GetBufferIndex()const; ///<取得缓冲区索引 + int GetBufferIndex()const; ///<取得缓冲区索引 void CloseVertexBuffer(); };//class VertexBufferBase }//namespace graph