VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Parallel/vtkCompositeZPass.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCompositeZPass.h
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 =========================================================================*/
00033 #ifndef vtkCompositeZPass_h
00034 #define vtkCompositeZPass_h
00035 
00036 #include "vtkRenderingParallelModule.h" // For export macro
00037 #include "vtkRenderPass.h"
00038 
00039 class vtkMultiProcessController;
00040 
00041 class vtkPixelBufferObject;
00042 class vtkTextureObject;
00043 class vtkOpenGLRenderWindow;
00044 #ifdef VTKGL2
00045 namespace vtkgl
00046 {
00047 class CellBO;
00048 }
00049 #else
00050 class vtkShaderProgram2;
00051 #endif
00052 
00053 class VTKRENDERINGPARALLEL_EXPORT vtkCompositeZPass : public vtkRenderPass
00054 {
00055 public:
00056   static vtkCompositeZPass *New();
00057   vtkTypeMacro(vtkCompositeZPass,vtkRenderPass);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00062   virtual void Render(const vtkRenderState *s);
00063 
00066   void ReleaseGraphicsResources(vtkWindow *w);
00067 
00069 
00071   vtkGetObjectMacro(Controller,vtkMultiProcessController);
00072   virtual void SetController(vtkMultiProcessController *controller);
00074 
00076   bool IsSupported(vtkOpenGLRenderWindow *context);
00077 
00078  protected:
00080   vtkCompositeZPass();
00081 
00083   virtual ~vtkCompositeZPass();
00084 
00088   void CreateProgram(vtkOpenGLRenderWindow *context);
00089 
00090   vtkMultiProcessController *Controller;
00091 
00092   vtkPixelBufferObject *PBO;
00093   vtkTextureObject *ZTexture;
00094 #ifdef VTKGL2
00095   vtkgl::CellBO *Program;
00096 #else
00097   vtkShaderProgram2 *Program;
00098 #endif
00099   float *RawZBuffer;
00100   size_t RawZBufferSize;
00101 
00102  private:
00103   vtkCompositeZPass(const vtkCompositeZPass&);  // Not implemented.
00104   void operator=(const vtkCompositeZPass&);  // Not implemented.
00105 };
00106 
00107 #endif