diff --git a/core/renderer/backend/opengl/ProgramGL.cpp b/core/renderer/backend/opengl/ProgramGL.cpp index 3686b20076..ba1b17ad1e 100644 --- a/core/renderer/backend/opengl/ProgramGL.cpp +++ b/core/renderer/backend/opengl/ProgramGL.cpp @@ -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()); diff --git a/core/renderer/backend/opengl/ProgramGL.h b/core/renderer/backend/opengl/ProgramGL.h index 2fb0b4a5f8..6a34c8c168 100644 --- a/core/renderer/backend/opengl/ProgramGL.h +++ b/core/renderer/backend/opengl/ProgramGL.h @@ -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;