• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/VolumeRendering/vtkOpenGLHAVSVolumeMapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Visualization Toolkit
00004 Module:    $RCSfile: vtkOpenGLHAVSVolumeMapper.h,v $
00005 
00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007 All rights reserved.
00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010 This software is distributed WITHOUT ANY WARRANTY; without even
00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012 PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00016 /* Copyright 2005, 2006 by University of Utah. */
00017 
00117 #ifndef __vtkOpenGLHAVSVolumeMapper_h
00118 #define __vtkOpenGLHAVSVolumeMapper_h
00119 
00120 #include "vtkHAVSVolumeMapper.h"
00121 
00122 class vtkRenderer;
00123 
00124 
00125 class VTK_VOLUMERENDERING_EXPORT vtkOpenGLHAVSVolumeMapper : public vtkHAVSVolumeMapper
00126 {
00127 public:
00128   static vtkOpenGLHAVSVolumeMapper *New();
00129   vtkTypeRevisionMacro(vtkOpenGLHAVSVolumeMapper,
00130                        vtkHAVSVolumeMapper);
00131   virtual void PrintSelf(ostream& os, vtkIndent indent);
00132   
00134   virtual void Render(vtkRenderer *ren, vtkVolume *vol);
00135 
00138   virtual void ReleaseGraphicsResources(vtkWindow *);
00139 
00142   virtual void SetGPUDataStructures(bool);
00143 
00148   virtual bool SupportedByHardware();
00149 protected:
00150 
00151   vtkOpenGLHAVSVolumeMapper();
00152   ~vtkOpenGLHAVSVolumeMapper();
00153   virtual int FillInputPortInformation(int port, vtkInformation* info);
00154 
00155 //BTX
00156   virtual void Initialize(vtkRenderer *ren, vtkVolume *vol);
00157   virtual void InitializeLookupTables(vtkVolume *vol);
00158   void InitializeGPUDataStructures();
00159   void InitializeShaders();
00160   void DeleteShaders();
00161   void InitializeFramebufferObject();
00162 
00163   void RenderHAVS(vtkRenderer *ren);
00164   void SetupFBOZBuffer(int screenWidth, int screenHeight, float depthNear, float depthFar, 
00165                        float *zbuffer);
00166   void SetupFBOMRT();
00167   void DrawFBOInit(int screenWidth, int screenHeight, float depthNear, float depthFar);
00168   void DrawFBOGeometry();
00169   void DrawFBOFlush(int screenWidth, int screenHeight, float depthNear, float depthFar);
00170   void DrawBlend(int screenWidth, int screenHeight, float depthNear, float depthFar);
00171 
00172   void CheckOpenGLError(const char *str);
00173 
00174   // GPU
00175   unsigned int VBOVertexName;
00176   unsigned int VBOTexCoordName;
00177   unsigned int VBOVertexIndexName;
00178   unsigned int VertexProgram;
00179   unsigned int FragmentProgramBegin;
00180   unsigned int FragmentProgram;
00181   unsigned int FragmentProgramEnd;
00182   unsigned int FramebufferObject;
00183   int FramebufferObjectSize;
00184   unsigned int FramebufferTextures[4];
00185   unsigned int DepthTexture;
00186 
00187   // Lookup Tables
00188   unsigned int PsiTableTexture;
00189   unsigned int TransferFunctionTexture;
00190 //ETX
00191 
00192 private:
00193   vtkOpenGLHAVSVolumeMapper(const vtkOpenGLHAVSVolumeMapper&);  // Not implemented.
00194   void operator=(const vtkOpenGLHAVSVolumeMapper&);  // Not implemented.
00195 };
00196 
00197 #endif

Generated by  doxygen 1.7.1