VTK
dox
Rendering
OpenGL2
vtkOpenGLVertexArrayObject.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
5
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6
All rights reserved.
7
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
14
#ifndef vtkOpenGLVertexArrayObject_h
15
#define vtkOpenGLVertexArrayObject_h
16
17
#include "vtkRenderingOpenGL2Module.h"
// for export macro
18
#include "
vtkObject.h
"
19
#include <string>
// For API.
20
21
class
vtkShaderProgram
;
22
class
vtkOpenGLBufferObject
;
23
35
class
VTKRENDERINGOPENGL2_EXPORT
vtkOpenGLVertexArrayObject
:
public
vtkObject
36
{
37
public
:
38
static
vtkOpenGLVertexArrayObject
*
New
();
39
vtkTypeMacro(
vtkOpenGLVertexArrayObject
,
vtkObject
)
40
void
PrintSelf
(ostream& os,
vtkIndent
indent);
41
42
void
Bind();
43
44
void
Release();
45
46
void
ReleaseGraphicsResources();
47
48
void
ShaderProgramChanged();
49
50
bool
AddAttributeArray
(
vtkShaderProgram
*program,
51
vtkOpenGLBufferObject
*buffer,
52
const
std::string
&
name
,
int
offset
,
size_t
stride,
53
int
elementType,
int
elementTupleSize,
bool
normalize)
54
{
55
return
this->AddAttributeArrayWithDivisor(program, buffer,
name
,
56
offset
,stride,elementType, elementTupleSize, normalize, 0,
false
);
57
}
58
59
bool
AddAttributeArrayWithDivisor(
vtkShaderProgram
*program,
60
vtkOpenGLBufferObject
*buffer,
61
const
std::string
&
name
,
int
offset
,
size_t
stride,
62
int
elementType,
int
elementTupleSize,
bool
normalize,
63
int
divisor,
bool
isMatrix);
64
65
bool
AddAttributeMatrixWithDivisor(
vtkShaderProgram
*program,
66
vtkOpenGLBufferObject
*buffer,
67
const
std::string
&
name
,
int
offset
,
size_t
stride,
68
int
elementType,
int
elementTupleSize,
bool
normalize,
69
int
divisor);
70
71
bool
RemoveAttributeArray(
const
std::string
&
name
);
72
73
// Force this VAO to emulate a vertex aray object even if
74
// the system supports VAOs. This can be useful in cases where
75
// the vertex array object does not handle all extensions.
76
void
SetForceEmulation(
bool
val);
77
78
protected
:
79
vtkOpenGLVertexArrayObject
();
80
~
vtkOpenGLVertexArrayObject
();
81
82
private
:
83
vtkOpenGLVertexArrayObject
(
84
const
vtkOpenGLVertexArrayObject
&) VTK_DELETE_FUNCTION;
85
void
operator=(
const
vtkOpenGLVertexArrayObject
&) VTK_DELETE_FUNCTION;
86
class
Private;
87
Private *Internal;
88
};
89
90
#endif // vtkOpenGLVertexArrayObject_h
vtkOpenGLBufferObject
OpenGL buffer object.
Definition:
vtkOpenGLBufferObject.h:32
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkOpenGLVertexArrayObject::AddAttributeArray
bool AddAttributeArray(vtkShaderProgram *program, vtkOpenGLBufferObject *buffer, const std::string &name, int offset, size_t stride, int elementType, int elementTupleSize, bool normalize)
Definition:
vtkOpenGLVertexArrayObject.h:50
vtkX3D::offset
Definition:
vtkX3D.h:438
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.
vtkX3D::name
Definition:
vtkX3D.h:219
vtkObject.h
vtkX3D::string
Definition:
vtkX3D.h:490
vtkOpenGLVertexArrayObject
The VertexArrayObject class uses, or emulates, vertex array objects.
Definition:
vtkOpenGLVertexArrayObject.h:35
Generated by
1.8.16