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 @@
#include "vtkStructuredExtent.h"
#include "vtkObjectFactory.h"
#include "vtkLineIntegralConvolution2D.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkRenderbuffer.h"
#include "vtkPixelBufferObject.h"
#include "vtkTextureObject.h"
......@@ -124,7 +124,7 @@ int vtkImageDataLIC2D::SetContext(vtkRenderWindow * renWin)
bool featureSupport
= vtkLineIntegralConvolution2D::IsSupported(context)
&& vtkPixelBufferObject::IsSupported(context)
&& vtkFrameBufferObject::IsSupported(context)
&& vtkOpenGLFramebufferObject::IsSupported(context)
&& vtkRenderbuffer::IsSupported(context)
&& vtkTextureObject::IsSupported(context);
......@@ -443,7 +443,7 @@ int vtkImageDataLIC2D::RequestData(
magVectorTex->Create2D(magVectorSize[0], magVectorSize[1], 4, VTK_FLOAT, false);
vtkLineIntegralConvolution2D::SetVectorTexParameters(magVectorTex);
vtkFrameBufferObject *drawFbo = vtkFrameBufferObject::New();
vtkOpenGLFramebufferObject *drawFbo = vtkOpenGLFramebufferObject::New();
drawFbo->SetContext(this->Context);
drawFbo->SaveCurrentBindings();
drawFbo->Bind(GL_FRAMEBUFFER);
......
......@@ -20,7 +20,7 @@
#include "vtkFloatArray.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkMath.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLError.h"
......@@ -110,7 +110,7 @@ class vtkLICPingPongBufferManager
{
public:
vtkLICPingPongBufferManager(
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
unsigned int *bufSize,
vtkTextureObject *vectorTexture,
vtkTextureObject *maskVectorTexture,
......@@ -257,7 +257,7 @@ public:
// Description:
// Clear all the buffers used for writing.
void ClearBuffers(
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
const vtkPixelExtent &viewExt,
const deque<vtkPixelExtent> &extents,
int clearEETex = 0)
......@@ -312,7 +312,7 @@ public:
// Description:
// Clear the given buffer
void ClearBuffer(
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *tex,
const vtkPixelExtent &viewExt,
const deque<vtkPixelExtent> &extents)
......@@ -429,7 +429,7 @@ public:
// Description:
// Setup read/write from/to the active lic/seed buffer texture pair
// for LIC pass.
void AttachLICBuffers(vtkFrameBufferObject *vtkNotUsed(fbo))
void AttachLICBuffers(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
// activate read textures
vtkTextureObject **readTex = this->Textures[this->ReadIndex];
......@@ -465,7 +465,7 @@ public:
// Description:
// Remove input/output bufers used for computing the LIC.
void DettachLICBuffers(vtkFrameBufferObject *vtkNotUsed(fbo))
void DettachLICBuffers(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
vtkOpenGLStaticCheckErrorMacro("failed at glDrawBuffers");
glFramebufferTexture2D(
......@@ -494,7 +494,7 @@ public:
// Description:
// Attach read/write buffers for transform pass.
void AttachImageVectorBuffer(vtkFrameBufferObject *vtkNotUsed(fbo))
void AttachImageVectorBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
this->VectorTexture->Activate();
......@@ -513,7 +513,7 @@ public:
// Description:
// Attach read/write buffers for transform pass.
void DettachImageVectorBuffer(vtkFrameBufferObject *vtkNotUsed(fbo))
void DettachImageVectorBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
this->VectorTexture->Deactivate();
......@@ -531,7 +531,7 @@ public:
// Description:
// Attach read/write buffers for EE pass.
void AttachEEBuffer(vtkFrameBufferObject *vtkNotUsed(fbo))
void AttachEEBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
vtkTextureObject **readTex = this->Textures[this->ReadIndex];
readTex[0]->Activate();
......@@ -553,7 +553,7 @@ public:
// Description:
// Attach read/write buffers for EE pass.
void DettachEEBuffer(vtkFrameBufferObject *vtkNotUsed(fbo))
void DettachEEBuffer(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
vtkTextureObject **readTex = this->Textures[this->ReadIndex];
readTex[0]->Deactivate();
......@@ -573,7 +573,7 @@ public:
// Description:
// Deactivates and removes all read/write buffers that were in
// use during the run, restoring a pristine FBO/texture unit state.
void DettachBuffers(vtkFrameBufferObject *vtkNotUsed(fbo))
void DettachBuffers(vtkOpenGLFramebufferObject *vtkNotUsed(fbo))
{
glFramebufferTexture2D(
GL_DRAW_FRAMEBUFFER,
......@@ -915,7 +915,7 @@ void FindMinMax(
// find min/max of unmasked fragments across all regions
// download each search each region individually
void StreamingFindMinMax(
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *tex,
const deque<vtkPixelExtent> &extents,
float &min,
......@@ -983,7 +983,7 @@ vtkLineIntegralConvolution2D::vtkLineIntegralConvolution2D()
this->Comm = NULL;
this->Context = NULL;
this->FBO = vtkFrameBufferObject::New();
this->FBO = vtkOpenGLFramebufferObject::New();
this->ShadersNeedBuild = 1;
this->VTShader = NULL;
......@@ -1097,7 +1097,7 @@ bool vtkLineIntegralConvolution2D::IsSupported(vtkRenderWindow *renWin)
}
return vtkTextureObject::IsSupported(context, true, false, false)
&& vtkFrameBufferObject::IsSupported(context)
&& vtkOpenGLFramebufferObject::IsSupported(context)
&& vtkPixelBufferObject::IsSupported(context);
}
......
......@@ -97,7 +97,7 @@
#include "vtkRenderingLICOpenGL2Module.h" // for export macro
#include <deque> // for deque
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkOpenGLHelper;
class vtkOpenGLRenderWindow;
class vtkPainterCommunicator;
......@@ -409,7 +409,7 @@ protected:
protected:
vtkWeakPointer<vtkOpenGLRenderWindow> Context;
vtkFrameBufferObject *FBO;
vtkOpenGLFramebufferObject *FBO;
int ShadersNeedBuild;
vtkOpenGLHelper *FinalBlendProgram;
......
......@@ -22,7 +22,7 @@
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkDataTransferHelper.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkLineIntegralConvolution2D.h"
#include "vtkStructuredExtent.h"
#include "vtkTextureObject.h"
......@@ -509,7 +509,7 @@ int vtkStructuredGridLIC2D::RequestData(
vtkDebugMacro( << "Vector field in image space (target) textureId = "
<< vector2->GetHandle() << endl );
vtkFrameBufferObject *fbo = vtkFrameBufferObject::New();
vtkOpenGLFramebufferObject *fbo = vtkOpenGLFramebufferObject::New();
fbo->SetContext(renWin);
fbo->Bind();
fbo->AddColorAttachment(fbo->GetBothMode(), 0,vector2);
......
......@@ -14,7 +14,7 @@
#include "vtkSurfaceLICHelper.h"
#include "vtk_glew.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkPixelBufferObject.h"
#include "vtkPainterCommunicator.h"
#include "vtkLineIntegralConvolution2D.h"
......@@ -39,7 +39,7 @@
// find min/max of unmasked fragments across all regions
// download each search each region individually
void vtkSurfaceLICHelper::StreamingFindMinMax(
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
std::deque<vtkPixelExtent> &blockExts,
float &min,
float &max)
......
......@@ -30,7 +30,7 @@
#include <deque> // for methods
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkOpenGLRenderWindow;
class vtkPainterCommunicator;
class vtkImageData;
......@@ -213,7 +213,7 @@ public:
void GetPixelBounds(float *rgba, int ni, std::deque<vtkPixelExtent> &blockExts);
static void StreamingFindMinMax(
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
std::deque<vtkPixelExtent> &blockExts,
float &min, float &max);
......@@ -238,7 +238,7 @@ public:
int Viewsize[2];
vtkSmartPointer<vtkSurfaceLICComposite> Compositor;
vtkSmartPointer<vtkFrameBufferObject> FBO;
vtkSmartPointer<vtkOpenGLFramebufferObject> FBO;
vtkSmartPointer<vtkLineIntegralConvolution2D> LICer;
vtkPainterCommunicator *Communicator;
......
......@@ -14,7 +14,7 @@
#include "vtkSurfaceLICInterface.h"
#include "vtkFloatArray.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkImageData.h"
#include "vtkLineIntegralConvolution2D.h"
#include "vtkObjectFactory.h"
......@@ -189,7 +189,7 @@ void vtkSurfaceLICInterface::PrepareForGeometry()
// ------------------------------------------- render geometry, project vectors onto screen, etc
// setup our fbo
vtkFrameBufferObject *fbo = this->Internals->FBO;
vtkOpenGLFramebufferObject *fbo = this->Internals->FBO;
fbo->SaveCurrentBindings();
fbo->Bind(GL_FRAMEBUFFER);
fbo->AddDepthAttachment(GL_DRAW_FRAMEBUFFER, this->Internals->DepthImage);
......@@ -211,7 +211,7 @@ void vtkSurfaceLICInterface::PrepareForGeometry()
void vtkSurfaceLICInterface::CompletedGeometry()
{
vtkFrameBufferObject *fbo = this->Internals->FBO;
vtkOpenGLFramebufferObject *fbo = this->Internals->FBO;
fbo->RemoveRenDepthAttachment(GL_DRAW_FRAMEBUFFER);
fbo->RemoveTexColorAttachment(GL_DRAW_FRAMEBUFFER, 0U);
fbo->RemoveTexColorAttachment(GL_DRAW_FRAMEBUFFER, 1U);
......@@ -500,7 +500,7 @@ void vtkSurfaceLICInterface::CombineColorsAndLIC()
this->Internals->Viewsize[0],
this->Internals->Viewsize[1]);
vtkFrameBufferObject *fbo = this->Internals->FBO;
vtkOpenGLFramebufferObject *fbo = this->Internals->FBO;
fbo->SaveCurrentBindings();
fbo->Bind(GL_FRAMEBUFFER);
fbo->InitializeViewport(this->Internals->Viewsize[0], this->Internals->Viewsize[1]);
......@@ -672,7 +672,7 @@ void vtkSurfaceLICInterface::CopyToScreen()
glBindFramebuffer(GL_FRAMEBUFFER, this->PrevFbo);
glDrawBuffer(this->PrevDrawBuf);
vtkFrameBufferObject::InitializeViewport(
vtkOpenGLFramebufferObject::InitializeViewport(
this->Internals->Viewsize[0],
this->Internals->Viewsize[1]);
glEnable(GL_DEPTH_TEST);
......@@ -1152,7 +1152,7 @@ void vtkSurfaceLICInterface::InitializeResources()
{
initialized = false;
vtkFrameBufferObject * fbo = vtkFrameBufferObject::New();
vtkOpenGLFramebufferObject * fbo = vtkOpenGLFramebufferObject::New();
fbo->SetContext(this->Internals->Context);
this->Internals->FBO = fbo;
fbo->Delete();
......
......@@ -23,8 +23,6 @@ set(Module_SRCS
vtkDepthPeelingPass.cxx
vtkDualDepthPeelingPass.cxx
vtkEDLShading.cxx
vtkFrameBufferObject.cxx
vtkFrameBufferObject2.cxx
vtkGaussianBlurPass.cxx
vtkGenericOpenGLRenderWindow.cxx
vtkHiddenLineRemovalPass.cxx
......@@ -37,6 +35,7 @@ set(Module_SRCS
vtkOpenGLBufferObject.cxx
vtkOpenGLCamera.cxx
vtkOpenGLFXAAFilter.cxx
vtkOpenGLFramebufferObject.cxx
vtkOpenGLGL2PSHelper.cxx
vtkOpenGLGlyph3DHelper.cxx
vtkOpenGLGlyph3DMapper.cxx
......@@ -103,7 +102,7 @@ set(${vtk-module}_HDRS
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx
vtkFrameBufferObject
vtkOpenGLFramebufferObject
vtkOpenGLBufferObject
vtkOpenGLGL2PSHelper
vtkOpenGLGlyph3DHelper
......
......@@ -21,7 +21,7 @@
#include "vtkOpenGLRenderWindow.h"
#include "vtkMatrix4x4.h"
#include "vtkCamera.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkOpenGLError.h"
vtkStandardNewMacro(vtkCameraPass);
......@@ -104,7 +104,7 @@ void vtkCameraPass::Render(const vtkRenderState *s)
int lowerLeft[2];
int usize;
int vsize;
vtkFrameBufferObject *fbo=vtkFrameBufferObject::SafeDownCast(s->GetFrameBuffer());
vtkOpenGLFramebufferObject *fbo=vtkOpenGLFramebufferObject::SafeDownCast(s->GetFrameBuffer());
vtkOpenGLRenderWindow *win=vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow());
win->MakeCurrent();
......
......@@ -41,7 +41,7 @@ Ph.D. thesis of Christian BOUCHENY.
#include <cassert>
#include "vtkRenderState.h"
#include "vtkRenderer.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkTextureObject.h"
#include "vtkOpenGLRenderWindow.h"
......@@ -101,7 +101,7 @@ void vtkDepthImageProcessingPass::RenderDelegate(const vtkRenderState *s,
int height,
int newWidth,
int newHeight,
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *colortarget,
vtkTextureObject *depthtarget)
{
......@@ -184,7 +184,7 @@ void vtkDepthImageProcessingPass::ReadWindowSize(const vtkRenderState* s)
{
assert("pre: s_exists" && s!=0);
vtkFrameBufferObject *fbo=vtkFrameBufferObject::SafeDownCast
vtkOpenGLFramebufferObject *fbo=vtkOpenGLFramebufferObject::SafeDownCast
(s->GetFrameBuffer());
vtkRenderer *r = s->GetRenderer();
if(fbo==0)
......
......@@ -56,7 +56,7 @@ Ph.D. thesis of Christian BOUCHENY.
class vtkOpenGLRenderWindow;
class vtkDepthPeelingPassLayerList; // Pimpl
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkTextureObject;
class VTKRENDERINGOPENGL2_EXPORT vtkDepthImageProcessingPass : public vtkImageProcessingPass
......@@ -108,7 +108,7 @@ public:
int height,
int newWidth,
int newHeight,
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *colortarget,
vtkTextureObject *depthtarget);
......
......@@ -20,7 +20,7 @@
#include "vtkCamera.h"
#include "vtkRenderState.h"
#include "vtkRenderer.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkTextureObject.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
......@@ -136,7 +136,7 @@ void vtkDepthOfFieldPass::Render(const vtkRenderState *s)
if(this->FrameBufferObject==0)
{
this->FrameBufferObject=vtkFrameBufferObject::New();
this->FrameBufferObject=vtkOpenGLFramebufferObject::New();
this->FrameBufferObject->SetContext(renWin);
}
......
......@@ -41,7 +41,7 @@
#include "vtkDepthImageProcessingPass.h"
class vtkDepthPeelingPassLayerList; // Pimpl
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkOpenGLHelper;
class vtkOpenGLRenderWindow;
class vtkTextureObject;
......@@ -91,7 +91,7 @@ public:
/**
* Graphics resources.
*/
vtkFrameBufferObject *FrameBufferObject;
vtkOpenGLFramebufferObject *FrameBufferObject;
vtkTextureObject *Pass1; // render target for the scene
vtkTextureObject *Pass1Depth; // render target for the depth
......
......@@ -15,7 +15,7 @@
#include "vtkDualDepthPeelingPass.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkInformation.h"
#include "vtkInformationKey.h"
#include "vtkNew.h"
......@@ -454,7 +454,7 @@ void vtkDualDepthPeelingPass::Initialize(const vtkRenderState *s)
// Allocate new textures if needed:
if (!this->Framebuffer)
{
this->Framebuffer = vtkFrameBufferObject::New();
this->Framebuffer = vtkOpenGLFramebufferObject::New();
std::generate(this->Textures,
this->Textures + static_cast<int>(NumberOfTextures),
......
......@@ -50,7 +50,7 @@
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkDepthPeelingPass.h"
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkOpenGLBufferObject;
class vtkOpenGLVertexArrayObject;
class vtkShaderProgram;
......@@ -186,7 +186,7 @@ protected:
vtkOpenGLVertexArrayObject *BlendVAO;
vtkOpenGLBufferObject *BlendVBO;
vtkFrameBufferObject *Framebuffer;
vtkOpenGLFramebufferObject *Framebuffer;
vtkTextureObject *Textures[NumberOfTextures];
TextureName FrontSource; // The current front source buffer
......
......@@ -39,7 +39,7 @@ Ph.D. thesis of Christian BOUCHENY.
#include "vtkEDLShading.h"
#include "vtkCamera.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkMath.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLError.h"
......@@ -174,7 +174,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s)
//
if (this->ProjectionFBO == 0)
{
this->ProjectionFBO = vtkFrameBufferObject::New();
this->ProjectionFBO = vtkOpenGLFramebufferObject::New();
this->ProjectionFBO->SetContext(renWin);
}
s.SetFrameBuffer(this->ProjectionFBO);
......@@ -228,7 +228,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s)
//
if (this->EDLHighFBO == 0)
{
this->EDLHighFBO = vtkFrameBufferObject::New();
this->EDLHighFBO = vtkOpenGLFramebufferObject::New();
this->EDLHighFBO->SetContext(renWin);
}
s.SetFrameBuffer(EDLHighFBO);
......@@ -257,7 +257,7 @@ void vtkEDLShading::EDLInitializeFramebuffers(vtkRenderState &s)
//
if (this->EDLLowFBO == 0)
{
this->EDLLowFBO = vtkFrameBufferObject::New();
this->EDLLowFBO = vtkOpenGLFramebufferObject::New();
this->EDLLowFBO->SetContext(renWin);
}
s.SetFrameBuffer(EDLLowFBO);
......@@ -744,7 +744,7 @@ void vtkEDLShading::Render(const vtkRenderState *s)
//
if(s->GetFrameBuffer() != NULL)
{
vtkFrameBufferObject::SafeDownCast(s->GetFrameBuffer())->Bind();
vtkOpenGLFramebufferObject::SafeDownCast(s->GetFrameBuffer())->Bind();
}
this->ProjectionFBO->RestorePreviousBindingsAndBuffers();
......
......@@ -65,7 +65,7 @@ Ph.D. thesis of Christian BOUCHENY.
#include "vtkOpenGLHelper.h" // used for ivars
class vtkOpenGLRenderWindow;
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkTextureObject;
class VTKRENDERINGOPENGL2_EXPORT vtkEDLShading : public vtkDepthImageProcessingPass
......@@ -133,7 +133,7 @@ public:
/**
* Framebuffer object and textures for initial projection
*/
vtkFrameBufferObject *ProjectionFBO;
vtkOpenGLFramebufferObject *ProjectionFBO;
// used to record scene data
vtkTextureObject *ProjectionColorTexture;
// color render target for projection pass
......@@ -142,11 +142,11 @@ public:
//@}
// Framebuffer objects and textures for EDL
vtkFrameBufferObject *EDLHighFBO;
vtkOpenGLFramebufferObject *EDLHighFBO;
// for EDL full res shading
vtkTextureObject *EDLHighShadeTexture;
// color render target for EDL full res pass
vtkFrameBufferObject *EDLLowFBO;
vtkOpenGLFramebufferObject *EDLLowFBO;
// for EDL low res shading (image size/4)
vtkTextureObject *EDLLowShadeTexture;
// color render target for EDL low res pass
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkFrameBufferObject2.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkFrameBufferObject2.h"
#include "vtkObjectFactory.h"
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkFrameBufferObject2);
//----------------------------------------------------------------------------
vtkFrameBufferObject2::vtkFrameBufferObject2()
{
}
//----------------------------------------------------------------------------
vtkFrameBufferObject2::~vtkFrameBufferObject2()
{
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkFrameBufferObject2.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkFrameBufferObject2
* @brief Interface to OpenGL framebuffer object.
*
* Deprecated class, use vtkFrameBufferObject instead
* The functionality and API of this class has been
* moved into vtkFrameBufferObject
*
* @sa
* vtkFrameBufferObject
*/
#ifndef vtkFrameBufferObject2_h
#define vtkFrameBufferObject2_h
#include "vtkFrameBufferObject.h"
#include "vtkRenderingOpenGL2Module.h" // For export macro
class VTKRENDERINGOPENGL2_EXPORT vtkFrameBufferObject2 : public vtkFrameBufferObject
{
public:
static vtkFrameBufferObject2* New();
vtkTypeMacro(vtkFrameBufferObject2, vtkFrameBufferObject);
protected:
vtkFrameBufferObject2();
~vtkFrameBufferObject2();
private:
vtkFrameBufferObject2(const vtkFrameBufferObject2&) VTK_DELETE_FUNCTION;
void operator=(const vtkFrameBufferObject2&) VTK_DELETE_FUNCTION;
};
#endif
......@@ -18,7 +18,7 @@
#include <cassert>
#include "vtkRenderState.h"
#include "vtkRenderer.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkTextureObject.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
......@@ -119,7 +119,7 @@ void vtkGaussianBlurPass::Render(const vtkRenderState *s)
if(this->FrameBufferObject==0)
{
this->FrameBufferObject=vtkFrameBufferObject::New();
this->FrameBufferObject=vtkOpenGLFramebufferObject::New();
this->FrameBufferObject->SetContext(renWin);
}
......
......@@ -53,7 +53,7 @@
#include "vtkImageProcessingPass.h"
class vtkDepthPeelingPassLayerList; // Pimpl
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkOpenGLHelper;
class vtkOpenGLRenderWindow;
class vtkTextureObject;
......@@ -92,7 +92,7 @@ public:
/**
* Graphics resources.
*/
vtkFrameBufferObject *FrameBufferObject;
vtkOpenGLFramebufferObject *FrameBufferObject;
vtkTextureObject *Pass1; // render target for the scene
vtkTextureObject *Pass2; // render target for the horizontal pass
......
......@@ -20,7 +20,7 @@
#include <cassert>
#include "vtkRenderState.h"
#include "vtkRenderer.h"
#include "vtkFrameBufferObject.h"
#include "vtkOpenGLFramebufferObject.h"
#include "vtkTextureObject.h"
#include "vtkOpenGLRenderWindow.h"
......@@ -79,7 +79,7 @@ void vtkImageProcessingPass::RenderDelegate(const vtkRenderState *s,
int height,
int newWidth,
int newHeight,
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *target)
{
assert("pre: s_exists" && s!=0);
......
......@@ -32,7 +32,7 @@
class vtkOpenGLRenderWindow;
class vtkDepthPeelingPassLayerList; // Pimpl
class vtkFrameBufferObject;
class vtkOpenGLFramebufferObject;
class vtkTextureObject;
class VTKRENDERINGOPENGL2_EXPORT vtkImageProcessingPass : public vtkRenderPass
......@@ -84,7 +84,7 @@ public:
int height,
int newWidth,
int newHeight,
vtkFrameBufferObject *fbo,
vtkOpenGLFramebufferObject *fbo,
vtkTextureObject *target);
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkFrameBufferObject.h
Module: vtkOpenGLFramebufferObject.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -13,7 +13,7 @@
=========================================================================*/
/**
* @class vtkFrameBufferObject
* @class vtkOpenGLFramebufferObject
* @brief Internal class which encapsulates OpenGL FramebufferObject
*
* Before delving into this class it is best to have some background
......@@ -121,8 +121,8 @@
* vtkTextureObject, vtkRenderbufferObject
*/
#ifndef vtkFrameBufferObject_h
#define vtkFrameBufferObject_h
#ifndef vtkOpenGLFramebufferObject_h
#define vtkOpenGLFramebufferObject_h
/**
* A variant of vtkErrorMacro that is used to verify framebuffer
......@@ -137,7 +137,7 @@
# define vtkCheckFrameBufferStatusMacroImpl(macro, mode) \
{ \
const char *eStr; \
bool ok = vtkFrameBufferObject::GetFrameBufferStatus(mode, eStr); \
bool ok = vtkOpenGLFramebufferObject::GetFrameBufferStatus(mode, eStr); \
if (!ok) \
{ \
macro( \
......@@ -168,11 +168,11 @@ class vtkShaderProgram;
class vtkTextureObject;
class vtkWindow;
class VTKRENDERINGOPENGL2_EXPORT vtkFrameBufferObject : public vtkFrameBufferObjectBase
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLFramebufferObject : public vtkFrameBufferObjectBase
{
public:
static vtkFrameBufferObject* New();
vtkTypeMacro(vtkFrameBufferObject, vtkFrameBufferObjectBase);
static vtkOpenGLFramebufferObject* New();
vtkTypeMacro(vtkOpenGLFramebufferObject, vtkFrameBufferObjectBase);
void PrintSelf(ostream& os, vtkIndent indent);
//@{
......@@ -461,88 +461,6 @@ protected: