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
3368c442
Commit
3368c442
authored
Aug 25, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove debugOutput variable
parent
d737b96a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
25 deletions
+0
-25
mainwidget.cpp
QTProject/mainwidget.cpp
+0
-6
mainwidget.h
QTProject/mainwidget.h
+0
-1
subdivision.cpp
QTProject/subdivision.cpp
+0
-15
subdivision.h
QTProject/subdivision.h
+0
-3
No files found.
QTProject/mainwidget.cpp
View file @
3368c442
...
...
@@ -158,12 +158,6 @@ void MainWidget::subdivide(int level){
}
void
MainWidget
::
setdebugOutput
(
bool
output
){
subdivision
->
setDebugOutbut
(
output
);
}
void
MainWidget
::
setRotation
(
bool
started
){
qDebug
()
<<
"rotation"
<<
started
;
this
->
rotation
=
started
;
...
...
QTProject/mainwidget.h
View file @
3368c442
...
...
@@ -35,7 +35,6 @@ public slots:
void
setRotation
(
bool
started
);
void
setWireframe
(
bool
active
);
void
subdivide
(
int
level
);
void
setdebugOutput
(
bool
output
);
protected
:
void
initializeGL
();
...
...
QTProject/subdivision.cpp
View file @
3368c442
...
...
@@ -7,7 +7,6 @@
Subdivision
::
Subdivision
(
QOpenGLFunctions_4_3_Core
*
f
)
{
this
->
f
=
f
;
debugOutput
=
false
;
}
Subdivision
::~
Subdivision
()
...
...
@@ -15,10 +14,6 @@ Subdivision::~Subdivision()
delete
edgeShader
;
}
void
Subdivision
::
setDebugOutbut
(
bool
debug
){
this
->
debugOutput
=
debug
;
}
void
Subdivision
::
init
()
{
QString
source
=
QLatin1String
(
":/subdivision-edge.compute"
);
edgeShader
=
initComputeShaderProgram
(
source
);
...
...
@@ -144,11 +139,9 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
Tables
tables
;
QVector
<
unsigned
int
>
ib
=
input
.
index_buffer
;
if
(
debugOutput
)
qCDebug
(
log_subdiv
)
<<
"Index Buffer: "
<<
ib
;
QVector
<
Vertex
>
vb
=
input
.
vertex_buffer
;
if
(
debugOutput
)
qCDebug
(
log_subdiv
)
<<
"Vertex Buffer: "
<<
vb
;
QVector
<
Triangle
>
triangles
;
...
...
@@ -263,13 +256,11 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
}
qCDebug
(
log_subdiv
)
<<
"Done with edge table. "
<<
tables
.
edge_indices
.
length
();
if
(
debugOutput
){
qCDebug
(
log_subdiv
)
<<
"Eedges found. Table: "
<<
tables
.
edge_indices
;
qCDebug
(
log_subdiv
)
<<
"Table (long version):"
;
for
(
int
i
=
0
;
i
<
tables
.
edge_indices
.
length
();
i
++
){
qCDebug
(
log_subdiv
)
<<
"blub:"
<<
tables
.
edge_indices
[
i
];
}
}
//compute vertex table
//Format: First entry: original vertex. Other entries: adjacent vertices.
...
...
@@ -336,12 +327,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
tables
.
vertex_offsets
.
push_back
(
offset
);
qCDebug
(
log_subdiv
)
<<
"Done with vertex index table. "
;
if
(
debugOutput
){
qCDebug
(
log_subdiv
)
<<
"Duplicates: "
;
for
(
int
i
=
0
;
i
<
duplicates
.
length
();
i
++
){
qCDebug
(
log_subdiv
)
<<
duplicates
[
i
];
}
}
tables
.
index_regular
=
getPatchIndexBuffer
(
ib
);
qInfo
()
<<
"Precompute Tables Done"
;
return
tables
;
...
...
@@ -592,18 +581,14 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
Vertex
*
ptr
;
ptr
=
(
Vertex
*
)
f
->
glMapBuffer
(
GL_SHADER_STORAGE_BUFFER
,
GL_WRITE_ONLY
);
if
(
debugOutput
)
qCDebug
(
log_subdiv
)
<<
"New vertices:"
;
for
(
int
i
=
0
;
i
<
input
.
vertex_buffer
.
size
();
i
++
)
{
if
(
debugOutput
)
qCDebug
(
log_subdiv
)
<<
ptr
[
i
].
pos
;
result
.
vertex_buffer
.
push_back
(
ptr
[
i
]);
}
if
(
debugOutput
)
qCDebug
(
log_subdiv
)
<<
"New edge points:"
;
for
(
int
i
=
0
;
i
<
tables
.
edge_indices
.
size
()
/
4
;
i
++
)
{
if
(
debugOutput
)
qCDebug
(
log_subdiv
)
<<
ptr
[
edgeOffset
+
i
].
pos
;
result
.
vertex_buffer
.
push_back
(
ptr
[
edgeOffset
+
i
]);
}
...
...
QTProject/subdivision.h
View file @
3368c442
...
...
@@ -16,11 +16,8 @@ public:
void
init
();
void
splitRegular
(
Mesh
*
mesh
);
void
subdivide
(
Mesh
*
mesh
,
int
level
);
void
setDebugOutbut
(
bool
debug
);
private
:
bool
debugOutput
;
struct
Input
{
GLuint
vb_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