VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dox
Rendering
OpenGL2
vtkEDLShading.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: VTK
4
Module: vtkEDLShading.h
5
6
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7
All rights reserved.
8
9
ParaView is a free software; you can redistribute it and/or modify it
10
under the terms of the ParaView license version 1.2.
11
12
See License_v1.2.txt for the full ParaView license.
13
A copy of this license can be obtained by contacting
14
Kitware Inc.
15
28 Corporate Drive
16
Clifton Park, NY 12065
17
USA
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
=========================================================================*/
32
/*----------------------------------------------------------------------
33
Acknowledgement:
34
This algorithm is the result of joint work by Electricité de France,
35
CNRS, Collège de France and Université J. Fourier as part of the
36
Ph.D. thesis of Christian BOUCHENY.
37
------------------------------------------------------------------------*/
58
#ifndef vtkEDLShading_h
59
#define vtkEDLShading_h
60
61
#define EDL_HIGH_RESOLUTION_ON 1
62
#define EDL_LOW_RESOLUTION_ON 1
63
64
#include "
vtkDepthImageProcessingPass.h
"
65
#include "
vtkRenderingOpenGL2Module.h
"
// For export macro
66
#include "
vtkSmartPointer.h
"
// needed for vtkSmartPointer
67
#include "
vtkOpenGLHelper.h
"
// used for ivars
68
69
class
vtkOpenGLRenderWindow
;
70
class
vtkFrameBufferObject
;
71
class
vtkTextureObject
;
72
73
class
VTKRENDERINGOPENGL2_EXPORT
vtkEDLShading
:
public
vtkDepthImageProcessingPass
74
{
75
public
:
76
static
vtkEDLShading
*
New
();
77
vtkTypeMacro(
vtkEDLShading
,
vtkDepthImageProcessingPass
);
78
void
PrintSelf
(ostream& os,
vtkIndent
indent);
79
80
//BTX
82
84
virtual
void
Render
(
const
vtkRenderState
*s);
85
//ETX
87
90
void
ReleaseGraphicsResources
(
vtkWindow
*w);
91
92
protected
:
94
vtkEDLShading
();
95
97
virtual
~
vtkEDLShading
();
98
100
void
EDLInitializeFramebuffers(
vtkRenderState
&s);
101
103
void
EDLInitializeShaders(
vtkOpenGLRenderWindow
*);
104
106
bool
EDLShadeHigh(
vtkRenderState
&s,
vtkOpenGLRenderWindow
*);
107
109
bool
EDLShadeLow(
vtkRenderState
&s,
vtkOpenGLRenderWindow
*);
110
112
bool
EDLBlurLow(
vtkRenderState
&s,
vtkOpenGLRenderWindow
*);
113
115
bool
EDLCompose(
const
vtkRenderState
*s,
vtkOpenGLRenderWindow
*);
116
118
119
vtkFrameBufferObject
*
ProjectionFBO
;
120
// used to record scene data
121
vtkTextureObject
*
ProjectionColorTexture
;
122
// color render target for projection pass
123
vtkTextureObject
*
ProjectionDepthTexture
;
124
// depth render target for projection pass
126
127
// Framebuffer objects and textures for EDL
128
vtkFrameBufferObject
*
EDLHighFBO
;
129
// for EDL full res shading
130
vtkTextureObject
*
EDLHighShadeTexture
;
131
// color render target for EDL full res pass
132
vtkFrameBufferObject
*
EDLLowFBO
;
133
// for EDL low res shading (image size/4)
134
vtkTextureObject
*
EDLLowShadeTexture
;
135
// color render target for EDL low res pass
136
vtkTextureObject
*
EDLLowBlurTexture
;
137
// color render target for EDL low res
138
// bilateral filter pass
139
140
// Shader prohrams
141
vtkOpenGLHelper
EDLShadeProgram
;
142
vtkOpenGLHelper
EDLComposeProgram
;
143
vtkOpenGLHelper
BilateralProgram
;
144
145
float
EDLNeighbours[8][4];
146
bool
EDLIsFiltered
;
147
int
EDLLowResFactor
;
// basically 4
148
149
float
Zn
;
// near clipping plane
150
float
Zf
;
// far clipping plane
151
152
private
:
153
vtkEDLShading
(
const
vtkEDLShading
&);
// Not implemented.
154
void
operator=(
const
vtkEDLShading
&);
// Not implemented.
155
};
156
157
#endif
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition:
vtkOpenGLRenderWindow.h:40
vtkEDLShading::EDLLowResFactor
int EDLLowResFactor
Definition:
vtkEDLShading.h:147
vtkEDLShading::ProjectionDepthTexture
vtkTextureObject * ProjectionDepthTexture
Definition:
vtkEDLShading.h:123
vtkEDLShading::EDLLowShadeTexture
vtkTextureObject * EDLLowShadeTexture
Definition:
vtkEDLShading.h:134
vtkEDLShading
Definition:
vtkEDLShading.h:73
vtkEDLShading::EDLHighShadeTexture
vtkTextureObject * EDLHighShadeTexture
Definition:
vtkEDLShading.h:130
vtkEDLShading::Zf
float Zf
Definition:
vtkEDLShading.h:150
VTKRENDERINGOPENGL2_EXPORT
#define VTKRENDERINGOPENGL2_EXPORT
Definition:
vtkRenderingOpenGL2Module.h:15
vtkEDLShading::EDLHighFBO
vtkFrameBufferObject * EDLHighFBO
Definition:
vtkEDLShading.h:128
vtkEDLShading::BilateralProgram
vtkOpenGLHelper BilateralProgram
Definition:
vtkEDLShading.h:143
vtkEDLShading::ProjectionColorTexture
vtkTextureObject * ProjectionColorTexture
Definition:
vtkEDLShading.h:121
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:36
vtkEDLShading::EDLComposeProgram
vtkOpenGLHelper EDLComposeProgram
Definition:
vtkEDLShading.h:142
vtkRenderState
Context in which a vtkRenderPass will render.
Definition:
vtkRenderState.h:39
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:38
vtkEDLShading::ProjectionFBO
vtkFrameBufferObject * ProjectionFBO
Definition:
vtkEDLShading.h:119
vtkDepthImageProcessingPass.h
vtkOpenGLHelper.h
vtkFrameBufferObject
internal class which encapsulates OpenGL frame buffer object. Not to be used directly.
Definition:
vtkFrameBufferObject.h:46
vtkSmartPointer.h
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:42
vtkDepthImageProcessingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkRenderPass::Render
virtual void Render(const vtkRenderState *s)=0
vtkRenderingOpenGL2Module.h
vtkOpenGLHelper
Definition:
vtkOpenGLHelper.h:30
vtkEDLShading::EDLLowBlurTexture
vtkTextureObject * EDLLowBlurTexture
Definition:
vtkEDLShading.h:136
vtkEDLShading::EDLIsFiltered
bool EDLIsFiltered
Definition:
vtkEDLShading.h:146
vtkObject::New
static vtkObject * New()
vtkEDLShading::Zn
float Zn
Definition:
vtkEDLShading.h:149
vtkDepthImageProcessingPass
Convenient class for post-processing passes. Based on vtkImageProcessingPass, but writes depth as wel...
Definition:
vtkDepthImageProcessingPass.h:61
vtkEDLShading::EDLLowFBO
vtkFrameBufferObject * EDLLowFBO
Definition:
vtkEDLShading.h:132
vtkEDLShading::EDLShadeProgram
vtkOpenGLHelper EDLShadeProgram
Definition:
vtkEDLShading.h:141
vtkDepthImageProcessingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w)
Generated on Wed Dec 16 2015 17:15:10 for VTK by
1.8.9.1