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
09a808ae
Commit
09a808ae
authored
Jun 27, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename edge compute shader
parent
817044b4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
resources.qrc
QTProject/resources.qrc
+1
-1
subdivision-edge.compute
QTProject/subdivision-edge.compute
+0
-0
subdivision.cpp
QTProject/subdivision.cpp
+6
-6
subdivision.h
QTProject/subdivision.h
+2
-2
No files found.
QTProject/resources.qrc
View file @
09a808ae
...
...
@@ -5,6 +5,6 @@
<file>subdivide.tcs</file>
<file>subdivide.tes</file>
<file>subdivide.vert</file>
<file>subdivision.compute</file>
<file>subdivision
-edge
.compute</file>
</qresource>
</RCC>
QTProject/subdivision.compute
→
QTProject/subdivision
-edge
.compute
View file @
09a808ae
File moved
QTProject/subdivision.cpp
View file @
09a808ae
...
...
@@ -7,11 +7,11 @@ Subdivision::Subdivision(QOpenGLFunctions_4_3_Core *f)
Subdivision
::~
Subdivision
()
{
delete
s
hader
;
delete
edgeS
hader
;
}
void
Subdivision
::
init
()
{
shader
=
init
ComputeShaderProgram
();
edgeShader
=
initEdge
ComputeShaderProgram
();
}
QVector
<
unsigned
int
>
Subdivision
::
fillVector
(
unsigned
int
a
,
unsigned
int
b
,
unsigned
int
c
,
unsigned
int
d
){
...
...
@@ -23,8 +23,8 @@ QVector<unsigned int> Subdivision::fillVector(unsigned int a, unsigned int b, un
return
x
;
}
QOpenGLShaderProgram
*
Subdivision
::
initComputeShaderProgram
(){
QString
source
=
QLatin1String
(
":/subdivision.compute"
);
QOpenGLShaderProgram
*
Subdivision
::
init
Edge
ComputeShaderProgram
(){
QString
source
=
QLatin1String
(
":/subdivision
-edge
.compute"
);
qDebug
()
<<
"Compiling compute shader ..."
;
QOpenGLShader
*
computeShader
=
new
QOpenGLShader
(
QOpenGLShader
::
Compute
);
...
...
@@ -282,7 +282,7 @@ void Subdivision::runShader(Mesh *mesh, QVector<QVector<unsigned int> > &edgeInd
GLuint
vb_handle
=
firstMeshEntry
->
VB_handle
;
QVector
<
Vertex
>
vb
=
firstMeshEntry
->
getVertexBuffer
();
s
hader
->
bind
();
edgeS
hader
->
bind
();
f
->
glBindBufferBase
(
GL_SHADER_STORAGE_BUFFER
,
0
,
vb_handle
);
GLuint
*
edgeIDs
=
new
GLuint
[
edgeIndices
.
size
()
*
4
];
...
...
@@ -329,5 +329,5 @@ void Subdivision::runShader(Mesh *mesh, QVector<QVector<unsigned int> > &edgeInd
f
->
glDeleteBuffers
(
1
,
&
indicesID
);
f
->
glDeleteBuffers
(
1
,
&
bufferID
);
s
hader
->
release
();
edgeS
hader
->
release
();
}
QTProject/subdivision.h
View file @
09a808ae
...
...
@@ -17,9 +17,9 @@ public:
private
:
QOpenGLFunctions_4_3_Core
*
f
;
QOpenGLShaderProgram
*
s
hader
;
QOpenGLShaderProgram
*
edgeS
hader
;
QOpenGLShaderProgram
*
initComputeShaderProgram
();
QOpenGLShaderProgram
*
init
Edge
ComputeShaderProgram
();
void
precomputeTables
(
Mesh
*
mesh
,
QVector
<
QVector
<
unsigned
int
>
>
&
edgeIndices_base
);
void
runShader
(
Mesh
*
mesh
,
QVector
<
QVector
<
unsigned
int
>
>
&
edgeIndices
);
...
...
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