VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkCgShader.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCgShader.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
=========================================================================*/
15
/*
16
* Copyright 2003 Sandia Corporation.
17
* Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
18
* license for use of this work by or on behalf of the
19
* U.S. Government. Redistribution and use in source and binary forms, with
20
* or without modification, are permitted provided that this Notice and any
21
* statement of authorship are reproduced on all copies.
22
*/
23
92
#ifndef __vtkCgShader_h
93
#define __vtkCgShader_h
94
95
#include "
vtkShader.h
"
96
97
class
vtkActor
;
98
class
vtkCamera
;
99
class
vtkCgShaderInternals;
100
class
vtkLight
;
101
class
vtkProperty
;
102
class
vtkRenderer
;
103
104
// manages all shaders defined in the XML file
105
// especially the part about sending things to the card
106
class
VTK_RENDERING_EXPORT
vtkCgShader
:
public
vtkShader
107
{
108
public
:
109
static
vtkCgShader
*
New
();
110
vtkTypeMacro(
vtkCgShader
,
vtkShader
);
111
void
PrintSelf
(ostream &os,
vtkIndent
indent);
112
113
// Called to compile the shader code.
114
// The vtkShaderProgram calls this method only when
115
// vtkShader::IsCompiled() returns false.
116
// The subclasses must only compile the code in this method.
117
// Returns if the compile was successful.
118
virtual
int
Compile
();
119
123
virtual
void
Bind
();
124
127
virtual
void
Unbind
();
128
131
void
ReportError();
132
136
void
ReleaseGraphicsResources
(
vtkWindow
*);
137
138
140
145
virtual
void
PassShaderVariables
(
vtkActor
* actor,
vtkRenderer
* ren);
146
//BTX
147
protected
:
148
vtkCgShader
();
149
~
vtkCgShader
();
151
153
154
virtual
void
SetUniformParameter
(
const
char
*
name
,
int
numValues,
const
int
*
value
) ;
155
virtual
void
SetUniformParameter
(
const
char
*
name
,
int
numValues,
const
float
*
value
) ;
156
virtual
void
SetUniformParameter
(
const
char
*
name
,
int
numValues,
const
double
*
value
);
158
160
161
virtual
void
SetMatrixParameter
(
const
char
*
name
,
int
numValues,
162
int
order
,
const
float
*
value
);
163
virtual
void
SetMatrixParameter
(
const
char
*
name
,
int
numValues,
164
int
order
,
const
double
*
value
);
165
virtual
void
SetMatrixParameter
(
const
char
*
name
,
const
char
* state_matix_type,
166
const
char
* transform_type);
168
169
virtual
void
SetSamplerParameter
(
const
char
*
name
,
vtkTexture
* texture,
170
int
);
171
172
friend
class
vtkCgShaderDeviceAdapter
;
173
private
:
174
vtkCgShader
(
const
vtkCgShader
&);
// Not Implemented
175
void
operator=(
const
vtkCgShader
&);
// Not Implemented
176
177
vtkCgShaderInternals*
Internals
;
178
//ETX
179
};
180
#endif //_vtkCgShader_h
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition:
vtkActor.h:49
vtkX3D::order
Definition:
vtkX3D.h:440
vtkProperty
represent surface properties of a geometric object
Definition:
vtkProperty.h:61
vtkShader::Bind
virtual void Bind()
Definition:
vtkShader.h:78
vtkRenderer
abstract specification for renderers
Definition:
vtkRenderer.h:69
vtkShader::SetUniformParameter
void SetUniformParameter(vtkActor *, vtkRenderer *, vtkXMLDataElement *)
vtkShader::Compile
virtual int Compile()=0
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:35
vtkX3D::name
Definition:
vtkX3D.h:219
vtkShader.h
vtkCgShader
Cg Shader.
Definition:
vtkCgShader.h:106
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:37
vtkCamera
a virtual camera for 3D rendering
Definition:
vtkCamera.h:47
vtkLight
a virtual light for 3D rendering
Definition:
vtkLight.h:59
vtkShader::SetSamplerParameter
void SetSamplerParameter(vtkActor *, vtkRenderer *, vtkXMLDataElement *)
vtkTexture
handles properties associated with a texture map
Definition:
vtkTexture.h:68
vtkShader::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition:
vtkShader.h:87
VTK_RENDERING_EXPORT
#define VTK_RENDERING_EXPORT
Definition:
vtkWin32Header.h:278
vtkX3D::value
Definition:
vtkX3D.h:220
vtkShader
Definition:
vtkShader.h:58
vtkShader::SetMatrixParameter
void SetMatrixParameter(vtkActor *, vtkRenderer *, vtkXMLDataElement *)
vtkShader::PassShaderVariables
virtual void PassShaderVariables(vtkActor *actor, vtkRenderer *ren)
vtkShader::Unbind
virtual void Unbind()
Definition:
vtkShader.h:82
vtkObject::New
static vtkObject * New()
vtkShader::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkShader::Internals
vtkShaderInternals * Internals
Definition:
vtkShader.h:138
vtkCgShaderDeviceAdapter
adapter to pass generic vertex attributes to the rendering pipeline to be used in a Cg shader...
Definition:
vtkCgShaderDeviceAdapter.h:30
Generated on Sat Sep 13 2014 22:26:23 for VTK by
1.8.8