Remove unused varaibles

This commit is contained in:
halx99 2020-10-20 19:38:33 +08:00
parent d88518f508
commit 8dafaf3b67
2 changed files with 0 additions and 24 deletions

View File

@ -60,26 +60,11 @@ namespace
CommandBufferGL::CommandBufferGL()
{
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_defaultFBO);
#if CC_ENABLE_CACHE_TEXTURE_DATA
_backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom*){
if(_generatedFBO)
glGenFramebuffers(1, &_generatedFBO); //recreate framebuffer
});
Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_backToForegroundListener, -1);
#endif
}
CommandBufferGL::~CommandBufferGL()
{
if(_generatedFBO)
glDeleteFramebuffers(1, &_generatedFBO);
cleanResources();
#if CC_ENABLE_CACHE_TEXTURE_DATA
Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener);
#endif
}
void CommandBufferGL::beginFrame()

View File

@ -198,15 +198,6 @@ private:
void setUniform(bool isArray, GLuint location, unsigned int size, GLenum uniformType, void* data) const;
void cleanResources();
// The frame buffer generated by engine. All frame buffer other than default frame buffer share it.
GLuint _generatedFBO = 0;
bool _generatedFBOBindColor = false;
bool _generatedFBOBindDepth = false;
bool _generatedFBOBindStencil = false;
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
bool _framebufferReadWriteDisabled = false;
#endif
GLint _defaultFBO = 0; // The value gets from glGetIntegerv, so need to use GLint
GLuint _currentFBO = 0;
BufferGL* _vertexBuffer = nullptr;