Fixed cFrameBuffer rendering inside the buffer things that corresponds outside the buffer.

This commit is contained in:
Martín Lucas Golini
2013-08-20 18:03:41 -03:00
parent 8b6e34cb1f
commit cbb15b23e1
3 changed files with 6 additions and 2 deletions

View File

@@ -62,8 +62,6 @@ void cFrameBuffer::Clear() {
}
void cFrameBuffer::SetBufferView() {
cGlobalBatchRenderer::instance()->Draw();
mPrevView = mWindow->GetView();
// Get the user projection matrix

View File

@@ -2,6 +2,7 @@
#include <eepp/graphics/ctexturefactory.hpp>
#include <eepp/window/cengine.hpp>
#include <eepp/graphics/renderer/cgl.hpp>
#include <eepp/graphics/cglobalbatchrenderer.hpp>
namespace EE { namespace Graphics {
@@ -117,6 +118,8 @@ bool cFrameBufferFBO::Create( const Uint32& Width, const Uint32& Height, bool De
void cFrameBufferFBO::Bind() {
if ( mFrameBuffer ) {
cGlobalBatchRenderer::instance()->Draw();
BindFrameBuffer();
BindRenderBuffer();

View File

@@ -4,6 +4,7 @@
#include <eepp/graphics/renderer/cgl.hpp>
#include <eepp/graphics/renderer/crenderergl3.hpp>
#include <eepp/graphics/renderer/crenderergles2.hpp>
#include <eepp/graphics/cglobalbatchrenderer.hpp>
#ifdef EE_GLEW_AVAILABLE
@@ -248,6 +249,8 @@ bool cFrameBufferPBuffer::Create( const Uint32& Width, const Uint32& Height, boo
void cFrameBufferPBuffer::Bind() {
bool ChangeContext = false;
cGlobalBatchRenderer::instance()->Draw();
#ifdef EE_GLEW_AVAILABLE
#if EE_PLATFORM == EE_PLATFORM_WIN