VTK
vtkColorMaterialHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkColorMaterialHelper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkColorMaterialHelper_h
30 #define vtkColorMaterialHelper_h
31 
32 #include "vtkRenderingOpenGLModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkShaderProgram2;
36 
37 class VTKRENDERINGOPENGL_EXPORT vtkColorMaterialHelper : public vtkObject
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45  vtkGetObjectMacro(Shader, vtkShaderProgram2);
46 
52 
58 
65  void Render();
66 
67 protected:
70 
73 
75  {
76  DISABLED = 0,
77  AMBIENT = 1,
78  DIFFUSE = 2,
79  SPECULAR = 3,
80  AMBIENT_AND_DIFFUSE = 4,
81  EMISSION = 5
82  };
84 
85 private:
86  vtkColorMaterialHelper(const vtkColorMaterialHelper&) VTK_DELETE_FUNCTION;
87  void operator=(const vtkColorMaterialHelper&) VTK_DELETE_FUNCTION;
88 
89 };
90 
91 #endif
vtkColorMaterialHelper::Render
void Render()
Initializes uniform variables with the last captured OpenGL state.
vtkColorMaterialHelper::Initialize
void Initialize(vtkShaderProgram2 *)
vtkColorMaterialHelper::eMaterialParamater
eMaterialParamater
Definition: vtkColorMaterialHelper.h:75
vtkColorMaterialHelper::Mode
eMaterialParamater Mode
Definition: vtkColorMaterialHelper.h:83
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkColorMaterialHelper::SetUniformVariables
void SetUniformVariables()
Capture current OpenGL state and initialize uniform variables used by the helper shader.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkColorMaterialHelper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkColorMaterialHelper::PrepareForRendering
void PrepareForRendering()
Captures current OpenGL state.
vtkShaderProgram2
GLSL Program.
Definition: vtkShaderProgram2.h:69
vtkColorMaterialHelper::New
static vtkColorMaterialHelper * New()
vtkColorMaterialHelper::SetShader
void SetShader(vtkShaderProgram2 *)
vtkColorMaterialHelper
a helper to assist in simulating the ColorMaterial behaviour of the default OpenGL pipeline.
Definition: vtkColorMaterialHelper.h:38
vtkColorMaterialHelper::Shader
vtkShaderProgram2 * Shader
Definition: vtkColorMaterialHelper.h:72
vtkColorMaterialHelper::vtkColorMaterialHelper
vtkColorMaterialHelper()
vtkColorMaterialHelper::~vtkColorMaterialHelper
~vtkColorMaterialHelper()