VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkGLSLShader.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkGLSLShader.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
73
#ifndef __vtkGLSLShader_h
74
#define __vtkGLSLShader_h
75
76
#include "
vtkShader.h
"
77
78
class
vtkActor
;
79
class
vtkRenderer
;
80
class
vtkProperty
;
81
class
vtkLight
;
82
class
vtkCamera
;
83
class
vtkRenderWindow
;
84
85
// Manages all shaders defined in the XML file
86
// especially the part about sending things to the card
87
class
VTK_RENDERING_EXPORT
vtkGLSLShader
:
public
vtkShader
88
{
89
public
:
90
static
vtkGLSLShader
*
New
();
91
vtkTypeMacro(
vtkGLSLShader
,
vtkShader
);
92
void
PrintSelf
(ostream &os,
vtkIndent
indent);
93
98
virtual
int
Compile
();
99
101
unsigned
int
GetHandle
() {
return
this->Shader; }
102
104
106
vtkSetMacro( Program,
unsigned
int
);
107
vtkGetMacro( Program,
unsigned
int
);
109
111
114
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
115
protected
:
116
vtkGLSLShader
();
117
virtual
~
vtkGLSLShader
();
119
120
// These are GLuints.
121
unsigned
int
Program
;
122
unsigned
int
Shader
;
123
124
int
IsShader();
125
int
IsCompiled();
126
128
void
LoadShader();
129
131
132
virtual
void
SetUniformParameter
(
const
char
*
name
,
int
numValues,
const
int
*
value
);
133
virtual
void
SetUniformParameter
(
const
char
*
name
,
int
numValues,
const
float
*
value
);
134
virtual
void
SetUniformParameter
(
const
char
*
name
,
int
numValues,
const
double
*
value
);
136
138
139
virtual
void
SetMatrixParameter
(
const
char
*
name
,
int
numValues,
140
int
order
,
const
float
*
value
);
141
virtual
void
SetMatrixParameter
(
const
char
*
name
,
int
numValues,
142
int
order
,
const
double
*
value
);
143
virtual
void
SetMatrixParameter
(
const
char
*
name
,
const
char
* state_matix_type,
144
const
char
* transform_type);
146
147
virtual
void
SetSamplerParameter
(
const
char
*
name
,
vtkTexture
* texture,
148
int
textureIndex);
149
private
:
150
vtkGLSLShader
(
const
vtkGLSLShader
&);
// Not Implemented
151
void
operator=(
const
vtkGLSLShader
&);
// Not Implemented
152
153
int
GetUniformLocation(
const
char
*
name
);
154
};
155
#endif //__vtkGLSLShader_h
vtkGLSLShader::GetHandle
unsigned int GetHandle()
Definition:
vtkGLSLShader.h:101
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
vtkRenderer
abstract specification for renderers
Definition:
vtkRenderer.h:69
vtkShader::SetUniformParameter
void SetUniformParameter(vtkActor *, vtkRenderer *, vtkXMLDataElement *)
vtkGLSLShader::Shader
unsigned int Shader
Definition:
vtkGLSLShader.h:122
vtkShader::Compile
virtual int Compile()=0
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:35
vtkX3D::name
Definition:
vtkX3D.h:219
vtkShader.h
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
vtkRenderWindow
create a window for renderers to draw into
Definition:
vtkRenderWindow.h:106
vtkShader
Definition:
vtkShader.h:58
vtkShader::SetMatrixParameter
void SetMatrixParameter(vtkActor *, vtkRenderer *, vtkXMLDataElement *)
vtkGLSLShader::Program
unsigned int Program
Definition:
vtkGLSLShader.h:121
vtkGLSLShader
GLSL Shader.
Definition:
vtkGLSLShader.h:87
vtkObject::New
static vtkObject * New()
vtkShader::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Generated on Fri Sep 5 2014 03:02:51 for VTK by
1.8.8