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
72c43a22
Commit
72c43a22
authored
Sep 23, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write new vertices at the end of the buffer
parent
42afcc51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
subdivision.cpp
QTProject/subdivision.cpp
+3
-2
No files found.
QTProject/subdivision.cpp
View file @
72c43a22
...
@@ -317,13 +317,14 @@ void Subdivision::precomputeVertexTable(Subdivision::Tables &tables, Input &inpu
...
@@ -317,13 +317,14 @@ void Subdivision::precomputeVertexTable(Subdivision::Tables &tables, Input &inpu
QVector
<
QVector
<
unsigned
int
>
>
duplicates
;
//for debugging
QVector
<
QVector
<
unsigned
int
>
>
duplicates
;
//for debugging
QVector
<
unsigned
int
>
ib_combined
=
input
.
index_irregular_buffer
+
input
.
index_regular_buffer
;
QVector
<
unsigned
int
>
ib_combined
=
input
.
index_irregular_buffer
+
input
.
index_regular_buffer
;
unsigned
int
offset
=
0
;
unsigned
int
offset
=
0
;
unsigned
int
output_offset
=
input
.
vertex_buffer
.
size
()
+
tables
.
edge_indices
.
size
()
/
4
;
for
(
int
i
=
0
;
i
<
input
.
vertex_buffer
.
length
();
i
++
){
for
(
int
i
=
0
;
i
<
input
.
vertex_buffer
.
length
();
i
++
){
//hat evtl viel redundanz
//hat evtl viel redundanz
QVector
<
Vertex
>
adj_v
;
//helfer
QVector
<
Vertex
>
adj_v
;
//helfer
tables
.
vertex_offsets
.
push_back
(
offset
);
tables
.
vertex_offsets
.
push_back
(
offset
);
tables
.
vertex_indices
.
push_back
(
i
);
tables
.
vertex_indices
.
push_back
(
i
);
modified_vertices
.
insert
(
i
,
i
);
modified_vertices
.
insert
(
i
,
output_offset
+
i
);
offset
++
;
offset
++
;
Vertex
originalVertex
=
input
.
vertex_buffer
[
i
];
Vertex
originalVertex
=
input
.
vertex_buffer
[
i
];
...
@@ -745,7 +746,7 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
...
@@ -745,7 +746,7 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
runEdgeShader
(
tables
.
edge_indices
.
size
()
/
4
,
input
.
vb_handle
,
edge_indices_handle
,
output_handle
,
edge_offset
);
runEdgeShader
(
tables
.
edge_indices
.
size
()
/
4
,
input
.
vb_handle
,
edge_indices_handle
,
output_handle
,
edge_offset
);
int
edgeTime
=
timer
.
elapsed
();
int
edgeTime
=
timer
.
elapsed
();
timer
.
restart
();
timer
.
restart
();
int
vertex_offset
=
0
;
int
vertex_offset
=
edge_offset
+
tables
.
edge_indices
.
size
()
/
4
;
runVertexShader
(
input
.
vertex_buffer
.
size
(),
input
.
vb_handle
,
vertex_indices_handle
,
vertex_offsets_handle
,
output_handle
,
vertex_offset
);
runVertexShader
(
input
.
vertex_buffer
.
size
(),
input
.
vb_handle
,
vertex_indices_handle
,
vertex_offsets_handle
,
output_handle
,
vertex_offset
);
int
vertexTime
=
timer
.
elapsed
();
int
vertexTime
=
timer
.
elapsed
();
...
...
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