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
9b2e2969
Commit
9b2e2969
authored
Sep 27, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add extra vertex buffer to Result
parent
4ae392f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
subdivision.cpp
QTProject/subdivision.cpp
+7
-1
subdivision.h
QTProject/subdivision.h
+2
-0
No files found.
QTProject/subdivision.cpp
View file @
9b2e2969
...
...
@@ -109,11 +109,13 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
QVector
<
unsigned
int
>
irregular_ib
;
trianglesToIB
(
irregular
,
irregular_ib
);
updateIrregularForDraw
(
irregular
,
neighbors
,
result
);
QVector
<
unsigned
int
>
patches
;
getPatchIndexBuffer
(
regular
,
neighbors
,
patches
);
qCDebug
(
log_subdiv
)
<<
"patches"
<<
patches
.
length
();
current_mesh
->
update
(
result
.
vb_handle
,
result
.
vertex_buffer
,
result
.
vertex_buffer
,
irregular_ib
,
patches
);
current_mesh
->
update
(
result
.
vb_handle
,
result
.
vertex_buffer
,
result
.
vertex_buffer
_irregular
,
irregular_ib
,
patches
);
}
}
...
...
@@ -1037,3 +1039,7 @@ void Subdivision::runEdgeShader(GLuint size, GLuint vb_handle, GLuint edge_indic
edgeShader
->
release
();
}
void
Subdivision
::
updateIrregularForDraw
(
const
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
Result
&
result
){
result
.
vertex_buffer_irregular
=
result
.
vertex_buffer
;
}
QTProject/subdivision.h
View file @
9b2e2969
...
...
@@ -41,6 +41,7 @@ private:
{
GLuint
vb_handle
;
QVector
<
Vertex
>
vertex_buffer
;
QVector
<
Vertex
>
vertex_buffer_irregular
;
};
struct
Patch
...
...
@@ -69,6 +70,7 @@ private:
void
runCopyShader
(
GLuint
size
,
GLuint
vb_in
,
GLuint
vb_out
);
void
runVertexShader
(
GLuint
size
,
GLuint
vb_handle
,
GLuint
vertex_indices_handle
,
GLuint
vertex_offsets_handle
,
GLuint
output_handle
,
GLuint
offset_handle
);
void
runEdgeShader
(
GLuint
size
,
GLuint
vb_handle
,
GLuint
edge_indices_handle
,
GLuint
output_handle
,
GLuint
offset_handle
);
void
updateIrregularForDraw
(
const
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
Result
&
result
);
QVector
<
unsigned
int
>
patchIBToTriangleIB
(
QVector
<
unsigned
int
>
ib
);
...
...
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