VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
boeckb
code
depot
group-kitware
vtk
build-release
Utilities
Doxygen
dox
Rendering
OpenGL2
vtkOpenGLPolyDataMapper2D.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkOpenGLPolyDataMapper2D.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
=========================================================================*/
26
#ifndef vtkOpenGLPolyDataMapper2D_h
27
#define vtkOpenGLPolyDataMapper2D_h
28
29
#include "vtkRenderingOpenGL2Module.h"
// For export macro
30
#include "
vtkPolyDataMapper2D.h
"
31
#include "
vtkOpenGLHelper.h
"
// used for ivars
32
#include <string>
// For API.
33
#include <vector>
//for ivars
34
35
class
vtkOpenGLBufferObject
;
36
class
vtkOpenGLHelper
;
37
class
vtkOpenGLVertexBufferObject
;
38
class
vtkPoints
;
39
class
vtkRenderer
;
40
class
vtkTextureObject
;
41
42
class
VTKRENDERINGOPENGL2_EXPORT
vtkOpenGLPolyDataMapper2D
:
public
vtkPolyDataMapper2D
43
{
44
public
:
45
vtkTypeMacro(
vtkOpenGLPolyDataMapper2D
,
vtkPolyDataMapper2D
);
46
static
vtkOpenGLPolyDataMapper2D
*
New
();
47
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
48
50
void
RenderOverlay
(
vtkViewport
* viewport,
vtkActor2D
* actor);
51
55
void
ReleaseGraphicsResources
(
vtkWindow
*);
56
57
protected
:
58
vtkOpenGLPolyDataMapper2D
();
59
~
vtkOpenGLPolyDataMapper2D
();
60
61
// the following is all extra stuff to work around the
62
// fact that gl_PrimitiveID does not work correctly on
63
// Apple devices with AMD graphics hardware. See apple
64
// bug ID 20747550
65
bool
HaveAppleBug
;
66
std::vector<float>
AppleBugPrimIDs
;
67
vtkOpenGLBufferObject
*
AppleBugPrimIDBuffer
;
68
70
71
virtual
bool
GetNeedToRebuildShaders(
72
vtkOpenGLHelper
&cellBO,
vtkViewport
*ren,
vtkActor2D
*act);
74
76
77
virtual
void
BuildShaders(
std::string
&VertexCode,
78
std::string
&fragmentCode,
79
std::string
&geometryCode,
80
vtkViewport
*ren,
vtkActor2D
*act);
82
84
85
virtual
void
UpdateShaders(
vtkOpenGLHelper
&cellBO,
86
vtkViewport
*viewport,
vtkActor2D
*act);
88
91
virtual
void
SetMapperShaderParameters(
vtkOpenGLHelper
&cellBO,
vtkViewport
*ren,
vtkActor2D
*act);
92
93
95
void
SetCameraShaderParameters(
vtkOpenGLHelper
&cellBO,
vtkViewport
*viewport,
vtkActor2D
*act);
96
98
void
SetPropertyShaderParameters(
vtkOpenGLHelper
&cellBO,
vtkViewport
*viewport,
vtkActor2D
*act);
99
101
void
UpdateVBO(
vtkActor2D
*act,
vtkViewport
*viewport);
102
103
// The VBO and its layout.
104
vtkOpenGLVertexBufferObject
*
VBO
;
105
106
// Structures for the various cell types we render.
107
vtkOpenGLHelper
Points
;
108
vtkOpenGLHelper
Lines
;
109
vtkOpenGLHelper
Tris
;
110
vtkOpenGLHelper
TriStrips
;
111
vtkOpenGLHelper
*
LastBoundBO
;
112
113
vtkTextureObject
*
CellScalarTexture
;
114
vtkOpenGLBufferObject
*
CellScalarBuffer
;
115
bool
HaveCellScalars
;
116
int
PrimitiveIDOffset
;
117
118
vtkTimeStamp
VBOUpdateTime
;
// When was the VBO updated?
119
vtkPoints
*
TransformedPoints
;
120
121
// do we have wide lines that require special handling
122
virtual
bool
HaveWideLines(
vtkViewport
*,
vtkActor2D
*);
123
124
private
:
125
vtkOpenGLPolyDataMapper2D
(
const
vtkOpenGLPolyDataMapper2D
&);
// Not implemented.
126
void
operator=(
const
vtkOpenGLPolyDataMapper2D
&);
// Not implemented.
127
};
128
129
#endif
vtkPolyDataMapper2D::New
static vtkPolyDataMapper2D * New()
vtkOpenGLPolyDataMapper2D::Points
vtkOpenGLHelper Points
Definition:
vtkOpenGLPolyDataMapper2D.h:107
vtkMapper2D::RenderOverlay
virtual void RenderOverlay(vtkViewport *, vtkActor2D *)
Definition:
vtkMapper2D.h:40
vtkViewport
abstract specification for Viewports
Definition:
vtkViewport.h:46
vtkOpenGLPolyDataMapper2D::AppleBugPrimIDs
std::vector< float > AppleBugPrimIDs
Definition:
vtkOpenGLPolyDataMapper2D.h:66
vtkOpenGLPolyDataMapper2D::Lines
vtkOpenGLHelper Lines
Definition:
vtkOpenGLPolyDataMapper2D.h:108
vtkActor2D
a actor that draws 2D data
Definition:
vtkActor2D.h:44
vtkPolyDataMapper2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkTimeStamp
record modification and/or execution time
Definition:
vtkTimeStamp.h:34
vtkOpenGLPolyDataMapper2D::Tris
vtkOpenGLHelper Tris
Definition:
vtkOpenGLPolyDataMapper2D.h:109
vtkRenderer
abstract specification for renderers
Definition:
vtkRenderer.h:63
vtkX3D::string
Definition:
vtkX3D.h:490
vtkPolyDataMapper2D.h
vtkOpenGLPolyDataMapper2D::TransformedPoints
vtkPoints * TransformedPoints
Definition:
vtkOpenGLPolyDataMapper2D.h:119
vtkOpenGLPolyDataMapper2D::VBO
vtkOpenGLVertexBufferObject * VBO
Definition:
vtkOpenGLPolyDataMapper2D.h:104
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:36
vtkOpenGLPolyDataMapper2D::PrimitiveIDOffset
int PrimitiveIDOffset
Definition:
vtkOpenGLPolyDataMapper2D.h:116
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:38
vtkOpenGLHelper.h
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:39
vtkOpenGLPolyDataMapper2D::LastBoundBO
vtkOpenGLHelper * LastBoundBO
Definition:
vtkOpenGLPolyDataMapper2D.h:111
vtkOpenGLPolyDataMapper2D::CellScalarTexture
vtkTextureObject * CellScalarTexture
Definition:
vtkOpenGLPolyDataMapper2D.h:113
vtkOpenGLPolyDataMapper2D::VBOUpdateTime
vtkTimeStamp VBOUpdateTime
Definition:
vtkOpenGLPolyDataMapper2D.h:118
vtkOpenGLVertexBufferObject
Definition:
vtkOpenGLVertexBufferObject.h:36
vtkOpenGLPolyDataMapper2D::AppleBugPrimIDBuffer
vtkOpenGLBufferObject * AppleBugPrimIDBuffer
Definition:
vtkOpenGLPolyDataMapper2D.h:67
vtkAbstractMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition:
vtkAbstractMapper.h:63
vtkOpenGLHelper
Definition:
vtkOpenGLHelper.h:30
vtkOpenGLBufferObject
OpenGL buffer object.
Definition:
vtkOpenGLBufferObject.h:32
vtkOpenGLPolyDataMapper2D::HaveAppleBug
bool HaveAppleBug
Definition:
vtkOpenGLPolyDataMapper2D.h:65
vtkOpenGLPolyDataMapper2D::TriStrips
vtkOpenGLHelper TriStrips
Definition:
vtkOpenGLPolyDataMapper2D.h:110
vtkOpenGLPolyDataMapper2D
2D PolyData support for OpenGL
Definition:
vtkOpenGLPolyDataMapper2D.h:32
vtkOpenGLPolyDataMapper2D::HaveCellScalars
bool HaveCellScalars
Definition:
vtkOpenGLPolyDataMapper2D.h:115
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition:
vtkPolyDataMapper2D.h:50
vtkPoints
represent and manipulate 3D points
Definition:
vtkPoints.h:38
vtkOpenGLPolyDataMapper2D::CellScalarBuffer
vtkOpenGLBufferObject * CellScalarBuffer
Definition:
vtkOpenGLPolyDataMapper2D.h:114
Generated by
1.8.9.1