Commit 57bd525c authored by Ken Martin's avatar Ken Martin

Remove the old FBO compatability Code

The prior commit contains the merging of the FBO and
FBO2 functionality. This commit removes a fair amount of
the old FBO functionality to keep the API clean and encourage
people to use FOs in a consistent manner.
parent 39010fa7
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "vtkStructuredExtent.h" #include "vtkStructuredExtent.h"
#include "vtkObjectFactory.h" #include "vtkObjectFactory.h"
#include "vtkLineIntegralConvolution2D.h" #include "vtkLineIntegralConvolution2D.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkRenderbuffer.h" #include "vtkRenderbuffer.h"
#include "vtkPixelBufferObject.h" #include "vtkPixelBufferObject.h"
#include "vtkTextureObject.h" #include "vtkTextureObject.h"
...@@ -124,7 +124,7 @@ int vtkImageDataLIC2D::SetContext(vtkRenderWindow * renWin) ...@@ -124,7 +124,7 @@ int vtkImageDataLIC2D::SetContext(vtkRenderWindow * renWin)
bool featureSupport bool featureSupport
= vtkLineIntegralConvolution2D::IsSupported(context) = vtkLineIntegralConvolution2D::IsSupported(context)
&& vtkPixelBufferObject::IsSupported(context) && vtkPixelBufferObject::IsSupported(context)
&& vtkFrameBufferObject::IsSupported(context) && vtkOpenGLFramebufferObject::IsSupported(context)
&& vtkRenderbuffer::IsSupported(context) && vtkRenderbuffer::IsSupported(context)
&& vtkTextureObject::IsSupported(context); && vtkTextureObject::IsSupported(context);
...@@ -443,7 +443,7 @@ int vtkImageDataLIC2D::RequestData( ...@@ -443,7 +443,7 @@ int vtkImageDataLIC2D::RequestData(
magVectorTex->Create2D(magVectorSize[0], magVectorSize[1], 4, VTK_FLOAT, false); magVectorTex->Create2D(magVectorSize[0], magVectorSize[1], 4, VTK_FLOAT, false);
vtkLineIntegralConvolution2D::SetVectorTexParameters(magVectorTex); vtkLineIntegralConvolution2D::SetVectorTexParameters(magVectorTex);
vtkFrameBufferObject *drawFbo = vtkFrameBufferObject::New(); vtkOpenGLFramebufferObject *drawFbo = vtkOpenGLFramebufferObject::New();
drawFbo->SetContext(this->Context); drawFbo->SetContext(this->Context);
drawFbo->SaveCurrentBindings(); drawFbo->SaveCurrentBindings();
drawFbo->Bind(GL_FRAMEBUFFER); drawFbo->Bind(GL_FRAMEBUFFER);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "vtkFloatArray.h" #include "vtkFloatArray.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkMath.h" #include "vtkMath.h"
#include "vtkObjectFactory.h" #include "vtkObjectFactory.h"
#include "vtkOpenGLError.h" #include "vtkOpenGLError.h"
...@@ -110,7 +110,7 @@ class vtkLICPingPongBufferManager ...@@ -110,7 +110,7 @@ class vtkLICPingPongBufferManager
{ {
public: public:
vtkLICPingPongBufferManager( vtkLICPingPongBufferManager(
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
unsigned int *bufSize, unsigned int *bufSize,
vtkTextureObject *vectorTexture, vtkTextureObject *vectorTexture,
vtkTextureObject *maskVectorTexture, vtkTextureObject *maskVectorTexture,
...@@ -257,7 +257,7 @@ public: ...@@ -257,7 +257,7 @@ public:
// Description: // Description:
// Clear all the buffers used for writing. // Clear all the buffers used for writing.
void ClearBuffers( void ClearBuffers(
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
const vtkPixelExtent &viewExt, const vtkPixelExtent &viewExt,
const deque<vtkPixelExtent> &extents, const deque<vtkPixelExtent> &extents,
int clearEETex = 0) int clearEETex = 0)
...@@ -312,7 +312,7 @@ public: ...@@ -312,7 +312,7 @@ public:
// Description: // Description:
// Clear the given buffer // Clear the given buffer
void ClearBuffer( void ClearBuffer(
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *tex, vtkTextureObject *tex,
const vtkPixelExtent &viewExt, const vtkPixelExtent &viewExt,
const deque<vtkPixelExtent> &extents) const deque<vtkPixelExtent> &extents)
...@@ -429,7 +429,7 @@ public: ...@@ -429,7 +429,7 @@ public:
// Description: // Description:
// Setup read/write from/to the active lic/seed buffer texture pair // Setup read/write from/to the active lic/seed buffer texture pair
// for LIC pass. // for LIC pass.
void AttachLICBuffers(vtkFrameBufferObject *vtkNotUsed(fbo)) void AttachLICBuffers(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
// activate read textures // activate read textures
vtkTextureObject **readTex = this->Textures[this->ReadIndex]; vtkTextureObject **readTex = this->Textures[this->ReadIndex];
...@@ -465,7 +465,7 @@ public: ...@@ -465,7 +465,7 @@ public:
// Description: // Description:
// Remove input/output bufers used for computing the LIC. // Remove input/output bufers used for computing the LIC.
void DettachLICBuffers(vtkFrameBufferObject *vtkNotUsed(fbo)) void DettachLICBuffers(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
vtkOpenGLStaticCheckErrorMacro("failed at glDrawBuffers"); vtkOpenGLStaticCheckErrorMacro("failed at glDrawBuffers");
glFramebufferTexture2D( glFramebufferTexture2D(
...@@ -494,7 +494,7 @@ public: ...@@ -494,7 +494,7 @@ public:
// Description: // Description:
// Attach read/write buffers for transform pass. // Attach read/write buffers for transform pass.
void AttachImageVectorBuffer(vtkFrameBufferObject *vtkNotUsed(fbo)) void AttachImageVectorBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
this->VectorTexture->Activate(); this->VectorTexture->Activate();
...@@ -513,7 +513,7 @@ public: ...@@ -513,7 +513,7 @@ public:
// Description: // Description:
// Attach read/write buffers for transform pass. // Attach read/write buffers for transform pass.
void DettachImageVectorBuffer(vtkFrameBufferObject *vtkNotUsed(fbo)) void DettachImageVectorBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
this->VectorTexture->Deactivate(); this->VectorTexture->Deactivate();
...@@ -531,7 +531,7 @@ public: ...@@ -531,7 +531,7 @@ public:
// Description: // Description:
// Attach read/write buffers for EE pass. // Attach read/write buffers for EE pass.
void AttachEEBuffer(vtkFrameBufferObject *vtkNotUsed(fbo)) void AttachEEBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
vtkTextureObject **readTex = this->Textures[this->ReadIndex]; vtkTextureObject **readTex = this->Textures[this->ReadIndex];
readTex[0]->Activate(); readTex[0]->Activate();
...@@ -553,7 +553,7 @@ public: ...@@ -553,7 +553,7 @@ public:
// Description: // Description:
// Attach read/write buffers for EE pass. // Attach read/write buffers for EE pass.
void DettachEEBuffer(vtkFrameBufferObject *vtkNotUsed(fbo)) void DettachEEBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
vtkTextureObject **readTex = this->Textures[this->ReadIndex]; vtkTextureObject **readTex = this->Textures[this->ReadIndex];
readTex[0]->Deactivate(); readTex[0]->Deactivate();
...@@ -573,7 +573,7 @@ public: ...@@ -573,7 +573,7 @@ public:
// Description: // Description:
// Deactivates and removes all read/write buffers that were in // Deactivates and removes all read/write buffers that were in
// use during the run, restoring a pristine FBO/texture unit state. // use during the run, restoring a pristine FBO/texture unit state.
void DettachBuffers(vtkFrameBufferObject *vtkNotUsed(fbo)) void DettachBuffers(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{ {
glFramebufferTexture2D( glFramebufferTexture2D(
GL_DRAW_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER,
...@@ -915,7 +915,7 @@ void FindMinMax( ...@@ -915,7 +915,7 @@ void FindMinMax(
// find min/max of unmasked fragments across all regions // find min/max of unmasked fragments across all regions
// download each search each region individually // download each search each region individually
void StreamingFindMinMax( void StreamingFindMinMax(
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *tex, vtkTextureObject *tex,
const deque<vtkPixelExtent> &extents, const deque<vtkPixelExtent> &extents,
float &min, float &min,
...@@ -983,7 +983,7 @@ vtkLineIntegralConvolution2D::vtkLineIntegralConvolution2D() ...@@ -983,7 +983,7 @@ vtkLineIntegralConvolution2D::vtkLineIntegralConvolution2D()
this->Comm = NULL; this->Comm = NULL;
this->Context = NULL; this->Context = NULL;
this->FBO = vtkFrameBufferObject::New(); this->FBO = vtkOpenGLFramebufferObject::New();
this->ShadersNeedBuild = 1; this->ShadersNeedBuild = 1;
this->VTShader = NULL; this->VTShader = NULL;
...@@ -1097,7 +1097,7 @@ bool vtkLineIntegralConvolution2D::IsSupported(vtkRenderWindow *renWin) ...@@ -1097,7 +1097,7 @@ bool vtkLineIntegralConvolution2D::IsSupported(vtkRenderWindow *renWin)
} }
return vtkTextureObject::IsSupported(context, true, false, false) return vtkTextureObject::IsSupported(context, true, false, false)
&& vtkFrameBufferObject::IsSupported(context) && vtkOpenGLFramebufferObject::IsSupported(context)
&& vtkPixelBufferObject::IsSupported(context); && vtkPixelBufferObject::IsSupported(context);
} }
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
#include "vtkRenderingLICOpenGL2Module.h" // for export macro #include "vtkRenderingLICOpenGL2Module.h" // for export macro
#include <deque> // for deque #include <deque> // for deque
class vtkFrameBufferObject; class vtkOpenGLFramebufferObject;
class vtkOpenGLHelper; class vtkOpenGLHelper;
class vtkOpenGLRenderWindow; class vtkOpenGLRenderWindow;
class vtkPainterCommunicator; class vtkPainterCommunicator;
...@@ -409,7 +409,7 @@ protected: ...@@ -409,7 +409,7 @@ protected:
protected: protected:
vtkWeakPointer<vtkOpenGLRenderWindow> Context; vtkWeakPointer<vtkOpenGLRenderWindow> Context;
vtkFrameBufferObject *FBO; vtkOpenGLFramebufferObject *FBO;
int ShadersNeedBuild; int ShadersNeedBuild;
vtkOpenGLHelper *FinalBlendProgram; vtkOpenGLHelper *FinalBlendProgram;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "vtkInformation.h" #include "vtkInformation.h"
#include "vtkInformationVector.h" #include "vtkInformationVector.h"
#include "vtkDataTransferHelper.h" #include "vtkDataTransferHelper.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkLineIntegralConvolution2D.h" #include "vtkLineIntegralConvolution2D.h"
#include "vtkStructuredExtent.h" #include "vtkStructuredExtent.h"
#include "vtkTextureObject.h" #include "vtkTextureObject.h"
...@@ -509,7 +509,7 @@ int vtkStructuredGridLIC2D::RequestData( ...@@ -509,7 +509,7 @@ int vtkStructuredGridLIC2D::RequestData(
vtkDebugMacro( << "Vector field in image space (target) textureId = " vtkDebugMacro( << "Vector field in image space (target) textureId = "
<< vector2->GetHandle() << endl ); << vector2->GetHandle() << endl );
vtkFrameBufferObject *fbo = vtkFrameBufferObject::New(); vtkOpenGLFramebufferObject *fbo = vtkOpenGLFramebufferObject::New();
fbo->SetContext(renWin); fbo->SetContext(renWin);
fbo->Bind(); fbo->Bind();
fbo->AddColorAttachment(fbo->GetBothMode(), 0,vector2); fbo->AddColorAttachment(fbo->GetBothMode(), 0,vector2);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "vtkSurfaceLICHelper.h" #include "vtkSurfaceLICHelper.h"
#include "vtk_glew.h" #include "vtk_glew.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkPixelBufferObject.h" #include "vtkPixelBufferObject.h"
#include "vtkPainterCommunicator.h" #include "vtkPainterCommunicator.h"
#include "vtkLineIntegralConvolution2D.h" #include "vtkLineIntegralConvolution2D.h"
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
// find min/max of unmasked fragments across all regions // find min/max of unmasked fragments across all regions
// download each search each region individually // download each search each region individually
void vtkSurfaceLICHelper::StreamingFindMinMax( void vtkSurfaceLICHelper::StreamingFindMinMax(
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
std::deque<vtkPixelExtent> &blockExts, std::deque<vtkPixelExtent> &blockExts,
float &min, float &min,
float &max) float &max)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <deque> // for methods #include <deque> // for methods
class vtkFrameBufferObject; class vtkOpenGLFramebufferObject;
class vtkOpenGLRenderWindow; class vtkOpenGLRenderWindow;
class vtkPainterCommunicator; class vtkPainterCommunicator;
class vtkImageData; class vtkImageData;
...@@ -213,7 +213,7 @@ public: ...@@ -213,7 +213,7 @@ public:
void GetPixelBounds(float *rgba, int ni, std::deque<vtkPixelExtent> &blockExts); void GetPixelBounds(float *rgba, int ni, std::deque<vtkPixelExtent> &blockExts);
static void StreamingFindMinMax( static void StreamingFindMinMax(
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
std::deque<vtkPixelExtent> &blockExts, std::deque<vtkPixelExtent> &blockExts,
float &min, float &max); float &min, float &max);
...@@ -238,7 +238,7 @@ public: ...@@ -238,7 +238,7 @@ public:
int Viewsize[2]; int Viewsize[2];
vtkSmartPointer<vtkSurfaceLICComposite> Compositor; vtkSmartPointer<vtkSurfaceLICComposite> Compositor;
vtkSmartPointer<vtkFrameBufferObject> FBO; vtkSmartPointer<vtkOpenGLFramebufferObject> FBO;
vtkSmartPointer<vtkLineIntegralConvolution2D> LICer; vtkSmartPointer<vtkLineIntegralConvolution2D> LICer;
vtkPainterCommunicator *Communicator; vtkPainterCommunicator *Communicator;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "vtkSurfaceLICInterface.h" #include "vtkSurfaceLICInterface.h"
#include "vtkFloatArray.h" #include "vtkFloatArray.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkImageData.h" #include "vtkImageData.h"
#include "vtkLineIntegralConvolution2D.h" #include "vtkLineIntegralConvolution2D.h"
#include "vtkObjectFactory.h" #include "vtkObjectFactory.h"
...@@ -189,7 +189,7 @@ void vtkSurfaceLICInterface::PrepareForGeometry() ...@@ -189,7 +189,7 @@ void vtkSurfaceLICInterface::PrepareForGeometry()
// ------------------------------------------- render geometry, project vectors onto screen, etc // ------------------------------------------- render geometry, project vectors onto screen, etc
// setup our fbo // setup our fbo
vtkFrameBufferObject *fbo = this->Internals->FBO; vtkOpenGLFramebufferObject *fbo = this->Internals->FBO;
fbo->SaveCurrentBindings(); fbo->SaveCurrentBindings();
fbo->Bind(GL_FRAMEBUFFER); fbo->Bind(GL_FRAMEBUFFER);
fbo->AddDepthAttachment(GL_DRAW_FRAMEBUFFER, this->Internals->DepthImage); fbo->AddDepthAttachment(GL_DRAW_FRAMEBUFFER, this->Internals->DepthImage);
...@@ -211,7 +211,7 @@ void vtkSurfaceLICInterface::PrepareForGeometry() ...@@ -211,7 +211,7 @@ void vtkSurfaceLICInterface::PrepareForGeometry()
void vtkSurfaceLICInterface::CompletedGeometry() void vtkSurfaceLICInterface::CompletedGeometry()
{ {
vtkFrameBufferObject *fbo = this->Internals->FBO; vtkOpenGLFramebufferObject *fbo = this->Internals->FBO;
fbo->RemoveRenDepthAttachment(GL_DRAW_FRAMEBUFFER); fbo->RemoveRenDepthAttachment(GL_DRAW_FRAMEBUFFER);
fbo->RemoveTexColorAttachment(GL_DRAW_FRAMEBUFFER, 0U); fbo->RemoveTexColorAttachment(GL_DRAW_FRAMEBUFFER, 0U);
fbo->RemoveTexColorAttachment(GL_DRAW_FRAMEBUFFER, 1U); fbo->RemoveTexColorAttachment(GL_DRAW_FRAMEBUFFER, 1U);
...@@ -500,7 +500,7 @@ void vtkSurfaceLICInterface::CombineColorsAndLIC() ...@@ -500,7 +500,7 @@ void vtkSurfaceLICInterface::CombineColorsAndLIC()
this->Internals->Viewsize[0], this->Internals->Viewsize[0],
this->Internals->Viewsize[1]); this->Internals->Viewsize[1]);
vtkFrameBufferObject *fbo = this->Internals->FBO; vtkOpenGLFramebufferObject *fbo = this->Internals->FBO;
fbo->SaveCurrentBindings(); fbo->SaveCurrentBindings();
fbo->Bind(GL_FRAMEBUFFER); fbo->Bind(GL_FRAMEBUFFER);
fbo->InitializeViewport(this->Internals->Viewsize[0], this->Internals->Viewsize[1]); fbo->InitializeViewport(this->Internals->Viewsize[0], this->Internals->Viewsize[1]);
...@@ -672,7 +672,7 @@ void vtkSurfaceLICInterface::CopyToScreen() ...@@ -672,7 +672,7 @@ void vtkSurfaceLICInterface::CopyToScreen()
glBindFramebuffer(GL_FRAMEBUFFER, this->PrevFbo); glBindFramebuffer(GL_FRAMEBUFFER, this->PrevFbo);
glDrawBuffer(this->PrevDrawBuf); glDrawBuffer(this->PrevDrawBuf);
vtkFrameBufferObject::InitializeViewport( vtkOpenGLFramebufferObject::InitializeViewport(
this->Internals->Viewsize[0], this->Internals->Viewsize[0],
this->Internals->Viewsize[1]); this->Internals->Viewsize[1]);
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
...@@ -1152,7 +1152,7 @@ void vtkSurfaceLICInterface::InitializeResources() ...@@ -1152,7 +1152,7 @@ void vtkSurfaceLICInterface::InitializeResources()
{ {
initialized = false; initialized = false;
vtkFrameBufferObject * fbo = vtkFrameBufferObject::New(); vtkOpenGLFramebufferObject * fbo = vtkOpenGLFramebufferObject::New();
fbo->SetContext(this->Internals->Context); fbo->SetContext(this->Internals->Context);
this->Internals->FBO = fbo; this->Internals->FBO = fbo;
fbo->Delete(); fbo->Delete();
......
...@@ -23,8 +23,6 @@ set(Module_SRCS ...@@ -23,8 +23,6 @@ set(Module_SRCS
vtkDepthPeelingPass.cxx vtkDepthPeelingPass.cxx
vtkDualDepthPeelingPass.cxx vtkDualDepthPeelingPass.cxx
vtkEDLShading.cxx vtkEDLShading.cxx
vtkFrameBufferObject.cxx
vtkFrameBufferObject2.cxx
vtkGaussianBlurPass.cxx vtkGaussianBlurPass.cxx
vtkGenericOpenGLRenderWindow.cxx vtkGenericOpenGLRenderWindow.cxx
vtkHiddenLineRemovalPass.cxx vtkHiddenLineRemovalPass.cxx
...@@ -37,6 +35,7 @@ set(Module_SRCS ...@@ -37,6 +35,7 @@ set(Module_SRCS
vtkOpenGLBufferObject.cxx vtkOpenGLBufferObject.cxx
vtkOpenGLCamera.cxx vtkOpenGLCamera.cxx
vtkOpenGLFXAAFilter.cxx vtkOpenGLFXAAFilter.cxx
vtkOpenGLFramebufferObject.cxx
vtkOpenGLGL2PSHelper.cxx vtkOpenGLGL2PSHelper.cxx
vtkOpenGLGlyph3DHelper.cxx vtkOpenGLGlyph3DHelper.cxx
vtkOpenGLGlyph3DMapper.cxx vtkOpenGLGlyph3DMapper.cxx
...@@ -103,7 +102,7 @@ set(${vtk-module}_HDRS ...@@ -103,7 +102,7 @@ set(${vtk-module}_HDRS
set_source_files_properties( set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx ${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx
vtkFrameBufferObject vtkOpenGLFramebufferObject
vtkOpenGLBufferObject vtkOpenGLBufferObject
vtkOpenGLGL2PSHelper vtkOpenGLGL2PSHelper
vtkOpenGLGlyph3DHelper vtkOpenGLGlyph3DHelper
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "vtkOpenGLRenderWindow.h" #include "vtkOpenGLRenderWindow.h"
#include "vtkMatrix4x4.h" #include "vtkMatrix4x4.h"
#include "vtkCamera.h" #include "vtkCamera.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkOpenGLError.h" #include "vtkOpenGLError.h"
vtkStandardNewMacro(vtkCameraPass); vtkStandardNewMacro(vtkCameraPass);
...@@ -104,7 +104,7 @@ void vtkCameraPass::Render(const vtkRenderState *s) ...@@ -104,7 +104,7 @@ void vtkCameraPass::Render(const vtkRenderState *s)
int lowerLeft[2]; int lowerLeft[2];
int usize; int usize;
int vsize; int vsize;
vtkFrameBufferObject *fbo=vtkFrameBufferObject::SafeDownCast(s->GetFrameBuffer()); vtkOpenGLFramebufferObject *fbo=vtkOpenGLFramebufferObject::SafeDownCast(s->GetFrameBuffer());
vtkOpenGLRenderWindow *win=vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow()); vtkOpenGLRenderWindow *win=vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow());
win->MakeCurrent(); win->MakeCurrent();
......
...@@ -41,7 +41,7 @@ Ph.D. thesis of Christian BOUCHENY. ...@@ -41,7 +41,7 @@ Ph.D. thesis of Christian BOUCHENY.
#include <cassert> #include <cassert>
#include "vtkRenderState.h" #include "vtkRenderState.h"
#include "vtkRenderer.h" #include "vtkRenderer.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkTextureObject.h" #include "vtkTextureObject.h"
#include "vtkOpenGLRenderWindow.h" #include "vtkOpenGLRenderWindow.h"
...@@ -101,7 +101,7 @@ void vtkDepthImageProcessingPass::RenderDelegate(const vtkRenderState *s, ...@@ -101,7 +101,7 @@ void vtkDepthImageProcessingPass::RenderDelegate(const vtkRenderState *s,
int height, int height,
int newWidth, int newWidth,
int newHeight, int newHeight,
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *colortarget, vtkTextureObject *colortarget,
vtkTextureObject *depthtarget) vtkTextureObject *depthtarget)
{ {
...@@ -184,7 +184,7 @@ void vtkDepthImageProcessingPass::ReadWindowSize(const vtkRenderState* s) ...@@ -184,7 +184,7 @@ void vtkDepthImageProcessingPass::ReadWindowSize(const vtkRenderState* s)
{ {
assert("pre: s_exists" && s!=0); assert("pre: s_exists" && s!=0);
vtkFrameBufferObject *fbo=vtkFrameBufferObject::SafeDownCast vtkOpenGLFramebufferObject *fbo=vtkOpenGLFramebufferObject::SafeDownCast
(s->GetFrameBuffer()); (s->GetFrameBuffer());
vtkRenderer *r = s->GetRenderer(); vtkRenderer *r = s->GetRenderer();
if(fbo==0) if(fbo==0)
......
...@@ -56,7 +56,7 @@ Ph.D. thesis of Christian BOUCHENY. ...@@ -56,7 +56,7 @@ Ph.D. thesis of Christian BOUCHENY.
class vtkOpenGLRenderWindow; class vtkOpenGLRenderWindow;
class vtkDepthPeelingPassLayerList; // Pimpl class vtkDepthPeelingPassLayerList; // Pimpl
class vtkFrameBufferObject; class vtkOpenGLFramebufferObject;
class vtkTextureObject; class vtkTextureObject;
class VTKRENDERINGOPENGL2_EXPORT vtkDepthImageProcessingPass : public vtkImageProcessingPass class VTKRENDERINGOPENGL2_EXPORT vtkDepthImageProcessingPass : public vtkImageProcessingPass
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
int height, int height,
int newWidth, int newWidth,
int newHeight, int newHeight,
vtkFrameBufferObject *fbo, vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *colortarget, vtkTextureObject *colortarget,
vtkTextureObject *depthtarget); vtkTextureObject *depthtarget);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "vtkCamera.h" #include "vtkCamera.h"
#include "vtkRenderState.h" #include "vtkRenderState.h"
#include "vtkRenderer.h" #include "vtkRenderer.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkTextureObject.h" #include "vtkTextureObject.h"
#include "vtkOpenGLRenderWindow.h" #include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h" #include "vtkOpenGLError.h"
...@@ -136,7 +136,7 @@ void vtkDepthOfFieldPass::Render(const vtkRenderState *s) ...@@ -136,7 +136,7 @@ void vtkDepthOfFieldPass::Render(const vtkRenderState *s)
if(this->FrameBufferObject==0) if(this->FrameBufferObject==0)
{ {
this->FrameBufferObject=vtkFrameBufferObject::New(); this->FrameBufferObject=vtkOpenGLFramebufferObject::New();
this->FrameBufferObject->SetContext(renWin); this->FrameBufferObject->SetContext(renWin);
} }
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "vtkDepthImageProcessingPass.h" #include "vtkDepthImageProcessingPass.h"
class vtkDepthPeelingPassLayerList; // Pimpl class vtkDepthPeelingPassLayerList; // Pimpl
class vtkFrameBufferObject; class vtkOpenGLFramebufferObject;
class vtkOpenGLHelper; class vtkOpenGLHelper;
class vtkOpenGLRenderWindow; class vtkOpenGLRenderWindow;
class vtkTextureObject; class vtkTextureObject;
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
/** /**
* Graphics resources. * Graphics resources.
*/ */
vtkFrameBufferObject *FrameBufferObject; vtkOpenGLFramebufferObject *FrameBufferObject;
vtkTextureObject *Pass1; // render target for the scene vtkTextureObject *Pass1; // render target for the scene
vtkTextureObject *Pass1Depth; // render target for the depth vtkTextureObject *Pass1Depth; // render target for the depth
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "vtkDualDepthPeelingPass.h" #include "vtkDualDepthPeelingPass.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkInformation.h" #include "vtkInformation.h"
#include "vtkInformationKey.h" #include "vtkInformationKey.h"
#include "vtkNew.h" #include "vtkNew.h"
...@@ -454,7 +454,7 @@ void vtkDualDepthPeelingPass::Initialize(const vtkRenderState *s) ...@@ -454,7 +454,7 @@ void vtkDualDepthPeelingPass::Initialize(const vtkRenderState *s)
// Allocate new textures if needed: // Allocate new textures if needed:
if (!this->Framebuffer) if (!this->Framebuffer)
{ {
this->Framebuffer = vtkFrameBufferObject::New(); this->Framebuffer = vtkOpenGLFramebufferObject::New();
std::generate(this->Textures, std::generate(this->Textures,
this->Textures + static_cast<int>(NumberOfTextures), this->Textures + static_cast<int>(NumberOfTextures),
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include "vtkRenderingOpenGL2Module.h" // For export macro #include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkDepthPeelingPass.h" #include "vtkDepthPeelingPass.h"
class vtkFrameBufferObject; class vtkOpenGLFramebufferObject;
class vtkOpenGLBufferObject; class vtkOpenGLBufferObject;
class vtkOpenGLVertexArrayObject; class vtkOpenGLVertexArrayObject;
class vtkShaderProgram; class vtkShaderProgram;
...@@ -186,7 +186,7 @@ protected: ...@@ -186,7 +186,7 @@ protected:
vtkOpenGLVertexArrayObject *BlendVAO; vtkOpenGLVertexArrayObject *BlendVAO;
vtkOpenGLBufferObject *BlendVBO; vtkOpenGLBufferObject *BlendVBO;
vtkFrameBufferObject *Framebuffer; vtkOpenGLFramebufferObject *Framebuffer;
vtkTextureObject *Textures[NumberOfTextures]; vtkTextureObject *Textures[NumberOfTextures];
TextureName FrontSource; // The current front source buffer TextureName FrontSource; // The current front source buffer
......
...@@ -39,7 +39,7 @@ Ph.D. thesis of Christian BOUCHENY. ...@@ -39,7 +39,7 @@ Ph.D. thesis of Christian BOUCHENY.
#include "vtkEDLShading.h" #include "vtkEDLShading.h"
#include "vtkCamera.h" #include "vtkCamera.h"
#include "vtkFrameBufferObject.h" #include "vtkOpenGLFramebufferObject.h"
#include "vtkMath.h" #include "vtkMath.h"
#include "vtkObjectFactory.h" #include "vtkObjectFactory.h"
#include "vtkOpenGLError.h" #include "vtkOpenGLError.h"
...@@ -174,7 +174,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s) ...@@ -174,7 +174,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s)
// //
if (this->ProjectionFBO == 0) if (this->ProjectionFBO == 0)
{ {
this->ProjectionFBO = vtkFrameBufferObject::New(); this->ProjectionFBO = vtkOpenGLFramebufferObject::New();
this->ProjectionFBO->SetContext(renWin); this->ProjectionFBO->SetContext(renWin);
} }
s.SetFrameBuffer(this->ProjectionFBO); s.SetFrameBuffer(this->ProjectionFBO);
...@@ -228,7 +228,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s) ...@@ -228,7 +228,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s)
// //
if (this->EDLHighFBO == 0) if (this->EDLHighFBO == 0)
{ {
this->EDLHighFBO = vtkFrameBufferObject::New(); this->EDLHighFBO = vtkOpenGLFramebufferObject::New();
this->EDLHighFBO->SetContext(renWin); this->EDLHighFBO->SetContext(renWin);
}