Commit 03ae0f70 authored by Ken Martin's avatar Ken Martin
Browse files

moved render window over

Change-Id: I1845a80e7c1659f378346b5c81cc5b188d352e6d
parent 761e773b
vtk_add_test_cxx(
TestCoincidentGeoGraphRepresentation2D.cxx
TestGeoAssignCoordinates.cxx
TestGeoGraticule.cxx
TestGeoProjection.cxx,NO_VALID
TestGlobeSource.cxx
TestLabeledGeoView2D.cxx
)
if(NOT VTK_REPLACE_OPENGL_OVERRIDES)
vtk_add_test_cxx(
TestCoincidentGeoGraphRepresentation2D.cxx
TestLabeledGeoView2D.cxx
)
endif()
vtk_test_cxx_executable(${vtk-module}CxxTests)
......@@ -6,6 +6,10 @@ vtk_add_test_cxx(
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
)
# temporary, remove when LIC is implemented
if(NOT VTK_REPLACE_OPENGL_OVERRIDES)
# surface lic painter tests
# get decent coverage by calling
# varying arguments to the following
......@@ -373,3 +377,5 @@ ExternalData_add_test(VTKData
--mask-intensity=0.41
--mask-color 0 0 0
)
endif() # opengl2
......@@ -13,12 +13,10 @@ vtk_add_test_cxx(
TestActorLightingFlag.cxx
TestAnimationScene.cxx
TestBackfaceCulling.cxx
TestBlurAndSobelPasses.cxx
TestCellPickerImage.cxx
TestDynamic2DLabelMapper.cxx
TestFBO.cxx,NO_VALID
TestFollowerPicking.cxx
TestGaussianBlurPass.cxx
TestGlyph3DMapper.cxx
TestGlyph3DMapperMasking.cxx
TestGlyph3DMapperOrientationArray.cxx
......@@ -45,7 +43,6 @@ vtk_add_test_cxx(
TestLabelPlacerCoincidentPoints.cxx
TestLabelPlacementMapper2D.cxx
TestLabelPlacementMapperCoincidentPoints.cxx
TestLightActor.cxx
TestLODActor.cxx,NO_VALID
TestManyActors.cxx,NO_VALID
TestMonitors.cxx,NO_VALID
......@@ -58,7 +55,6 @@ vtk_add_test_cxx(
TestResetCameraVerticalAspectRatio.cxx
TestResetCameraVerticalAspectRatioParallel.cxx
TestSetImageOrientation.cxx
TestSobelGradientMagnitudePass.cxx
TestTextActorAlphaBlending.cxx
TestTextActorDepthPeeling.cxx
TestTextActor3DAlphaBlending.cxx
......@@ -70,16 +66,24 @@ vtk_add_test_cxx(
TestTransformCoordinateUseDouble.cxx
TestTranslucentLUTAlphaBlending.cxx
TestTranslucentLUTDepthPeeling.cxx
TestTranslucentLUTDepthPeelingPass.cxx
TestTranslucentLUTTextureAlphaBlending.cxx
TestTranslucentLUTTextureDepthPeeling.cxx
)
if(NOT APPLE)
vtk_add_test_cxx(TestShadowMapPass.cxx)
endif()
if(NOT VTK_REPLACE_OPENGL_OVERRIDES)
vtk_add_test_cxx(
TestBlurAndSobelPasses.cxx
TestGaussianBlurPass.cxx
TestLightActor.cxx
TestSobelGradientMagnitudePass.cxx
TestTranslucentLUTDepthPeelingPass.cxx)
if(NOT APPLE)
vtk_add_test_cxx(TestShadowMapPass.cxx)
endif()
if(WIN32 AND NOT VTK_USE_X)
vtk_add_test_cxx(TestWin32OpenGLRenderWindow.cxx NO_VALID)
endif()
if(WIN32 AND NOT VTK_USE_X)
vtk_add_test_cxx(TestWin32OpenGLRenderWindow.cxx NO_VALID)
endif()
include_directories(${OPENGL_INCLUDE_DIR})
......@@ -87,9 +91,6 @@ include_directories(${OPENGL_INCLUDE_DIR})
vtk_add_test_cxx(
TestAreaSelections.cxx
TestGlyph3DMapperArrow.cxx
TestMultiblockDisplayProperties.cxx
TestMultiTexturing.cxx
TestMultiTexturingTransform.cxx
TestImageSliceMapperBorder.cxx
TestImageResliceMapperBorder.cxx
TestScalarBar.cxx
......@@ -106,6 +107,12 @@ vtk_add_test_cxx(
SurfacePlusEdges.cxx
TestLabelPlacementMapper.cxx
)
if(NOT VTK_REPLACE_OPENGL_OVERRIDES)
vtk_add_test_cxx(
TestMultiblockDisplayProperties.cxx
TestMultiTexturing.cxx
TestMultiTexturingTransform.cxx)
endif()
set(VTK_USE_GLSL_SHADERS FALSE)
if(VTK_USE_GLSL_SHADERS)
......
......@@ -28,8 +28,10 @@ set(Module_SRCS
vtkOpenGL2PolyDataMapper2D.cxx
vtkOpenGL2Property.cxx
vtkVBOPolyDataMapper.cxx
vtkOpenGL2RenderWindow.cxx
vtkOpenGL2Renderer.cxx
vtkOpenGL2Texture.cxx
vtkOpenGL2TextureUnitManager.cxx
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx
)
......@@ -85,15 +87,18 @@ if(VTK_USE_X)
)
endif()
set_source_files_properties(
vtkOpenGL2RenderWindow
ABSTRACT
)
set_source_files_properties(
vtkRenderingOpenGL2ObjectFactory
WRAP_EXCLUDE
)
# A crazy hack, Marcus endorsed :-P, where we override the overrides
# when the option is set to see what the new OpenGL2 code does in all regression
# tests.
# setup factory overrides
if(VTK_REPLACE_OPENGL_OVERRIDES)
set(opengl_overrides
Actor
......@@ -110,7 +115,77 @@ if(VTK_REPLACE_OPENGL_OVERRIDES)
foreach(_override ${opengl_overrides})
vtk_add_override(vtk${_override} vtkOpenGL2${_override})
endforeach()
# FIXME: Not sure that this is the best way to handle X...
if(VTK_USE_X)
find_package(X11 REQUIRED)
if(NOT X11_Xt_FOUND)
message(FATAL_ERROR "X11_Xt_LIB could not be found. Required for VTK X lib.")
endif()
include_directories(${X11_INCLUDE_DIR} ${X11_Xt_INCLUDE_PATH})
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkXOpenGL2RenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkXOpenGL2RenderWindow")
list(APPEND Module_SRCS
vtkXOpenGL2RenderWindowInteractor.cxx
vtkXOpenGL2RenderWindow.cxx
)
elseif(VTK_USE_OSMESA)
message("VTK will be built with OSMesa support!")
find_package(OSMesa REQUIRED)
if(NOT OSMESA_FOUND)
message(FATAL_ERROR "The OSMesa library could not be found. REQUIRED for off screen rendering")
endif()
include_directories(${OSMESA_INCLUDE_DIR})
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkOSOpenGL2RenderWindow")
list(APPEND Module_SRCS vtkOSOpenGL2RenderWindow.cxx)
elseif(WIN32)
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkWin32OpenGL2RenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkWin32OpenGL2RenderWindow")
list(APPEND Module_SRCS
vtkWin32OpenGL2RenderWindowInteractor.cxx
vtkWin32OpenGL2RenderWindow.cxx
)
elseif(VTK_USE_COCOA)
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkCocoaRenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkCocoaRenderWindow")
list(APPEND Module_SRCS
vtkCocoaRenderWindowInteractor.mm
vtkCocoaRenderWindow.mm
vtkCocoaGLView.mm
)
list(APPEND ${vtk-module}_HDRS
vtkCocoaMacOSXSDKCompatibility.h
)
# Set specified Objective-C++ flags, if any.
if(VTK_REQUIRED_OBJCXX_FLAGS)
set_source_files_properties(vtkCocoaRenderWindowInteractor.mm
vtkCocoaRenderWindow.mm
vtkCocoaGLView.mm
PROPERTIES COMPILE_FLAGS "${VTK_REQUIRED_OBJCXX_FLAGS}")
endif(VTK_REQUIRED_OBJCXX_FLAGS)
set_source_files_properties(vtkCocoaGLView WRAP_EXCLUDE)
elseif(VTK_USE_CARBON)
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkCarbonRenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkCarbonRenderWindow")
list(APPEND Module_SRCS
vtkCarbonRenderWindowInteractor.cxx
vtkCarbonRenderWindow.cxx
)
endif()
endif() # VTK_REPLACE_OPENGL_OVERRIDES
# Now we iterate and create that class file...
foreach(_class ${vtk_module_overrides})
......
......@@ -17,7 +17,7 @@
#include "vtkObjectFactory.h"
#include "vtkRenderer.h"
#include "vtkOutputWindow.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGL2RenderWindow.h"
#include "vtkOpenGLError.h"
#include "vtkgluPickMatrix.h"
......@@ -32,12 +32,11 @@ void vtkOpenGL2Camera::Render(vtkRenderer *ren)
{
vtkOpenGLClearErrorMacro();
double aspect[2];
int lowerLeft[2];
int usize, vsize;
vtkMatrix4x4 *matrix = vtkMatrix4x4::New();
vtkOpenGLRenderWindow *win = vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow());
vtkOpenGL2RenderWindow *win = vtkOpenGL2RenderWindow::SafeDownCast(ren->GetRenderWindow());
// find out if we should stereo render
this->Stereo = (ren->GetRenderWindow())->GetStereoRender();
......@@ -112,16 +111,6 @@ void vtkOpenGL2Camera::Render(vtkRenderer *ren)
glEnable(GL_SCISSOR_TEST);
glScissor(lowerLeft[0], lowerLeft[1], usize, vsize);
// some renderer subclasses may have more complicated computations for the
// aspect ratio. So take that into account by computing the difference
// between our simple aspect ratio and what the actual renderer is reporting.
ren->ComputeAspect();
ren->GetAspect(aspect);
double aspect2[2];
ren->vtkViewport::ComputeAspect();
ren->vtkViewport::GetAspect(aspect2);
double aspectModification = aspect[0] * aspect2[1] / (aspect[1] * aspect2[0]);
if ((ren->GetRenderWindow())->GetErase() && ren->GetErase()
&& !ren->GetIsPicking())
{
......
......@@ -26,7 +26,7 @@
#include "vtkMapper.h"
#include "vtkOpenGL2Camera.h"
#include "vtkOpenGL2Renderer.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGL2RenderWindow.h"
#include "vtkOpenGLExtensionManager.h"
#include "vtkTimerLog.h"
#include "vtkGarbageCollector.h"
......@@ -236,8 +236,8 @@ void vtkOpenGL2ImageSliceMapper::RenderTexturedPolygon(
unsigned long loadTime = this->LoadTime.GetMTime();
// the render window, needed for state information
vtkOpenGLRenderWindow *renWin =
static_cast<vtkOpenGLRenderWindow *>(ren->GetRenderWindow());
vtkOpenGL2RenderWindow *renWin =
static_cast<vtkOpenGL2RenderWindow *>(ren->GetRenderWindow());
bool reuseTexture = true;
......@@ -857,8 +857,8 @@ void vtkOpenGL2ImageSliceMapper::Render(vtkRenderer *ren, vtkImageSlice *prop)
vtkOpenGLClearErrorMacro();
vtkOpenGLRenderWindow *renWin =
vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow());
vtkOpenGL2RenderWindow *renWin =
vtkOpenGL2RenderWindow::SafeDownCast(ren->GetRenderWindow());
if (renWin && (renWin != this->RenderWindow ||
renWin->GetContextCreationTime() > this->LoadTime.GetMTime()))
......@@ -989,7 +989,7 @@ void vtkOpenGL2ImageSliceMapper::Render(vtkRenderer *ren, vtkImageSlice *prop)
//----------------------------------------------------------------------------
void vtkOpenGL2ImageSliceMapper::CheckOpenGLCapabilities(
vtkOpenGLRenderWindow *renWin)
vtkOpenGL2RenderWindow *renWin)
{
vtkOpenGLExtensionManager *manager = 0;
......
......@@ -27,7 +27,7 @@
#include "vtkImageSliceMapper.h"
class vtkRenderWindow;
class vtkOpenGLRenderWindow;
class vtkOpenGL2RenderWindow;
class vtkActor;
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2ImageSliceMapper :
......@@ -103,7 +103,7 @@ protected:
// Description:
// Check various OpenGL capabilities
void CheckOpenGLCapabilities(vtkOpenGLRenderWindow *renWin);
void CheckOpenGLCapabilities(vtkOpenGL2RenderWindow *renWin);
long TextureIndex; // OpenGL ID for texture or display list
long BackgroundTextureIndex; // OpenGL ID for texture or display list
......
......@@ -20,14 +20,12 @@
#include "vtkOpenGL.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLExtensionManager.h"
#include "vtkOpenGLTexture.h"
#include "vtkTexture.h"
#include "vtkgl.h" // vtkgl namespace
#include "vtkTextureUnitManager.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGL2TextureUnitManager.h"
#include "vtkOpenGLError.h"
#include <cassert>
......@@ -65,15 +63,6 @@ vtkOpenGL2Property::~vtkOpenGL2Property()
// Implement base class method.
void vtkOpenGL2Property::Render(vtkActor *anActor, vtkRenderer *ren)
{
vtkOpenGLRenderWindow* context = vtkOpenGLRenderWindow::SafeDownCast(
ren->GetRenderWindow());
if (!context)
{
// must be an OpenGL context.
return;
}
// Set the LineStipple
if (this->LineStipplePattern != 0xFFFF)
{
......@@ -120,10 +109,6 @@ void vtkOpenGL2Property::Render(vtkActor *anActor, vtkRenderer *ren)
//-----------------------------------------------------------------------------
bool vtkOpenGL2Property::RenderTextures(vtkActor*, vtkRenderer* ren)
{
vtkOpenGLRenderWindow* context = vtkOpenGLRenderWindow::SafeDownCast(
ren->GetRenderWindow());
assert(context!=NULL);
// render any textures.
int numTextures = this->GetNumberOfTextures();
if (numTextures > 0)
......
This diff is collapsed.
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOpenGL2RenderWindow.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.
=========================================================================*/
// .NAME vtkOpenGL2RenderWindow - OpenGL rendering window
// .SECTION Description
// vtkOpenGL2RenderWindow is a concrete implementation of the abstract class
// vtkRenderWindow. vtkOpenGL2Renderer interfaces to the OpenGL graphics
// library. Application programmers should normally use vtkRenderWindow
// instead of the OpenGL specific version.
#ifndef __vtkOpenGL2RenderWindow_h
#define __vtkOpenGL2RenderWindow_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkRenderWindow.h"
#include "vtkOpenGL.h" // Needed for GLuint.
class vtkIdList;
class vtkOpenGLExtensionManager;
class vtkOpenGLHardwareSupport;
class vtkOpenGL2TextureUnitManager;
class vtkStdString;
class VTKRENDERINGOPENGL2_EXPORT vtkOpenGL2RenderWindow : public vtkRenderWindow
{
public:
vtkTypeMacro(vtkOpenGL2RenderWindow, vtkRenderWindow);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set/Get the maximum number of multisamples
static void SetGlobalMaximumNumberOfMultiSamples(int val);
static int GetGlobalMaximumNumberOfMultiSamples();
// Description:
// Update system if needed due to stereo rendering.
virtual void StereoUpdate();
// Description:
// Set/Get the pixel data of an image, transmitted as RGBRGB...
virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
virtual int GetPixelData(int x,int y,int x2,int y2, int front,
vtkUnsignedCharArray *data);
virtual int SetPixelData(int x,int y,int x2,int y2,unsigned char *data,
int front);
virtual int SetPixelData(int x,int y,int x2,int y2,
vtkUnsignedCharArray *data, int front);
// Description:
// Set/Get the pixel data of an image, transmitted as RGBARGBA...
virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front);
virtual int GetRGBAPixelData(int x,int y,int x2,int y2, int front,
vtkFloatArray* data);
virtual int SetRGBAPixelData(int x,int y,int x2,int y2, float *data,
int front, int blend=0);
virtual int SetRGBAPixelData(int x,int y,int x2,int y2, vtkFloatArray *data,
int front, int blend=0);
virtual void ReleaseRGBAPixelData(float *data);
virtual unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2,
int front);
virtual int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
vtkUnsignedCharArray *data);
virtual int SetRGBACharPixelData(int x, int y, int x2, int y2,
unsigned char *data, int front,
int blend=0);
virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,
vtkUnsignedCharArray *data, int front,
int blend=0);
// Description:
// Set/Get the zbuffer data from an image
virtual float *GetZbufferData( int x1, int y1, int x2, int y2 );
virtual int GetZbufferData( int x1, int y1, int x2, int y2, float* z );
virtual int GetZbufferData( int x1, int y1, int x2, int y2,
vtkFloatArray* z );
virtual int SetZbufferData( int x1, int y1, int x2, int y2, float *buffer );
virtual int SetZbufferData( int x1, int y1, int x2, int y2,
vtkFloatArray *buffer );
// Description:
// Register a texture name with this render window.
void RegisterTextureResource (GLuint id);
// Description:
// Get the size of the depth buffer.
int GetDepthBufferSize();
// Description:
// Get the size of the color buffer.
// Returns 0 if not able to determine otherwise sets R G B and A into buffer.
int GetColorBufferSizes(int *rgba);
// Description:
// Initialize OpenGL for this window.
virtual void OpenGLInit();
// Initialize the state of OpenGL that VTK wants for this window
virtual void OpenGLInitState();
// Initialize VTK for rendering in a new OpenGL context
virtual void OpenGLInitContext();
// Description:
// Return the OpenGL name of the back left buffer.
// It is GL_BACK_LEFT if GL is bound to the window-system-provided
// framebuffer. It is vtkgl::COLOR_ATTACHMENT0_EXT if GL is bound to an
// application-created framebuffer object (GPU-based offscreen rendering)
// It is used by vtkOpenGL2Camera.
unsigned int GetBackLeftBuffer();
// Description:
// Return the OpenGL name of the back right buffer.
// It is GL_BACK_RIGHT if GL is bound to the window-system-provided
// framebuffer. It is vtkgl::COLOR_ATTACHMENT0_EXT+1 if GL is bound to an
// application-created framebuffer object (GPU-based offscreen rendering)
// It is used by vtkOpenGL2Camera.
unsigned int GetBackRightBuffer();
// Description:
// Return the OpenGL name of the front left buffer.
// It is GL_FRONT_LEFT if GL is bound to the window-system-provided
// framebuffer. It is vtkgl::COLOR_ATTACHMENT0_EXT if GL is bound to an
// application-created framebuffer object (GPU-based offscreen rendering)
// It is used by vtkOpenGL2Camera.
unsigned int GetFrontLeftBuffer();
// Description:
// Return the OpenGL name of the front right buffer.
// It is GL_FRONT_RIGHT if GL is bound to the window-system-provided
// framebuffer. It is vtkgl::COLOR_ATTACHMENT0_EXT+1 if GL is bound to an
// application-created framebuffer object (GPU-based offscreen rendering)
// It is used by vtkOpenGL2Camera.
unsigned int GetFrontRightBuffer();
// Description:
// Return the OpenGL name of the back left buffer.
// It is GL_BACK if GL is bound to the window-system-provided
// framebuffer. It is vtkgl::COLOR_ATTACHMENT0_EXT if GL is bound to an
// application-created framebuffer object (GPU-based offscreen rendering)
// It is used by vtkOpenGL2Camera.
unsigned int GetBackBuffer();
// Description:
// Return the OpenGL name of the front left buffer.
// It is GL_FRONT if GL is bound to the window-system-provided
// framebuffer. It is vtkgl::COLOR_ATTACHMENT0_EXT if GL is bound to an
// application-created framebuffer object (GPU-based offscreen rendering)
// It is used by vtkOpenGL2Camera.
unsigned int GetFrontBuffer();
// Description:
// @deprecated Replaced by
// vtkOpenGLCheckErrorMacro
VTK_LEGACY(virtual void CheckGraphicError());
VTK_LEGACY(virtual int HasGraphicError());
VTK_LEGACY(virtual const char *GetLastGraphicErrorString());
// Description:
// Get the time when the OpenGL context was created.
virtual unsigned long GetContextCreationTime();
// Description:
// Returns the extension manager. A new one will be created if one hasn't
// already been set up.
vtkOpenGLExtensionManager* GetExtensionManager();
// Description:
// Returns an Hardware Support object. A new one will be created if one
// hasn't already been set up.
vtkOpenGLHardwareSupport* GetHardwareSupport();
//BTX
// Description:
// Returns its texture unit manager object. A new one will be created if one
// hasn't already been set up.
vtkOpenGL2TextureUnitManager *GetTextureUnitManager();
//ETX
// Description:
// Block the thread until the actual rendering is finished().
// Useful for measurement only.
virtual void WaitForCompletion();
protected:
vtkOpenGL2RenderWindow();
~vtkOpenGL2RenderWindow();
long OldMonitorSetting;
vtkIdList *TextureResourceIds;
int GetPixelData(int x, int y, int x2, int y2, int front, unsigned char* data);
int GetRGBAPixelData(int x, int y, int x2, int y2, int front, float* data);
int GetRGBACharPixelData(int x, int y, int x2, int y2, int front,
unsigned char* data);
// Description:
// Create an offScreen window based on OpenGL framebuffer extension.
// Return if the creation was successful or not.
// \pre positive_width: width>0
// \pre positive_height: height>0
// \pre not_initialized: !OffScreenUseFrameBuffer
// \post valid_result: (result==0 || result==1)
// && (result implies OffScreenUseFrameBuffer)
int CreateHardwareOffScreenWindow(int width, int height);
// Description:
// Destroy an offscreen window based on OpenGL framebuffer extension.
// \pre initialized: OffScreenUseFrameBuffer
// \post destroyed: !OffScreenUseFrameBuffer
void DestroyHardwareOffScreenWindow();
// Description:
// Flag telling if a framebuffer-based offscreen is currently in use.
int OffScreenUseFrameBuffer;
// Description:
// Variables used by the framebuffer-based offscreen method.
int NumberOfFrameBuffers;
unsigned int TextureObjects[4]; // really GLuint
unsigned int FrameBufferObject; // really GLuint
unsigned int DepthRenderBufferObject; // really GLuint
// Description:
// Create a not-off-screen window.
virtual void CreateAWindow() = 0;
// Description:
// Destroy a not-off-screen window.
virtual void DestroyWindow() = 0;
// Description:
// Set the texture unit manager.
void SetTextureUnitManager(vtkOpenGL2TextureUnitManager *textureUnitManager