VTK
9.0.1
Rendering
OpenGL2
vtkOpenGLRenderUtilities.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkOpenGLRenderUtilities.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
=========================================================================*/
25
#ifndef vtkOpenGLRenderUtilities_h
26
#define vtkOpenGLRenderUtilities_h
27
28
#include "
vtkObject.h
"
29
#include "vtkRenderingOpenGL2Module.h"
// For export macro
30
31
#include "vtk_glew.h"
// Needed for GLuint.
32
#include <string>
// for std::string
33
34
class
vtkOpenGLBufferObject
;
35
class
vtkOpenGLRenderWindow
;
36
class
vtkOpenGLVertexArrayObject
;
37
class
vtkShaderProgram
;
38
39
class
VTKRENDERINGOPENGL2_EXPORT
vtkOpenGLRenderUtilities
:
public
vtkObject
40
{
41
public
:
42
vtkTypeMacro(
vtkOpenGLRenderUtilities
,
vtkObject
);
43
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
44
46
52
static
void
RenderQuad(
53
float
* verts,
float
* tcoords,
vtkShaderProgram
* program,
vtkOpenGLVertexArrayObject
* vao);
54
static
void
RenderTriangles(
float
* verts,
unsigned
int
numVerts, GLuint* indices,
55
unsigned
int
numIndices,
float
* tcoords,
vtkShaderProgram
* program,
56
vtkOpenGLVertexArrayObject
* vao);
58
60
105
static
std::string
GetFullScreenQuadVertexShader();
106
static
std::string
GetFullScreenQuadFragmentShaderTemplate();
107
static
std::string
GetFullScreenQuadGeometryShader();
108
static
bool
PrepFullScreenVAO(
109
vtkOpenGLRenderWindow
* renWin,
vtkOpenGLVertexArrayObject
* vao,
vtkShaderProgram
* prog);
110
static
void
DrawFullScreenQuad();
112
113
// older signsature, we suggest you use the newer signature above
114
static
bool
PrepFullScreenVAO(
115
vtkOpenGLBufferObject
* verts,
vtkOpenGLVertexArrayObject
* vao,
vtkShaderProgram
* prog);
116
125
static
void
MarkDebugEvent(
const
std::string
& event);
126
127
protected
:
128
vtkOpenGLRenderUtilities
();
129
~
vtkOpenGLRenderUtilities
()
override
;
130
131
private
:
132
vtkOpenGLRenderUtilities
(
const
vtkOpenGLRenderUtilities
&) =
delete
;
133
void
operator=(
const
vtkOpenGLRenderUtilities
&) =
delete
;
134
};
135
136
#endif
vtkOpenGLBufferObject
OpenGL buffer object.
Definition:
vtkOpenGLBufferObject.h:33
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:62
vtkOpenGLRenderUtilities
OpenGL rendering utility functions.
Definition:
vtkOpenGLRenderUtilities.h:39
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition:
vtkShaderProgram.h:44
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkX3D::string
@ string
Definition:
vtkX3D.h:496
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition:
vtkOpenGLRenderWindow.h:51
vtkOpenGLVertexArrayObject
The VertexArrayObject class uses, or emulates, vertex array objects.
Definition:
vtkOpenGLVertexArrayObject.h:36
Generated on Thu Jun 24 2021 15:17:26 for VTK by
1.8.17