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
36
37class VTKRENDERINGOPENGL_EXPORT vtkColorMaterialHelper : public vtkObject
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent);
43
45 vtkGetObjectMacro(Shader, vtkShaderProgram2);
46
52
58
65 void Render();
66
67protected:
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
85private:
86 vtkColorMaterialHelper(const vtkColorMaterialHelper&) VTK_DELETE_FUNCTION;
87 void operator=(const vtkColorMaterialHelper&) VTK_DELETE_FUNCTION;
88
89};
90
91#endif
a helper to assist in simulating the ColorMaterial behaviour of the default OpenGL pipeline.
void SetUniformVariables()
Capture current OpenGL state and initialize uniform variables used by the helper shader.
void PrepareForRendering()
Captures current OpenGL state.
vtkShaderProgram2 * Shader
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkColorMaterialHelper * New()
void Initialize(vtkShaderProgram2 *)
void Render()
Initializes uniform variables with the last captured OpenGL state.
void SetShader(vtkShaderProgram2 *)
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60