20 #ifndef __vtkOpenGLShaderComputation_h 21 #define __vtkOpenGLShaderComputation_h 26 #include "vtkImageData.h" 27 #include "vtkRenderWindow.h" 28 #include "vtkVariant.h" 40 virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 void Initialize(vtkRenderWindow *renderWindow);
49 bool FramebufferComplete();
65 bool AcquireResultRenderbuffer();
66 void ReleaseResultRenderbuffer();
73 void Compute(
float slice=0.);
77 void SetUniform(std::string name,
float uniform);
85 vtkGetStringMacro(VertexShaderSource);
86 vtkSetStringMacro(VertexShaderSource);
87 vtkGetStringMacro(FragmentShaderSource);
88 vtkSetStringMacro(FragmentShaderSource);
93 vtkGetObjectMacro(ResultImageData, vtkImageData);
94 vtkSetObjectMacro(ResultImageData, vtkImageData);
98 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
99 vtkSetObjectMacro(RenderWindow, vtkRenderWindow);
103 vtkGetMacro(Initialized,
bool);
109 vtkGetMacro(ErrorOccurred,
bool);
121 char *VertexShaderSource;
122 char *FragmentShaderSource;
123 vtkImageData *ResultImageData;
125 vtkTypeUInt32 ProgramObject;
126 unsigned long ProgramObjectMTime;
127 vtkTypeUInt32 FramebufferID;
128 vtkTypeUInt32 ColorRenderbufferID;
129 vtkTypeUInt32 DepthRenderbufferID;
131 vtkRenderWindow *RenderWindow;
133 std::map<std::string, vtkVariant> Uniforms;