1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Fix issue where the PostProcessor class would sometimes be reconstructed.

This commit is contained in:
Francisco Zurita 2016-04-22 16:49:18 -04:00
parent 171b8c35fe
commit 9ebbcfc4a3
2 changed files with 11 additions and 0 deletions

View File

@ -24,6 +24,10 @@
#define FRAGMENT_SHADER_END "\n"
#endif
#ifdef ANDROID
PostProcessor PostProcessor::processor;
#endif
static const char * vertexShader =
SHADER_VERSION
"#if (__VERSION__ > 120) \n"
@ -469,7 +473,9 @@ void PostProcessor::destroy()
PostProcessor & PostProcessor::get()
{
#ifndef ANDROID
static PostProcessor processor;
#endif
return processor;
}

View File

@ -18,6 +18,7 @@ public:
private:
PostProcessor();
PostProcessor(const PostProcessor & _other);
void _initCommon();
void _destroyCommon();
void _initGammaCorrection();
@ -43,6 +44,10 @@ private:
CachedTexture * m_pTextureOriginal;
CachedTexture * m_pTextureGlowMap;
CachedTexture * m_pTextureBlur;
#ifdef ANDROID
static PostProcessor processor;
#endif
};
#endif // POST_PROCESSOR_H