diff --git a/cocos/3d/CCBillBoard.cpp b/cocos/3d/CCBillBoard.cpp index 9371aeabb1..62279374e2 100644 --- a/cocos/3d/CCBillBoard.cpp +++ b/cocos/3d/CCBillBoard.cpp @@ -28,25 +28,17 @@ #include "base/CCCamera.h" #include "renderer/CCRenderer.h" #include "renderer/CCGLProgramCache.h" -#include "renderer/CCVertexIndexBuffer.h" NS_CC_BEGIN BillBorad::BillBorad() : _zDepthInView(0.0f) -//, _vertexBuffer(nullptr) -//, _indexBuffer(nullptr) { } BillBorad::~BillBorad() { - //if (_vertexBuffer) - // _vertexBuffer->release(); - - //if (_indexBuffer) - // _indexBuffer->release(); } BillBorad* BillBorad::createWithTexture(Texture2D *texture) @@ -54,7 +46,6 @@ BillBorad* BillBorad::createWithTexture(Texture2D *texture) BillBorad *billborad = new (std::nothrow) BillBorad(); if (billborad && billborad->initWithTexture(texture)) { - //billborad->genRenderInformation(); billborad->autorelease(); return billborad; } @@ -68,7 +59,6 @@ BillBorad* BillBorad::create(const std::string& filename) BillBorad *billborad = new (std::nothrow) BillBorad(); if (billborad && billborad->initWithFile(filename)) { - //billborad->genRenderInformation(); billborad->autorelease(); return billborad; } @@ -81,7 +71,6 @@ BillBorad* BillBorad::create(const std::string& filename, const Rect& rect) BillBorad *billborad = new (std::nothrow) BillBorad(); if (billborad && billborad->initWithFile(filename, rect)) { - //billborad->genRenderInformation(); billborad->autorelease(); return billborad; } @@ -94,7 +83,6 @@ BillBorad* BillBorad::create() BillBorad *billborad = new (std::nothrow) BillBorad(); if (billborad && billborad->init()) { - //billborad->genRenderInformation(); billborad->autorelease(); return billborad; } @@ -120,29 +108,8 @@ void BillBorad::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) //if(_insideBounds) { _quadCommand.init(_zDepthInView, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, transform * _mv); - //_meshCommand.init(-modelViewMat.m[14], _texture->getName(), getGLProgramState(), _blendFunc, _vertexBuffer->getVBO(), _indexBuffer->getVBO(), GL_TRIANGLES, GL_UNSIGNED_SHORT, _indexBuffer->getIndexNumber(), transMat); renderer->addTransparentCommand(&_quadCommand); } } -//void BillBorad::genRenderInformation() -//{ -// _vertexBuffer = VertexBuffer::create(sizeof(_quad), 1); -// _vertexBuffer->updateVertices((void*)&_quad, 1, 0); -// _vertexBuffer->retain(); -// -// std::vector indices; -// indices.push_back(0);indices.push_back(1);indices.push_back(2); -// indices.push_back(3);indices.push_back(2);indices.push_back(1); -// _indexBuffer = IndexBuffer::create(IndexBuffer::IndexType::INDEX_TYPE_SHORT_16, indices.size()); -// _indexBuffer->updateIndices((void*)&indices[0], (int)indices.size(), 0); -// _indexBuffer->retain(); -// -//#define kQuadSize sizeof(_quad.bl) -// setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); -// getGLProgramState()->setVertexAttribPointer(GLProgram::ATTRIBUTE_NAME_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, vertices)); -// getGLProgramState()->setVertexAttribPointer(GLProgram::ATTRIBUTE_NAME_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, colors)); -// getGLProgramState()->setVertexAttribPointer(GLProgram::ATTRIBUTE_NAME_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, texCoords)); -//} - NS_CC_END diff --git a/cocos/3d/CCBillBoard.h b/cocos/3d/CCBillBoard.h index e281a1d10a..24ffe0342c 100644 --- a/cocos/3d/CCBillBoard.h +++ b/cocos/3d/CCBillBoard.h @@ -26,13 +26,9 @@ #define __CCBILLBOARD_H__ #include "2d/CCSprite.h" -#include "renderer/CCMeshCommand.h" NS_CC_BEGIN -//class VertexBuffer; -//class IndexBuffer; - /** * Inherit from Sprite, achieve BillBorad. */ @@ -90,13 +86,6 @@ CC_CONSTRUCTOR_ACCESS: protected: - //void genRenderInformation(); - -protected: - -// MeshCommand _meshCommand; -// VertexBuffer *_vertexBuffer; -// IndexBuffer *_indexBuffer; Mat4 _preViewMat; Mat4 _mv; float _zDepthInView; diff --git a/tests/cpp-tests/proj.android/project.properties b/tests/cpp-tests/proj.android/project.properties index e8b0265294..572f7c30de 100644 --- a/tests/cpp-tests/proj.android/project.properties +++ b/tests/cpp-tests/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-20 +target=android-10 android.library.reference.1=../../../cocos/platform/android/java