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
8e20b734
Commit
8e20b734
authored
Jul 07, 2016
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subdiv level in render
parent
77ce866a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
mainwidget.cpp
QTProject/mainwidget.cpp
+3
-1
mainwidget.h
QTProject/mainwidget.h
+1
-0
No files found.
QTProject/mainwidget.cpp
View file @
8e20b734
...
...
@@ -8,6 +8,7 @@ MainWidget::MainWidget(Camera *cam)
wireframe
=
false
;
rotation
=
true
;
subdivision
=
new
Subdivision
(
this
);
subdivLevel
=
0
;
}
QSize
MainWidget
::
minimumSizeHint
()
const
...
...
@@ -134,6 +135,7 @@ void MainWidget::loadNewMesh(QString path){
void
MainWidget
::
subdivide
(
int
level
){
subdivision
->
subdivide
(
mesh
);
subdivLevel
=
level
;
}
void
MainWidget
::
setdebugOutput
(
bool
output
){
...
...
@@ -211,7 +213,7 @@ void MainWidget::paintGL(){
subdevisionShader
->
setUniformValue
(
"colorTexture"
,
0
);
subdevisionShader
->
setUniformValue
(
"LightPos"
,
QVector3D
(
0
,
100
,
100
));
mesh
->
render
(
subdevisionShader
,
cam
->
getMatrix
()
*
rot
,
m_projection
);
mesh
->
render
(
subdevisionShader
,
cam
->
getMatrix
()
*
rot
,
m_projection
,
subdivLevel
);
subdevisionShader
->
release
();
update
();
...
...
QTProject/mainwidget.h
View file @
8e20b734
...
...
@@ -25,6 +25,7 @@ public:
bool
rotation
;
bool
wireframe
;
int
subdivLevel
;
public
slots
:
void
loadNewMesh
();
...
...
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