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
vtkShaderDeviceAdapter2
;
32
class
vtkGLSLShaderDeviceAdapter2
;
33
34
class
VTK_RENDERING_EXPORT
vtkOpenGLProperty
:
public
vtkProperty
35
{
36
public
:
37
static
vtkOpenGLProperty
*
New
();
38
vtkTypeMacro(
vtkOpenGLProperty
,
vtkProperty
);
39
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
40
42
void
Render
(
vtkActor
*a,
vtkRenderer
*ren);
43
45
void
BackfaceRender
(
vtkActor
*a,
vtkRenderer
*ren);
46
47
//BTX
49
51
virtual
void
PostRender
(
vtkActor
*a,
52
vtkRenderer
*r);
54
58
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*win);
59
61
63
vtkGetObjectMacro(PropProgram,
vtkShaderProgram2
);
64
void
SetPropProgram(
vtkShaderProgram2
*);
66
68
virtual
vtkShaderDeviceAdapter2
*
GetShaderDeviceAdapter2
();
69
71
72
vtkGetObjectMacro(CurrentShaderProgram2,
vtkShaderProgram2
);
73
//ETX
75
77
81
virtual
void
AddShaderVariable
(
const
char
*
name
,
int
numVars,
int
*x);
82
virtual
void
AddShaderVariable
(
const
char
*
name
,
int
numVars,
float
*x);
83
virtual
void
AddShaderVariable
(
const
char
*
name
,
int
numVars,
double
*x);
85
86
protected
:
87
vtkOpenGLProperty
();
88
~
vtkOpenGLProperty
();
89
91
void
LoadMultiTexturingExtensions(
vtkRenderer
* ren);
92
94
virtual
void
ReadFrameworkMaterial
();
95
96
// Owned. Result of merging the shader program of the renderer and the
97
// PropProgram.
98
vtkShaderProgram2
*
CachedShaderProgram2
;
99
100
vtkShaderProgram2
*
LastRendererShaderProgram2
;
// just a ref
101
vtkShaderProgram2
*
LastPropProgram
;
// just a ref
102
vtkShaderProgram2
*
PropProgram
;
// owned
103
104
// Point to CachedShaderProgram2 if Shading is on and the context supports
105
// it.
106
vtkShaderProgram2
*
CurrentShaderProgram2
;
107
108
vtkShader2
*
DefaultMainVS
;
109
vtkShader2
*
DefaultMainFS
;
110
vtkShader2
*
DefaultPropVS
;
111
vtkShader2
*
DefaultPropFS
;
112
bool
UseDefaultMainVS
;
113
bool
UseDefaultMainFS
;
114
bool
UseDefaultPropVS
;
115
bool
UseDefaultPropFS
;
116
vtkGLSLShaderDeviceAdapter2
*
ShaderDeviceAdapter2
;
117
118
119
private
:
120
vtkOpenGLProperty
(
const
vtkOpenGLProperty
&);
// Not implemented.
121
void
operator=(
const
vtkOpenGLProperty
&);
// Not implemented.
122
};
123
124
#endif
Generated on Tue Jan 8 2013 05:45:38 for VTK by
1.8.1.2