VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkOpenGLProperty.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkOpenGLProperty.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
=========================================================================*/
22
#ifndef __vtkOpenGLProperty_h
23
#define __vtkOpenGLProperty_h
24
25
#include "
vtkProperty.h
"
26
27
class
vtkOpenGLRenderer
;
28
class
vtkShader2
;
29
class
vtkShader2Collection
;
30
class
vtkShaderProgram2
;
31
class
vtkGLSLShaderDeviceAdapter2
;
32
33
class
VTK_RENDERING_EXPORT
vtkOpenGLProperty
:
public
vtkProperty
34
{
35
public
:
36
static
vtkOpenGLProperty
*
New
();
37
vtkTypeMacro(
vtkOpenGLProperty
,
vtkProperty
);
38
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
39
41
void
Render
(
vtkActor
*a,
vtkRenderer
*ren);
42
44
void
BackfaceRender
(
vtkActor
*a,
vtkRenderer
*ren);
45
46
//BTX
48
50
virtual
void
PostRender
(
vtkActor
*a,
51
vtkRenderer
*r);
53
57
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*win);
58
60
62
vtkGetObjectMacro(PropProgram,
vtkShaderProgram2
);
63
void
SetPropProgram(
vtkShaderProgram2
*);
65
67
68
vtkGetObjectMacro(ShaderDeviceAdapter2,
vtkGLSLShaderDeviceAdapter2
);
70
72
73
vtkGetObjectMacro(CurrentShaderProgram2,
vtkShaderProgram2
);
74
//ETX
76
78
82
virtual
void
AddShaderVariable
(
const
char
*
name
,
int
numVars,
int
*x);
83
virtual
void
AddShaderVariable
(
const
char
*
name
,
int
numVars,
float
*x);
84
virtual
void
AddShaderVariable
(
const
char
*
name
,
int
numVars,
double
*x);
86
87
protected
:
88
vtkOpenGLProperty
();
89
~
vtkOpenGLProperty
();
90
92
void
LoadMultiTexturingExtensions(
vtkRenderer
* ren);
93
95
virtual
void
ReadFrameworkMaterial
();
96
97
// Owned. Result of merging the shader program of the renderer and the
98
// PropProgram.
99
vtkShaderProgram2
*
CachedShaderProgram2
;
100
101
vtkShaderProgram2
*
LastRendererShaderProgram2
;
// just a ref
102
vtkShaderProgram2
*
LastPropProgram
;
// just a ref
103
vtkShaderProgram2
*
PropProgram
;
// owned
104
105
// Point to CachedShaderProgram2 if Shading is on and the context supports
106
// it.
107
vtkShaderProgram2
*
CurrentShaderProgram2
;
108
109
vtkShader2
*
DefaultMainVS
;
110
vtkShader2
*
DefaultMainFS
;
111
vtkShader2
*
DefaultPropVS
;
112
vtkShader2
*
DefaultPropFS
;
113
bool
UseDefaultMainVS
;
114
bool
UseDefaultMainFS
;
115
bool
UseDefaultPropVS
;
116
bool
UseDefaultPropFS
;
117
vtkGLSLShaderDeviceAdapter2
*
ShaderDeviceAdapter2
;
118
119
120
private
:
121
vtkOpenGLProperty
(
const
vtkOpenGLProperty
&);
// Not implemented.
122
void
operator=(
const
vtkOpenGLProperty
&);
// Not implemented.
123
};
124
125
#endif
Generated on Sun Sep 9 2012 13:03:45 for VTK by
1.8.1.2