Fix memory leak

This commit is contained in:
halx99 2022-10-20 20:18:32 +08:00
parent 154009da5f
commit 4228b658af
2 changed files with 0 additions and 7 deletions

View File

@ -72,7 +72,6 @@ ProgramGL::ProgramGL(std::string_view vertexShader, std::string_view fragmentSha
EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom*) { this->reloadProgram(); });
Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_backToForegroundListener, -1);
#endif
setupVertexLayout();
}
ProgramGL::~ProgramGL()
@ -203,11 +202,6 @@ void ProgramGL::computeLocations()
_builtinUniformLocation[Uniform::TEXTURE1].location[0] = location;
}
void ProgramGL::setupVertexLayout()
{
_vertexLayout = new VertexLayout();
}
bool ProgramGL::getAttributeLocation(std::string_view attributeName, unsigned int& location) const
{
GLint loc = glGetAttribLocation(_program, attributeName.data());

View File

@ -156,7 +156,6 @@ private:
bool getAttributeLocation(std::string_view attributeName, unsigned int& location) const;
void computeUniformInfos();
void computeLocations();
void setupVertexLayout();
#if AX_ENABLE_CACHE_TEXTURE_DATA
virtual void reloadProgram();
virtual int getMappedLocation(int location) const override;