Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
Type-OpenVolumeMesh
Commits
572b486a
Commit
572b486a
authored
Apr 17, 2018
by
Martin Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made the OpenVolumeMeshBufferManager use the VBO in the
vertexDeclaration
parent
cead023a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ObjectTypes/VolumeMeshObject/VolumeMeshBufferManagerT.cc
ObjectTypes/VolumeMeshObject/VolumeMeshBufferManagerT.cc
+4
-4
No files found.
ObjectTypes/VolumeMeshObject/VolumeMeshBufferManagerT.cc
View file @
572b486a
...
...
@@ -263,21 +263,21 @@ void VolumeMeshBufferManager<VolumeMesh>::calculateVertexDeclaration()
if
(
mPrimitiveMode
!=
PM_NONE
)
//should always be the case
{
mVertexDeclaration
.
addElement
(
GL_FLOAT
,
3
,
ACG
::
VERTEX_USAGE_POSITION
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
));
mVertexDeclaration
.
addElement
(
GL_FLOAT
,
3
,
ACG
::
VERTEX_USAGE_POSITION
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
)
,
0
,
0
,
mBuffer
);
currentOffset
+=
3
*
sizeof
(
float
);
}
if
(
mNormalMode
!=
NM_NONE
)
{
mNormalOffset
=
currentOffset
;
mVertexDeclaration
.
addElement
(
GL_FLOAT
,
3
,
ACG
::
VERTEX_USAGE_NORMAL
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
));
mVertexDeclaration
.
addElement
(
GL_FLOAT
,
3
,
ACG
::
VERTEX_USAGE_NORMAL
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
)
,
0
,
0
,
mBuffer
);
currentOffset
+=
3
*
sizeof
(
float
);
}
if
((
mColorMode
!=
CM_NO_COLORS
)
||
mShowIrregularInnerEdges
||
mShowIrregularOuterValence2Edges
)
{
mColorOffset
=
currentOffset
;
mVertexDeclaration
.
addElement
(
GL_UNSIGNED_BYTE
,
4
,
ACG
::
VERTEX_USAGE_COLOR
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
));
mVertexDeclaration
.
addElement
(
GL_UNSIGNED_BYTE
,
4
,
ACG
::
VERTEX_USAGE_COLOR
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
)
,
0
,
0
,
mBuffer
);
currentOffset
+=
4
*
sizeof
(
char
);
}
...
...
@@ -287,7 +287,7 @@ void VolumeMeshBufferManager<VolumeMesh>::calculateVertexDeclaration()
unsigned
char
numOfCoords
=
0
;
if
(
mTexCoordMode
==
TCM_SINGLE_2D
)
numOfCoords
=
2
;
mVertexDeclaration
.
addElement
(
GL_FLOAT
,
numOfCoords
,
ACG
::
VERTEX_USAGE_TEXCOORD
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
));
mVertexDeclaration
.
addElement
(
GL_FLOAT
,
numOfCoords
,
ACG
::
VERTEX_USAGE_TEXCOORD
,
reinterpret_cast
<
GLuint
*>
(
currentOffset
)
,
0
,
0
,
mBuffer
);
currentOffset
+=
numOfCoords
*
sizeof
(
float
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment