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
f7c76418
Commit
f7c76418
authored
Sep 22, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add copy shader
parent
3a31ac92
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletion
+28
-1
resources.qrc
QTProject/resources.qrc
+1
-0
subdivision-copy.compute
QTProject/subdivision-copy.compute
+21
-0
subdivision.cpp
QTProject/subdivision.cpp
+5
-1
subdivision.h
QTProject/subdivision.h
+1
-0
No files found.
QTProject/resources.qrc
View file @
f7c76418
...
...
@@ -5,6 +5,7 @@
<file>subdivide.tcs</file>
<file>subdivide.tes</file>
<file>subdivide.vert</file>
<file>subdivision-copy.compute</file>
<file>subdivision-edge.compute</file>
<file>subdivision-vertex.compute</file>
<file>subdivideRegular.tcs</file>
...
...
QTProject/subdivision-copy.compute
0 → 100644
View file @
f7c76418
#version 430 core
layout (local_size_x = 1) in;
struct Vertex {
vec3 pos;
vec3 norm;
vec2 uv;
};
layout(std430, binding=0) readonly buffer Input {
Vertex vertices_in[];
};
layout(std430, binding=1) writeonly buffer Output {
Vertex vertices_out[];
};
void main(){
vertices_out[gl_GlobalInvocationID.x] = vertices_in[gl_GlobalInvocationID.x];
}
QTProject/subdivision.cpp
View file @
f7c76418
...
...
@@ -10,6 +10,7 @@ Subdivision::Subdivision(QOpenGLFunctions_4_3_Core *f)
Subdivision
::~
Subdivision
()
{
delete
copyShader
;
delete
edgeShader
;
delete
vertexShader
;
}
...
...
@@ -21,7 +22,10 @@ QString Subdivision::formatTimeMeasurement(int time){
}
void
Subdivision
::
init
()
{
QString
source
=
QLatin1String
(
":/subdivision-edge.compute"
);
QString
source
=
QLatin1String
(
":/subdivision-copy.compute"
);
copyShader
=
initComputeShaderProgram
(
source
);
source
=
QLatin1String
(
":/subdivision-edge.compute"
);
edgeShader
=
initComputeShaderProgram
(
source
);
source
=
QLatin1String
(
":/subdivision-vertex.compute"
);
...
...
QTProject/subdivision.h
View file @
f7c76418
...
...
@@ -51,6 +51,7 @@ private:
QString
formatTimeMeasurement
(
int
time
);
QOpenGLFunctions_4_3_Core
*
f
;
QOpenGLShaderProgram
*
copyShader
;
QOpenGLShaderProgram
*
edgeShader
;
QOpenGLShaderProgram
*
vertexShader
;
...
...
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