VTK
dox
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
=========================================================================*/
22
#ifndef vtkOpenGLRenderUtilities_h
23
#define vtkOpenGLRenderUtilities_h
24
25
#include "vtkRenderingOpenGL2Module.h"
// For export macro
26
#include "
vtkObject.h
"
27
28
#include "vtk_glew.h"
// Needed for GLuint.
29
#include <string>
// for std::string
30
31
class
vtkOpenGLBufferObject
;
32
class
vtkOpenGLVertexArrayObject
;
33
class
vtkShaderProgram
;
34
35
class
VTKRENDERINGOPENGL2_EXPORT
vtkOpenGLRenderUtilities
:
public
vtkObject
36
{
37
public
:
38
vtkTypeMacro(
vtkOpenGLRenderUtilities
,
vtkObject
);
39
void
PrintSelf
(ostream& os,
vtkIndent
indent);
40
42
48
static
void
RenderQuad(
49
float
*verts,
float
*tcoords,
50
vtkShaderProgram
*program,
vtkOpenGLVertexArrayObject
*vao);
51
static
void
RenderTriangles(
52
float
*verts,
unsigned
int
numVerts,
53
GLuint *indices,
unsigned
int
numIndices,
54
float
*tcoords,
55
vtkShaderProgram
*program,
vtkOpenGLVertexArrayObject
*vao);
57
59
104
static
std::string
GetFullScreenQuadVertexShader();
105
static
std::string
GetFullScreenQuadFragmentShaderTemplate();
106
static
std::string
GetFullScreenQuadGeometryShader();
107
static
bool
PrepFullScreenVAO(
vtkOpenGLBufferObject
*verts,
108
vtkOpenGLVertexArrayObject
*vao,
109
vtkShaderProgram
*prog);
110
static
void
DrawFullScreenQuad();
112
113
protected
:
114
vtkOpenGLRenderUtilities
();
115
~
vtkOpenGLRenderUtilities
();
116
117
private
:
118
vtkOpenGLRenderUtilities
(
const
vtkOpenGLRenderUtilities
&) VTK_DELETE_FUNCTION;
119
void
operator=(
const
vtkOpenGLRenderUtilities
&) VTK_DELETE_FUNCTION;
120
};
121
122
#endif
vtkOpenGLBufferObject
OpenGL buffer object.
Definition:
vtkOpenGLBufferObject.h:32
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkOpenGLRenderUtilities
OpenGL rendering utility functions.
Definition:
vtkOpenGLRenderUtilities.h:35
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition:
vtkShaderProgram.h:44
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
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:490
vtkOpenGLVertexArrayObject
The VertexArrayObject class uses, or emulates, vertex array objects.
Definition:
vtkOpenGLVertexArrayObject.h:35
Generated by
1.8.17