mirror of https://github.com/axmolengine/axmol.git
Remove unused varaibles
This commit is contained in:
parent
d88518f508
commit
8dafaf3b67
|
@ -60,26 +60,11 @@ namespace
|
||||||
CommandBufferGL::CommandBufferGL()
|
CommandBufferGL::CommandBufferGL()
|
||||||
{
|
{
|
||||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_defaultFBO);
|
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()
|
CommandBufferGL::~CommandBufferGL()
|
||||||
{
|
{
|
||||||
if(_generatedFBO)
|
|
||||||
glDeleteFramebuffers(1, &_generatedFBO);
|
|
||||||
|
|
||||||
cleanResources();
|
cleanResources();
|
||||||
|
|
||||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
|
||||||
Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandBufferGL::beginFrame()
|
void CommandBufferGL::beginFrame()
|
||||||
|
|
|
@ -198,15 +198,6 @@ private:
|
||||||
void setUniform(bool isArray, GLuint location, unsigned int size, GLenum uniformType, void* data) const;
|
void setUniform(bool isArray, GLuint location, unsigned int size, GLenum uniformType, void* data) const;
|
||||||
void cleanResources();
|
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
|
GLint _defaultFBO = 0; // The value gets from glGetIntegerv, so need to use GLint
|
||||||
GLuint _currentFBO = 0;
|
GLuint _currentFBO = 0;
|
||||||
BufferGL* _vertexBuffer = nullptr;
|
BufferGL* _vertexBuffer = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue