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
f4a2cb8f
Commit
f4a2cb8f
authored
Aug 25, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add subdiv.trace logging category
To be used for long lists that aren't interesting most of the time.
parent
1cf5a9f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
logcategories.cpp
QTProject/logcategories.cpp
+1
-0
logcategories.h
QTProject/logcategories.h
+1
-0
subdivision.cpp
QTProject/subdivision.cpp
+12
-11
No files found.
QTProject/logcategories.cpp
View file @
f4a2cb8f
#include "logcategories.h"
#include "logcategories.h"
Q_LOGGING_CATEGORY
(
log_subdiv
,
"subdiv"
)
Q_LOGGING_CATEGORY
(
log_subdiv
,
"subdiv"
)
Q_LOGGING_CATEGORY
(
log_subdiv_trace
,
"subdiv.trace"
)
Q_LOGGING_CATEGORY
(
log_mesh
,
"mesh"
)
Q_LOGGING_CATEGORY
(
log_mesh
,
"mesh"
)
QTProject/logcategories.h
View file @
f4a2cb8f
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include <QLoggingCategory>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY
(
log_subdiv
)
Q_DECLARE_LOGGING_CATEGORY
(
log_subdiv
)
Q_DECLARE_LOGGING_CATEGORY
(
log_subdiv_trace
)
Q_DECLARE_LOGGING_CATEGORY
(
log_mesh
)
Q_DECLARE_LOGGING_CATEGORY
(
log_mesh
)
#endif
#endif
QTProject/subdivision.cpp
View file @
f4a2cb8f
...
@@ -139,10 +139,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
...
@@ -139,10 +139,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
Tables
tables
;
Tables
tables
;
QVector
<
unsigned
int
>
ib
=
input
.
index_buffer
;
QVector
<
unsigned
int
>
ib
=
input
.
index_buffer
;
qCDebug
(
log_subdiv
)
<<
"Index Buffer: "
<<
ib
;
qCDebug
(
log_subdiv
_trace
)
<<
"Index Buffer: "
<<
ib
;
QVector
<
Vertex
>
vb
=
input
.
vertex_buffer
;
QVector
<
Vertex
>
vb
=
input
.
vertex_buffer
;
qCDebug
(
log_subdiv
)
<<
"Vertex Buffer: "
<<
vb
;
qCDebug
(
log_subdiv
_trace
)
<<
"Vertex Buffer: "
<<
vb
;
QVector
<
Triangle
>
triangles
;
QVector
<
Triangle
>
triangles
;
for
(
int
i
=
0
;
i
<
ib
.
length
();
i
+=
3
)
{
for
(
int
i
=
0
;
i
<
ib
.
length
();
i
+=
3
)
{
...
@@ -256,10 +256,12 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
...
@@ -256,10 +256,12 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
}
}
qCDebug
(
log_subdiv
)
<<
"Done with edge table. "
<<
tables
.
edge_indices
.
length
();
qCDebug
(
log_subdiv
)
<<
"Done with edge table. "
<<
tables
.
edge_indices
.
length
();
qCDebug
(
log_subdiv
)
<<
"Eedges found. Table: "
<<
tables
.
edge_indices
;
if
(
log_subdiv_trace
().
isDebugEnabled
())
{
qCDebug
(
log_subdiv
)
<<
"Table (long version):"
;
qCDebug
(
log_subdiv
)
<<
"Eedges found. Table: "
<<
tables
.
edge_indices
;
for
(
int
i
=
0
;
i
<
tables
.
edge_indices
.
length
();
i
++
){
qCDebug
(
log_subdiv
)
<<
"Table (long version):"
;
qCDebug
(
log_subdiv
)
<<
"blub:"
<<
tables
.
edge_indices
[
i
];
for
(
int
i
=
0
;
i
<
tables
.
edge_indices
.
length
();
i
++
){
qCDebug
(
log_subdiv
)
<<
"blub:"
<<
tables
.
edge_indices
[
i
];
}
}
}
//compute vertex table
//compute vertex table
...
@@ -581,15 +583,14 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
...
@@ -581,15 +583,14 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
Vertex
*
ptr
;
Vertex
*
ptr
;
ptr
=
(
Vertex
*
)
f
->
glMapBuffer
(
GL_SHADER_STORAGE_BUFFER
,
GL_WRITE_ONLY
);
ptr
=
(
Vertex
*
)
f
->
glMapBuffer
(
GL_SHADER_STORAGE_BUFFER
,
GL_WRITE_ONLY
);
qCDebug
(
log_subdiv
)
<<
"New vertices:"
;
qCDebug
(
log_subdiv_trace
)
<<
"New vertices:"
;
for
(
int
i
=
0
;
i
<
input
.
vertex_buffer
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
input
.
vertex_buffer
.
size
();
i
++
)
{
qCDebug
(
log_subdiv
)
<<
ptr
[
i
].
pos
;
qCDebug
(
log_subdiv
_trace
)
<<
ptr
[
i
].
pos
;
result
.
vertex_buffer
.
push_back
(
ptr
[
i
]);
result
.
vertex_buffer
.
push_back
(
ptr
[
i
]);
}
}
qCDebug
(
log_subdiv
)
<<
"New edge points:"
;
qCDebug
(
log_subdiv
_trace
)
<<
"New edge points:"
;
for
(
int
i
=
0
;
i
<
tables
.
edge_indices
.
size
()
/
4
;
i
++
)
{
for
(
int
i
=
0
;
i
<
tables
.
edge_indices
.
size
()
/
4
;
i
++
)
{
qCDebug
(
log_subdiv
)
<<
ptr
[
edgeOffset
+
i
].
pos
;
qCDebug
(
log_subdiv
_trace
)
<<
ptr
[
edgeOffset
+
i
].
pos
;
result
.
vertex_buffer
.
push_back
(
ptr
[
edgeOffset
+
i
]);
result
.
vertex_buffer
.
push_back
(
ptr
[
edgeOffset
+
i
]);
}
}
...
...
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