mirror of https://github.com/axmolengine/axmol.git
commit
63fdb2adf1
|
@ -47,17 +47,8 @@ NS_CC_BEGIN
|
|||
*/
|
||||
struct MeshVertexAttrib
|
||||
{
|
||||
//attribute size
|
||||
//GLint size;
|
||||
//GL_FLOAT
|
||||
backend::VertexFormat type;
|
||||
|
||||
//TODO arnold change vertexAttrib to std::string
|
||||
//VERTEX_ATTRIB_POSITION,VERTEX_ATTRIB_COLOR,VERTEX_ATTRIB_TEX_COORD,VERTEX_ATTRIB_NORMAL, VERTEX_ATTRIB_BLEND_WEIGHT, VERTEX_ATTRIB_BLEND_INDEX, GLProgram for detail
|
||||
shaderinfos::VertexKey vertexAttrib;
|
||||
//size in bytes
|
||||
//int attribSizeBytes;
|
||||
|
||||
int getAttribSizeBytes() const;
|
||||
};
|
||||
|
||||
|
|
|
@ -207,12 +207,6 @@ public:
|
|||
|
||||
void draw(Renderer* renderer, float globalZ, const Mat4& transform, uint32_t flags, unsigned int lightMask, const Vec4& color, bool forceDepthWrite);
|
||||
|
||||
/**
|
||||
* Get the MeshCommand.
|
||||
*/
|
||||
//TODO arnold
|
||||
//MeshCommand& getMeshCommand() { return _meshCommand; }
|
||||
|
||||
/**skin setter*/
|
||||
void setSkin(MeshSkin* skin);
|
||||
/**Mesh index data setter*/
|
||||
|
|
|
@ -82,12 +82,7 @@ MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
|
|||
//CC_SAFE_RETAIN(vertexdata->_vertexBuffer);
|
||||
|
||||
int offset = 0;
|
||||
//TODO arnold set layout
|
||||
//for (int i = 0; i < meshdata.attribs.size(); i ++) {
|
||||
// auto& it = meshdata.attribs[i];
|
||||
// auto attr = VertexStreamAttribute(offset, it.vertexAttrib, it.type);
|
||||
// offset += it.getAttribSizeBytes();
|
||||
//}
|
||||
|
||||
vertexdata->_sizePerVertex = meshdata.getPerVertexSize();
|
||||
|
||||
vertexdata->_attribs = meshdata.attribs;
|
||||
|
|
|
@ -124,10 +124,6 @@ public:
|
|||
|
||||
virtual void setVertexLayout(const backend::VertexLayout &vertexLayout);
|
||||
|
||||
/** just remember bind attributes */
|
||||
//TODO arnold: impl setProgram
|
||||
//virtual void setGLProgram(GLProgram *glprogram) override;
|
||||
|
||||
/*
|
||||
* Get AABB
|
||||
* If the sprite has animation, it can't be calculated accurately,
|
||||
|
|
|
@ -95,21 +95,6 @@ bool VertexAttribBinding::init(MeshIndexData* meshIndexData, Pass* pass, MeshCom
|
|||
|
||||
_vertexLayout = &command->getPipelineDescriptor().vertexLayout;
|
||||
|
||||
// One-time initialization.
|
||||
//TODO arnold
|
||||
// if (__maxVertexAttribs == 0)
|
||||
// {
|
||||
// GLint temp;
|
||||
// glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &temp);
|
||||
//
|
||||
// __maxVertexAttribs = temp;
|
||||
// if (__maxVertexAttribs <= 0)
|
||||
// {
|
||||
// CCLOGERROR("The maximum number of vertex attributes supported by OpenGL on the current device is 0 or less.");
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
_meshIndexData = meshIndexData;
|
||||
_meshIndexData->retain();
|
||||
_programState = programState;
|
||||
|
|
|
@ -152,8 +152,6 @@ bool Director::init(void)
|
|||
initMatrixStack();
|
||||
|
||||
_renderer = new (std::nothrow) Renderer;
|
||||
//TODO arnold
|
||||
//RenderState::initialize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1051,9 +1049,7 @@ void Director::reset()
|
|||
// cocos2d-x specific data structures
|
||||
UserDefault::destroyInstance();
|
||||
resetMatrixStack();
|
||||
//TODO arnold
|
||||
//RenderState::finalize();
|
||||
|
||||
|
||||
destroyTextureCache();
|
||||
}
|
||||
|
||||
|
@ -1078,10 +1074,6 @@ void Director::restartDirector()
|
|||
{
|
||||
reset();
|
||||
|
||||
// RenderState need to be reinitialized
|
||||
//TODO arnold
|
||||
//RenderState::initialize();
|
||||
|
||||
// Texture cache need to be reinitialized
|
||||
initTextureCache();
|
||||
|
||||
|
|
|
@ -264,7 +264,6 @@ bool Material::parseSampler(backend::ProgramState* programState, Properties* sam
|
|||
}
|
||||
|
||||
// optionals
|
||||
//TODO arnold setSamplerDescriptor
|
||||
{
|
||||
Texture2D::TexParams texParams;
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ int ProgramMTL::getMaxFragmentLocation() const
|
|||
|
||||
const std::unordered_map<std::string, AttributeBindInfo> ProgramMTL::getActiveAttributes() const
|
||||
{
|
||||
//TODO arnold
|
||||
return _vertexShader->getAttributeInfo();
|
||||
}
|
||||
|
||||
|
|
|
@ -141,12 +141,11 @@ void DrawNode3D::updateCommand(cocos2d::Renderer* renderer,const Mat4 &transform
|
|||
|
||||
_programStateLine->setUniform(_locMVPMatrix, mvp.m, sizeof(mvp.m));
|
||||
|
||||
//TODO arnold: _customcommand should support enable depth !!!
|
||||
// glEnable(GL_DEPTH_TEST);
|
||||
//TODO arnold
|
||||
//RenderState::StateBlock::_globalState->setDepthTest(true);
|
||||
|
||||
// cocos2d::utils::setBlending(_blendFunc.src, _blendFunc.dst);
|
||||
auto &blend = _customCommand.getPipelineDescriptor().blendDescriptor;
|
||||
blend.blendEnabled = true;
|
||||
blend.sourceRGBBlendFactor = blend.sourceAlphaBlendFactor = _blendFunc.src;
|
||||
blend.destinationRGBBlendFactor = blend.destinationAlphaBlendFactor = _blendFunc.dst;
|
||||
|
||||
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _bufferLines.size());
|
||||
}
|
||||
|
|
|
@ -2303,7 +2303,6 @@ Animate3DCallbackTest::Animate3DCallbackTest()
|
|||
_sprite3d->getMeshByName("Girl_Shoes02")->setVisible(false);
|
||||
_sprite3d->getMeshByName("Girl_Hair02")->setVisible(false);
|
||||
|
||||
//TODO arnold particlesystem3d not unimpl
|
||||
auto rootps = PUParticleSystem3D::create("explosionSystem.pu");
|
||||
rootps->stopParticleSystem();
|
||||
rootps->setScale(4.0f);
|
||||
|
|
Loading…
Reference in New Issue