VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSobelGradientMagnitudePass.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 =========================================================================*/ 00062 #ifndef vtkSobelGradientMagnitudePass_h 00063 #define vtkSobelGradientMagnitudePass_h 00064 00065 #include "vtkRenderingOpenGLModule.h" // For export macro 00066 #include "vtkImageProcessingPass.h" 00067 00068 class vtkOpenGLRenderWindow; 00069 class vtkDepthPeelingPassLayerList; // Pimpl 00070 class vtkShaderProgram2; 00071 class vtkShader2; 00072 class vtkFrameBufferObject; 00073 class vtkTextureObject; 00074 00075 class VTKRENDERINGOPENGL_EXPORT vtkSobelGradientMagnitudePass : public vtkImageProcessingPass 00076 { 00077 public: 00078 static vtkSobelGradientMagnitudePass *New(); 00079 vtkTypeMacro(vtkSobelGradientMagnitudePass,vtkImageProcessingPass); 00080 void PrintSelf(ostream& os, vtkIndent indent); 00081 00082 //BTX 00084 00086 virtual void Render(const vtkRenderState *s); 00087 //ETX 00089 00092 void ReleaseGraphicsResources(vtkWindow *w); 00093 00094 protected: 00096 vtkSobelGradientMagnitudePass(); 00097 00099 virtual ~vtkSobelGradientMagnitudePass(); 00100 00102 00103 vtkFrameBufferObject *FrameBufferObject; 00104 vtkTextureObject *Pass1; // render target for the scene 00105 vtkTextureObject *Gx1; // render target 0 for the first shader 00106 vtkTextureObject *Gy1; // render target 1 for the first shader 00107 vtkShaderProgram2 *Program1; // shader to compute Gx1 and Gy1 00108 vtkShaderProgram2 *Program2; // shader to compute |G| from Gx1 and Gy1 00110 00111 private: 00112 vtkSobelGradientMagnitudePass(const vtkSobelGradientMagnitudePass&); // Not implemented. 00113 void operator=(const vtkSobelGradientMagnitudePass&); // Not implemented. 00114 }; 00115 00116 #endif