|
@@ -269,11 +269,6 @@ void CImage::simpleRender ()
|
|
|
{
|
|
{
|
|
|
ITexture* input = this->m_mainFBO;
|
|
ITexture* input = this->m_mainFBO;
|
|
|
|
|
|
|
|
- // clear the main framebuffer
|
|
|
|
|
- glBindFramebuffer (GL_FRAMEBUFFER, this->m_mainFBO->getFramebuffer ());
|
|
|
|
|
- // attach the main texture
|
|
|
|
|
- glClear (GL_COLOR_BUFFER_BIT);
|
|
|
|
|
-
|
|
|
|
|
// FIXME: THIS IS A QUICK HACK FOR ANIMATED IMAGES, IF ANY OF THOSE HAVE ANY EFFECT ON THEM THIS WILL LIKELY BREAK
|
|
// FIXME: THIS IS A QUICK HACK FOR ANIMATED IMAGES, IF ANY OF THOSE HAVE ANY EFFECT ON THEM THIS WILL LIKELY BREAK
|
|
|
if (this->getTexture ()->isAnimated () == true)
|
|
if (this->getTexture ()->isAnimated () == true)
|
|
|
{
|
|
{
|
|
@@ -303,11 +298,6 @@ void CImage::complexRender ()
|
|
|
CFBO* drawTo = this->m_mainFBO;
|
|
CFBO* drawTo = this->m_mainFBO;
|
|
|
ITexture* asInput = this->getTexture ();
|
|
ITexture* asInput = this->getTexture ();
|
|
|
|
|
|
|
|
- // clear the main framebuffer
|
|
|
|
|
- glBindFramebuffer (GL_FRAMEBUFFER, this->m_mainFBO->getFramebuffer ());
|
|
|
|
|
- // attach the main texture
|
|
|
|
|
- glClear (GL_COLOR_BUFFER_BIT);
|
|
|
|
|
-
|
|
|
|
|
// do the first pass render into the main framebuffer
|
|
// do the first pass render into the main framebuffer
|
|
|
auto cur = this->m_copyMaterial->getPasses ().begin ();
|
|
auto cur = this->m_copyMaterial->getPasses ().begin ();
|
|
|
auto end = this->m_copyMaterial->getPasses ().end ();
|
|
auto end = this->m_copyMaterial->getPasses ().end ();
|
|
@@ -389,6 +379,11 @@ void CImage::render ()
|
|
|
|
|
|
|
|
glColorMask (true, true, true, true);
|
|
glColorMask (true, true, true, true);
|
|
|
|
|
|
|
|
|
|
+ // clear the main framebuffer
|
|
|
|
|
+ glBindFramebuffer (GL_FRAMEBUFFER, this->m_mainFBO->getFramebuffer ());
|
|
|
|
|
+ // attach the main texture
|
|
|
|
|
+ glClear (GL_COLOR_BUFFER_BIT);
|
|
|
|
|
+
|
|
|
// check if there's more than one pass and do different things based on that
|
|
// check if there's more than one pass and do different things based on that
|
|
|
if (this->m_effects.empty () == true)
|
|
if (this->m_effects.empty () == true)
|
|
|
this->simpleRender ();
|
|
this->simpleRender ();
|