Remove unnecessary APIs

This commit is contained in:
halx99 2022-09-26 23:20:54 +08:00
parent 32a6a2b1ac
commit ad69ed003a
9 changed files with 0 additions and 75 deletions

View File

@ -170,7 +170,6 @@ void DrawNode::updateShaderInternal(CustomCommand& cmd,
auto program = backend::Program::getBuiltinProgram(programType);
pipelinePS = new backend::ProgramState(program);
setVertexLayout(cmd);
cmd.setPrimitiveType(primitiveType);
cmd.setDrawType(drawType);
}
@ -181,10 +180,6 @@ void DrawNode::freeShaderInternal(CustomCommand& cmd)
AX_SAFE_RELEASE_NULL(pipelinePS);
}
void DrawNode::setVertexLayout(CustomCommand& cmd)
{
}
void DrawNode::updateBlendState(CustomCommand& cmd)
{
backend::BlendDescriptor& blendDescriptor = cmd.getPipelineDescriptor().blendDescriptor;

View File

@ -378,7 +378,6 @@ protected:
CustomCommand::PrimitiveType primitiveType);
void freeShaderInternal(CustomCommand& cmd);
void setVertexLayout(CustomCommand& cmd);
void updateBlendState(CustomCommand& cmd);
void updateUniforms(const Mat4& transform, CustomCommand& cmd);

View File

@ -674,10 +674,6 @@ static Texture2D* _getTexture(Label* label)
return texture;
}
void Label::setVertexLayout()
{
}
bool Label::setProgramState(backend::ProgramState* programState, bool needsRetain)
{
if (Node::setProgramState(programState, needsRetain))
@ -689,7 +685,6 @@ bool Label::setProgramState(backend::ProgramState* programState, bool needsRetai
}
auto& quadPipeline = _quadCommand.getPipelineDescriptor();
setVertexLayout();
quadPipeline.programState = _programState;
return true;
}
@ -758,7 +753,6 @@ void Label::updateShaderProgram()
}
auto& quadPipeline = _quadCommand.getPipelineDescriptor();
setVertexLayout();
quadPipeline.programState = _programState;
}

View File

@ -801,7 +801,6 @@ protected:
virtual void updateColor() override;
void updateUniformLocations();
void setVertexLayout();
void updateBlendState();
void updateEffectUniforms(BatchCommand& batch,
TextureAtlas* textureAtlas,

View File

@ -355,10 +355,6 @@ void Sprite::setTexture(std::string_view filename)
setTextureRect(rect);
}
void Sprite::setVertexLayout()
{
}
void Sprite::setProgramState(uint32_t type)
{
setProgramStateWithRegistry(type, _texture);
@ -374,7 +370,6 @@ bool Sprite::setProgramState(backend::ProgramState* programState, bool needsReta
_mvpMatrixLocation = _programState->getUniformLocation(backend::Uniform::MVP_MATRIX);
setVertexLayout();
updateProgramStateTexture(_texture);
setMVPMatrixUniform();
return true;

View File

@ -620,8 +620,6 @@ public:
*/
virtual bool initWithFile(std::string_view filename, const Rect& rect);
virtual void setVertexLayout();
void setProgramState(uint32_t type) override;
protected:

View File

@ -121,11 +121,6 @@ void SpriteBatchNode::setUniformLocation()
_textureLocation = _programState->getUniformLocation("u_tex0");
}
void SpriteBatchNode::setVertexLayout()
{
AXASSERT(_programState, "programState should not be nullptr");
}
bool SpriteBatchNode::setProgramState(backend::ProgramState* programState, bool needsRetain)
{
AXASSERT(programState, "programState should not be nullptr");
@ -134,7 +129,6 @@ bool SpriteBatchNode::setProgramState(backend::ProgramState* programState, bool
auto& pipelineDescriptor = _quadCommand.getPipelineDescriptor();
pipelineDescriptor.programState = _programState;
setVertexLayout();
updateProgramStateTexture(_textureAtlas->getTexture());
setUniformLocation();
return true;

View File

@ -263,7 +263,6 @@ protected:
void updateAtlasIndex(Sprite* sprite, ssize_t* curIndex);
void swap(ssize_t oldIndex, ssize_t newIndex);
void updateBlendFunc();
void setVertexLayout();
void setUniformLocation();
TextureAtlas* _textureAtlas = nullptr;

View File

@ -58824,53 +58824,6 @@ int lua_ax_base_Sprite_getSpriteFrame(lua_State* tolua_S)
return 0;
}
int lua_ax_base_Sprite_setVertexLayout(lua_State* tolua_S)
{
int argc = 0;
ax::Sprite* cobj = nullptr;
bool ok = true;
#if _AX_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if _AX_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ax.Sprite",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (ax::Sprite*)tolua_tousertype(tolua_S,1,0);
#if _AX_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_base_Sprite_setVertexLayout'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_base_Sprite_setVertexLayout'", nullptr);
return 0;
}
cobj->setVertexLayout();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.Sprite:setVertexLayout",argc, 0);
return 0;
#if _AX_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_base_Sprite_setVertexLayout'.",&tolua_err);
#endif
return 0;
}
int lua_ax_base_Sprite_removeAllChildrenWithCleanup(lua_State* tolua_S)
{
int argc = 0;
@ -59915,7 +59868,6 @@ int lua_register_ax_base_Sprite(lua_State* tolua_S)
tolua_function(tolua_S,"getBlendFunc",lua_ax_base_Sprite_getBlendFunc);
tolua_function(tolua_S,"setCenterRect",lua_ax_base_Sprite_setCenterRect);
tolua_function(tolua_S,"getSpriteFrame",lua_ax_base_Sprite_getSpriteFrame);
tolua_function(tolua_S,"setVertexLayout",lua_ax_base_Sprite_setVertexLayout);
tolua_function(tolua_S,"removeAllChildrenWithCleanup",lua_ax_base_Sprite_removeAllChildrenWithCleanup);
tolua_function(tolua_S,"getResourceName",lua_ax_base_Sprite_getResourceName);
tolua_function(tolua_S,"isDirty",lua_ax_base_Sprite_isDirty);