Guest User

Untitled

a guest
Dec 11th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. void Glow::compute( float time )
  2. {
  3. m_shader.enable();
  4. glActiveTexture(GL_TEXTURE0);
  5.  
  6.  
  7. m_fbo.enable();
  8. glBindTexture(GL_TEXTURE_2D, m_input->getColor());
  9. Core::Fast2DQuadDraw();
  10. m_fbo.disable();
  11. m_fbo2.enable();
  12. glBindTexture(GL_TEXTURE_2D, m_fbo.getColor());
  13. Core::Fast2DQuadDraw();
  14. m_fbo2.disable();
  15. m_fbo.enable();
  16. glBindTexture(GL_TEXTURE_2D, m_fbo2.getColor());
  17. Core::Fast2DQuadDraw();
  18. m_fbo.disable();
  19. m_shader.disable();
  20.  
  21. m_final.enable();
  22. glBindTexture(GL_TEXTURE_2D, m_input->getColor());
  23. Core::Fast2DQuadDraw();
  24.  
  25. glEnable(GL_BLEND);
  26. glBlendFunc(GL_ONE, GL_ONE);
  27. glBindTexture(GL_TEXTURE_2D, m_fbo.getColor());
  28. Core::Fast2DQuadDraw();
  29. glDisable(GL_BLEND);
  30. m_final.disable();
  31.  
  32. }
Add Comment
Please, Sign In to add comment