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 "vtkRenderPass.h" 00037 00038 class vtkMultiProcessController; 00039 00040 class vtkPixelBufferObject; 00041 class vtkTextureObject; 00042 class vtkShaderProgram2; 00043 class vtkOpenGLRenderWindow; 00044 00045 class VTK_PARALLEL_EXPORT vtkCompositeZPass : public vtkRenderPass 00046 { 00047 public: 00048 static vtkCompositeZPass *New(); 00049 vtkTypeMacro(vtkCompositeZPass,vtkRenderPass); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00054 virtual void Render(const vtkRenderState *s); 00055 00058 void ReleaseGraphicsResources(vtkWindow *w); 00059 00061 00063 vtkGetObjectMacro(Controller,vtkMultiProcessController); 00064 virtual void SetController(vtkMultiProcessController *controller); 00066 00068 bool IsSupported(vtkOpenGLRenderWindow *context); 00069 00070 protected: 00072 vtkCompositeZPass(); 00073 00075 virtual ~vtkCompositeZPass(); 00076 00080 void CreateProgram(vtkOpenGLRenderWindow *context); 00081 00082 vtkMultiProcessController *Controller; 00083 00084 vtkPixelBufferObject *PBO; 00085 vtkTextureObject *ZTexture; 00086 vtkShaderProgram2 *Program; 00087 float *RawZBuffer; 00088 size_t RawZBufferSize; 00089 00090 private: 00091 vtkCompositeZPass(const vtkCompositeZPass&); // Not implemented. 00092 void operator=(const vtkCompositeZPass&); // Not implemented. 00093 }; 00094 00095 #endif