mirror of https://github.com/axmolengine/axmol.git
weak ref to vertexdata
This commit is contained in:
parent
a7a39d71f5
commit
9cefa3a9da
|
@ -56,7 +56,6 @@ MeshIndexData* MeshIndexData::create(const std::string& id, MeshVertexData* vert
|
||||||
meshindex->_indexBuffer = indexbuffer;
|
meshindex->_indexBuffer = indexbuffer;
|
||||||
meshindex->_vertexData = vertexData;
|
meshindex->_vertexData = vertexData;
|
||||||
indexbuffer->retain();
|
indexbuffer->retain();
|
||||||
vertexData->retain();
|
|
||||||
meshindex->_aabb = aabb;
|
meshindex->_aabb = aabb;
|
||||||
|
|
||||||
meshindex->autorelease();
|
meshindex->autorelease();
|
||||||
|
@ -78,7 +77,6 @@ MeshIndexData::MeshIndexData()
|
||||||
MeshIndexData::~MeshIndexData()
|
MeshIndexData::~MeshIndexData()
|
||||||
{
|
{
|
||||||
CC_SAFE_RELEASE(_indexBuffer);
|
CC_SAFE_RELEASE(_indexBuffer);
|
||||||
CC_SAFE_RELEASE(_vertexData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
|
MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
|
||||||
|
|
|
@ -86,7 +86,7 @@ CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
IndexBuffer* _indexBuffer; //index buffer
|
IndexBuffer* _indexBuffer; //index buffer
|
||||||
MeshVertexData* _vertexData; //vertex buffer
|
MeshVertexData* _vertexData; //vertex buffer, wreak ref
|
||||||
AABB _aabb; // original aabb of the submesh
|
AABB _aabb; // original aabb of the submesh
|
||||||
std::string _id; //id
|
std::string _id; //id
|
||||||
GLenum _primitiveType;
|
GLenum _primitiveType;
|
||||||
|
|
Loading…
Reference in New Issue