Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
Unterteilungsalgorithmen
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
Unterteilungsalgorithmen
Commits
5212054f
Commit
5212054f
authored
Sep 22, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update index buffer after precomputeVertexTable
parent
396763e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
subdivision.cpp
QTProject/subdivision.cpp
+11
-1
subdivision.h
QTProject/subdivision.h
+1
-0
No files found.
QTProject/subdivision.cpp
View file @
5212054f
...
...
@@ -177,7 +177,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
precomputeVertexTable
(
tables
,
input
,
modified_vertices
);
qCDebug
(
log_timing
)
<<
"precomputeVertexTable:"
<<
formatTimeMeasurement
(
subTimer
.
elapsed
());
//tables.patch_index_regular = getPatchIndexBuffer(ib, QVector<unsigned int>());//TODO pass regular and irregular index buffer?
subTimer
.
restart
();
updateIndexBuffer
(
tables
.
index_buffer
,
modified_vertices
);
qCDebug
(
log_timing
)
<<
"updateIndexBuffer:"
<<
formatTimeMeasurement
(
subTimer
.
elapsed
());
qCDebug
(
log_subdiv
)
<<
"Precompute Tables Done"
;
return
tables
;
}
...
...
@@ -380,6 +383,13 @@ void Subdivision::precomputeVertexTable(Subdivision::Tables &tables, Input &inpu
}
}
void
Subdivision
::
updateIndexBuffer
(
QVector
<
unsigned
int
>
&
index_buffer
,
QMap
<
unsigned
int
,
unsigned
int
>
map
)
{
for
(
int
i
=
0
;
i
<
index_buffer
.
length
();
i
++
)
{
unsigned
int
old
=
index_buffer
[
i
];
index_buffer
[
i
]
=
map
.
value
(
old
,
old
);
}
}
void
Subdivision
::
splitRegular
(
Mesh
*
mesh
)
{
QTime
totalTimer
;
totalTimer
.
start
();
...
...
QTProject/subdivision.h
View file @
5212054f
...
...
@@ -58,6 +58,7 @@ private:
Tables
precomputeTables
(
Input
input
);
void
precomputeEdgeTable
(
Subdivision
::
Tables
&
tables
,
QVector
<
Triangle
>
&
triangles
,
QVector
<
Triangle
>
&
triangles_regular
,
unsigned
int
offset
);
void
precomputeVertexTable
(
Subdivision
::
Tables
&
tables
,
Input
&
input
,
QMap
<
unsigned
int
,
unsigned
int
>
&
modified_vertices
);
void
updateIndexBuffer
(
QVector
<
unsigned
int
>
&
index_buffer
,
QMap
<
unsigned
int
,
unsigned
int
>
map
);
void
findRegular
(
QVector
<
unsigned
int
>
index_buffer
,
QVector
<
Vertex
>
vertex_buffer
,
QVector
<
unsigned
int
>
&
regular
,
QVector
<
unsigned
int
>
&
irregular
);
Result
runShader
(
Input
input
,
Tables
&
tables
);
void
runVertexShader
(
GLuint
size
,
GLuint
vb_handle
,
GLuint
vertex_indices_handle
,
GLuint
vertex_offsets_handle
,
GLuint
output_handle
);
...
...
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