VTK
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 vtkShaderProgram2;
00044 class vtkOpenGLRenderWindow;
00045 
00046 class VTKRENDERINGPARALLEL_EXPORT vtkCompositeZPass : public vtkRenderPass
00047 {
00048 public:
00049   static vtkCompositeZPass *New();
00050   vtkTypeMacro(vtkCompositeZPass,vtkRenderPass);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00055   virtual void Render(const vtkRenderState *s);
00056 
00059   void ReleaseGraphicsResources(vtkWindow *w);
00060 
00062 
00064   vtkGetObjectMacro(Controller,vtkMultiProcessController);
00065   virtual void SetController(vtkMultiProcessController *controller);
00067 
00069   bool IsSupported(vtkOpenGLRenderWindow *context);
00070 
00071  protected:
00073   vtkCompositeZPass();
00074 
00076   virtual ~vtkCompositeZPass();
00077 
00081   void CreateProgram(vtkOpenGLRenderWindow *context);
00082 
00083   vtkMultiProcessController *Controller;
00084 
00085   vtkPixelBufferObject *PBO;
00086   vtkTextureObject *ZTexture;
00087   vtkShaderProgram2 *Program;
00088   float *RawZBuffer;
00089   size_t RawZBufferSize;
00090 
00091  private:
00092   vtkCompositeZPass(const vtkCompositeZPass&);  // Not implemented.
00093   void operator=(const vtkCompositeZPass&);  // Not implemented.
00094 };
00095 
00096 #endif