代码排版与补齐未初始化变量
This commit is contained in:
parent
0be9cb3f74
commit
b5a5cb16c0
@ -12,6 +12,7 @@ PrimitiveData::PrimitiveData(const VIL *_vil,const uint32_t vc)
|
|||||||
vil=_vil;
|
vil=_vil;
|
||||||
|
|
||||||
vertex_count=vc;
|
vertex_count=vc;
|
||||||
|
index_count=0;
|
||||||
|
|
||||||
vab_list=hgl_zero_new<VAB *>(_vil->GetVertexAttribCount());
|
vab_list=hgl_zero_new<VAB *>(_vil->GetVertexAttribCount());
|
||||||
vab_map_list=new VABMap[_vil->GetVertexAttribCount()];
|
vab_map_list=new VABMap[_vil->GetVertexAttribCount()];
|
||||||
@ -87,7 +88,7 @@ VABMap *PrimitiveData::GetVABMap(const int vab_index)
|
|||||||
return vab_map;
|
return vab_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexBuffer *PrimitiveData::InitIBO(const uint32_t ic,IndexType it)
|
IndexBuffer *PrimitiveData::InitIBO(const int ic,IndexType it)
|
||||||
{
|
{
|
||||||
if(ibo)delete ibo;
|
if(ibo)delete ibo;
|
||||||
|
|
||||||
@ -105,7 +106,7 @@ IndexBuffer *PrimitiveData::InitIBO(const uint32_t ic,IndexType it)
|
|||||||
|
|
||||||
void PrimitiveData::UnmapAll()
|
void PrimitiveData::UnmapAll()
|
||||||
{
|
{
|
||||||
for(int i=0;i<vil->GetVertexAttribCount();i++)
|
for(uint32_t i=0;i<vil->GetVertexAttribCount();i++)
|
||||||
vab_map_list[i].Unmap();
|
vab_map_list[i].Unmap();
|
||||||
|
|
||||||
ibo_map.Unmap();
|
ibo_map.Unmap();
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
VAB * InitVAB (const int vab_index,const void *data);
|
VAB * InitVAB (const int vab_index,const void *data);
|
||||||
VABMap * GetVABMap (const int vab_index);
|
VABMap * GetVABMap (const int vab_index);
|
||||||
|
|
||||||
IndexBuffer * InitIBO(const uint32_t index_count,IndexType it);
|
IndexBuffer * InitIBO (const int index_count,IndexType it);
|
||||||
IndexBuffer * GetIBO (){return ibo;}
|
IndexBuffer * GetIBO (){return ibo;}
|
||||||
IBMap * GetIBMap (){return &ibo_map;}
|
IBMap * GetIBMap (){return &ibo_map;}
|
||||||
uint32_t GetIndexCount ()const{return index_count;}
|
uint32_t GetIndexCount ()const{return index_count;}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user