Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
acfee411
Commit
acfee411
authored
Apr 01, 2015
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'develop'
Develop See merge request !62
parents
04e48b71
065e68b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
25 deletions
+13
-25
CGoGN/src/Utils/Shaders/shaderPhong.cpp
CGoGN/src/Utils/Shaders/shaderPhong.cpp
+11
-24
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+2
-1
No files found.
CGoGN/src/Utils/Shaders/shaderPhong.cpp
View file @
acfee411
...
...
@@ -54,30 +54,17 @@ ShaderPhong::ShaderPhong(bool withClipping, bool doubleSided, bool withEyePositi
std
::
string
glxvert
(
GLSLShader
::
defines_gl
());
std
::
string
glxfrag
(
GLSLShader
::
defines_gl
());
if
(
withClipping
)
{
m_nameVS
=
"ShaderPhongClip_vs"
;
m_nameFS
=
"ShaderPhongClip_fs"
;
if
(
m_with_eyepos
)
glxvert
.
append
(
"#define WITH_EYEPOSITION"
);
glxvert
.
append
(
vertexShaderClipText
);
// Use double sided lighting if set
if
(
doubleSided
)
glxfrag
.
append
(
"#define DOUBLE_SIDED
\n
"
);
glxfrag
.
append
(
fragmentShaderClipText
);
}
else
{
m_nameVS
=
"ShaderPhong_vs"
;
m_nameFS
=
"ShaderPhong_fs"
;
if
(
m_with_eyepos
)
glxvert
.
append
(
"#define WITH_EYEPOSITION"
);
glxvert
.
append
(
vertexShaderText
);
// Use double sided lighting if set
if
(
doubleSided
)
glxfrag
.
append
(
"#define DOUBLE_SIDED
\n
"
);
glxfrag
.
append
(
fragmentShaderText
);
}
// get choose GL defines (2 or 3)
// ans compile shaders
std
::
string
glxvert
(
GLSLShader
::
defines_gl
());
if
(
m_with_eyepos
)
glxvert
.
append
(
"#define WITH_EYEPOSITION"
);
glxvert
.
append
(
vertexShaderText
);
std
::
string
glxfrag
(
GLSLShader
::
defines_gl
());
// Use double sided lighting if set
if
(
doubleSided
)
glxfrag
.
append
(
"#define DOUBLE_SIDED
\n
"
);
glxfrag
.
append
(
fragmentShaderText
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
());
...
...
SCHNApps/src/view.cpp
View file @
acfee411
...
...
@@ -13,7 +13,7 @@
#include <QKeyEvent>
#include <QMouseEvent>
#include <QWheelEvent>
#include <Q
MessageBox
>
#include <Q
Window
>
namespace
CGoGN
{
...
...
@@ -337,6 +337,7 @@ void View::init()
m_buttonArea
=
new
ViewButtonArea
(
this
);
m_buttonArea
->
setTopRightPosition
(
this
->
width
(),
0
);
std
::
cout
<<
this
->
width
()
<<
std
::
endl
;
m_VsplitButton
=
new
ViewButton
(
":icons/icons/Vsplit.png"
,
this
);
m_buttonArea
->
addButton
(
m_VsplitButton
);
connect
(
m_VsplitButton
,
SIGNAL
(
clicked
(
int
,
int
,
int
,
int
)),
this
,
SLOT
(
ui_verticalSplitView
(
int
,
int
,
int
,
int
)));
...
...
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