From 175598d8195311a975de169a5dd2ccbf256820e3 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Tue, 24 Mar 2015 19:53:09 +0600 Subject: [PATCH] Correct PBO mode for FrameBufferToRDRAM and DepthBufferToRDRAM. --- FrameBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 69c9e2fa..a96d62b4 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -754,7 +754,7 @@ void FrameBufferToRDRAM::Init() // Generate and initialize Pixel Buffer Objects glGenBuffers(1, &m_PBO); glBindBuffer(GL_PIXEL_PACK_BUFFER, m_PBO); - glBufferData(GL_PIXEL_PACK_BUFFER, m_pTexture->textureBytes, NULL, GL_DYNAMIC_DRAW); + glBufferData(GL_PIXEL_PACK_BUFFER, m_pTexture->textureBytes, NULL, GL_DYNAMIC_READ); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); } @@ -913,7 +913,7 @@ void DepthBufferToRDRAM::Init() // Generate and initialize Pixel Buffer Objects glGenBuffers(1, &m_PBO); glBindBuffer(GL_PIXEL_PACK_BUFFER, m_PBO); - glBufferData(GL_PIXEL_PACK_BUFFER, 640*480*sizeof(float), NULL, GL_DYNAMIC_DRAW); + glBufferData(GL_PIXEL_PACK_BUFFER, 640*480*sizeof(float), NULL, GL_DYNAMIC_READ); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); }