Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Cazier
CGoGN
Commits
788c7b14
Commit
788c7b14
authored
Mar 09, 2015
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'cgogn/develop' into develop
parents
6d6accaa
880aec67
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
60 additions
and
83 deletions
+60
-83
Apps/SandBox/wallPaper.cpp
Apps/SandBox/wallPaper.cpp
+2
-0
CGoGN/include/Algo/Histogram/qthistodraw.h
CGoGN/include/Algo/Histogram/qthistodraw.h
+0
-0
CGoGN/include/Utils/Qt/qtQGLV_glw.h
CGoGN/include/Utils/Qt/qtQGLV_glw.h
+1
-1
CGoGN/include/Utils/Shaders/shaderCustomTex.frag
CGoGN/include/Utils/Shaders/shaderCustomTex.frag
+2
-2
CGoGN/include/Utils/Shaders/shaderPhongTexture.frag
CGoGN/include/Utils/Shaders/shaderPhongTexture.frag
+2
-2
CGoGN/include/Utils/Shaders/shaderSimpleTexture.frag
CGoGN/include/Utils/Shaders/shaderSimpleTexture.frag
+2
-2
CGoGN/include/Utils/Shaders/shaderTextureDepth.frag
CGoGN/include/Utils/Shaders/shaderTextureDepth.frag
+3
-3
CGoGN/include/Utils/Shaders/shaderTextureMask.frag
CGoGN/include/Utils/Shaders/shaderTextureMask.frag
+2
-2
CGoGN/include/Utils/Shaders/shaderWallPaper.frag
CGoGN/include/Utils/Shaders/shaderWallPaper.frag
+1
-1
CGoGN/include/Utils/text3d.frag
CGoGN/include/Utils/text3d.frag
+1
-1
CGoGN/src/Algo/Histogram/qthistodraw.cpp
CGoGN/src/Algo/Histogram/qthistodraw.cpp
+0
-0
CGoGN/src/Utils/GLSLShader.cpp
CGoGN/src/Utils/GLSLShader.cpp
+6
-3
CGoGN/src/Utils/Qt/qtQGLV.cpp
CGoGN/src/Utils/Qt/qtQGLV.cpp
+8
-11
CGoGN/src/Utils/Qt/qtQGLV_glw.cpp
CGoGN/src/Utils/Qt/qtQGLV_glw.cpp
+2
-2
CGoGN/src/Utils/Qt/qtSimple.cpp
CGoGN/src/Utils/Qt/qtSimple.cpp
+6
-10
CMakeLists.txt
CMakeLists.txt
+1
-1
SCHNApps/include/view.h
SCHNApps/include/view.h
+2
-2
SCHNApps/src/schnapps.cpp
SCHNApps/src/schnapps.cpp
+10
-27
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+6
-10
ThirdParty/PythonQt/CMakeLists.txt
ThirdParty/PythonQt/CMakeLists.txt
+1
-1
ThirdParty/libQGLViewer/QGLViewer/qglviewer.cpp
ThirdParty/libQGLViewer/QGLViewer/qglviewer.cpp
+2
-2
No files found.
Apps/SandBox/wallPaper.cpp
View file @
788c7b14
...
@@ -77,6 +77,8 @@ void MyQT::cb_initGL()
...
@@ -77,6 +77,8 @@ void MyQT::cb_initGL()
glEnable
(
GL_TEXTURE_2D
);
glEnable
(
GL_TEXTURE_2D
);
std
::
cout
<<
Utils
::
GLSLShader
::
MAJOR_OGL_CORE
<<
" / "
<<
Utils
::
GLSLShader
::
MINOR_OGL_CORE
<<
std
::
endl
;
std
::
cout
<<
glGetString
(
GL_VERSION
)
<<
std
::
endl
;
}
}
void
MyQT
::
cb_redraw
()
void
MyQT
::
cb_redraw
()
...
...
CGoGN/include/
Utils/Qt
/qthistodraw.h
→
CGoGN/include/
Algo/Histogram
/qthistodraw.h
View file @
788c7b14
File moved
CGoGN/include/Utils/Qt/qtQGLV_glw.h
View file @
788c7b14
...
@@ -74,7 +74,7 @@ protected:
...
@@ -74,7 +74,7 @@ protected:
int
m_current_button
;
int
m_current_button
;
public:
public:
QGLView
(
SimpleQGLV
*
ptr
,
QGLFormat
&
format
,
QWidget
*
parent
=
0
);
QGLView
(
SimpleQGLV
*
ptr
,
QWidget
*
parent
=
0
);
~
QGLView
();
~
QGLView
();
void
setObjectBB
(
float
*
bbmin
,
float
*
bbmax
);
void
setObjectBB
(
float
*
bbmin
,
float
*
bbmax
);
...
...
CGoGN/include/Utils/Shaders/shaderCustomTex.frag
View file @
788c7b14
...
@@ -8,6 +8,6 @@ uniform vec4 ambient;
...
@@ -8,6 +8,6 @@ uniform vec4 ambient;
FRAG_OUT_DEF
;
FRAG_OUT_DEF
;
void
main
()
void
main
()
{
{
gl_FragData
[
0
]
=
ambient
*
texture
2D
(
textureUnit
,
fragTexCoord
);
gl_FragData
[
0
]
=
ambient
*
TEXTURE
2D
(
textureUnit
,
fragTexCoord
);
gl_FragData
[
1
]
=
vec4
(
0
.
5
*
normalize
(
N
)
+
vec3
(
0
.
5
),
1
.
0
);
gl_FragData
[
1
]
=
vec4
(
0
.
5
*
normalize
(
N
)
+
vec3
(
0
.
5
),
1
.
0
);
}
}
CGoGN/include/Utils/Shaders/shaderPhongTexture.frag
View file @
788c7b14
...
@@ -18,7 +18,7 @@ void main()
...
@@ -18,7 +18,7 @@ void main()
vec3
L
=
normalize
(
LightDir
);
vec3
L
=
normalize
(
LightDir
);
float
lambertTerm
=
dot
(
N
,
L
);
float
lambertTerm
=
dot
(
N
,
L
);
vec4
finalColor
=
ambientCoef
*
texture
2D
(
textureUnit
,
texCoord
);
vec4
finalColor
=
ambientCoef
*
TEXTURE
2D
(
textureUnit
,
texCoord
);
#ifdef DOUBLE_SIDED
#ifdef DOUBLE_SIDED
if
(
lambertTerm
<
0
.
0
)
if
(
lambertTerm
<
0
.
0
)
...
@@ -32,7 +32,7 @@ void main()
...
@@ -32,7 +32,7 @@ void main()
vec3
E
=
normalize
(
EyeVector
);
vec3
E
=
normalize
(
EyeVector
);
vec3
R
=
reflect
(
-
L
,
N
);
vec3
R
=
reflect
(
-
L
,
N
);
float
specular
=
pow
(
max
(
dot
(
R
,
E
),
0
.
0
),
shininess
);
float
specular
=
pow
(
max
(
dot
(
R
,
E
),
0
.
0
),
shininess
);
vec3
diffuse
=
(
1
.
0
-
ambientCoef
)
*
texture
2D
(
textureUnit
,
texCoord
).
rgb
;
vec3
diffuse
=
(
1
.
0
-
ambientCoef
)
*
TEXTURE
2D
(
textureUnit
,
texCoord
).
rgb
;
finalColor
+=
vec4
(
diffuse
*
lambertTerm
,
0
.
0
)
+
materialSpecular
*
specular
;
finalColor
+=
vec4
(
diffuse
*
lambertTerm
,
0
.
0
)
+
materialSpecular
*
specular
;
}
}
FRAG_OUT
=
finalColor
;
FRAG_OUT
=
finalColor
;
...
...
CGoGN/include/Utils/Shaders/shaderSimpleTexture.frag
View file @
788c7b14
...
@@ -6,5 +6,5 @@ uniform sampler2D textureUnit;
...
@@ -6,5 +6,5 @@ uniform sampler2D textureUnit;
FRAG_OUT_DEF
;
FRAG_OUT_DEF
;
void
main
()
void
main
()
{
{
FRAG_OUT
=
texture
2D
(
textureUnit
,
texCoord
);
FRAG_OUT
=
TEXTURE
2D
(
textureUnit
,
texCoord
);
}
}
CGoGN/include/Utils/Shaders/shaderTextureDepth.frag
View file @
788c7b14
...
@@ -7,6 +7,6 @@ uniform sampler2D textureDepthUnit;
...
@@ -7,6 +7,6 @@ uniform sampler2D textureDepthUnit;
FRAG_OUT_DEF
;
FRAG_OUT_DEF
;
void
main
()
void
main
()
{
{
gl_FragDepth
=
texture
2D
(
textureDepthUnit
,
texCoord
).
r
;
gl_FragDepth
=
TEXTURE
2D
(
textureDepthUnit
,
texCoord
).
r
;
FRAG_OUT
=
texture
2D
(
textureUnit
,
texCoord
);
FRAG_OUT
=
TEXTURE
2D
(
textureUnit
,
texCoord
);
}
}
CGoGN/include/Utils/Shaders/shaderTextureMask.frag
View file @
788c7b14
...
@@ -7,8 +7,8 @@ uniform sampler2D textureUnitMask;
...
@@ -7,8 +7,8 @@ uniform sampler2D textureUnitMask;
FRAG_OUT_DEF
;
FRAG_OUT_DEF
;
void
main
()
void
main
()
{
{
float
m
=
texture
2D
(
textureUnitMask
,
texCoord
).
r
;
float
m
=
TEXTURE
2D
(
textureUnitMask
,
texCoord
).
r
;
if
(
m
<
0
.
5
)
if
(
m
<
0
.
5
)
discard
;
discard
;
FRAG_OUT
=
texture
2D
(
textureUnit
,
texCoord
)
*
m
;
FRAG_OUT
=
TEXTURE
2D
(
textureUnit
,
texCoord
)
*
m
;
}
}
CGoGN/include/Utils/Shaders/shaderWallPaper.frag
View file @
788c7b14
...
@@ -6,5 +6,5 @@ uniform sampler2D textureUnit;
...
@@ -6,5 +6,5 @@ uniform sampler2D textureUnit;
FRAG_OUT_DEF
;
FRAG_OUT_DEF
;
void
main
()
void
main
()
{
{
FRAG_OUT
=
texture
2D
(
textureUnit
,
texCoord
);
FRAG_OUT
=
TEXTURE
2D
(
textureUnit
,
texCoord
);
}
}
CGoGN/include/Utils/text3d.frag
View file @
788c7b14
...
@@ -6,5 +6,5 @@ uniform vec4 color;
...
@@ -6,5 +6,5 @@ uniform vec4 color;
FRAG_OUT_DEF
;
FRAG_OUT_DEF
;
void
main
(
void
)
void
main
(
void
)
{
{
float
lum
=
texture
2D
(
FontTexture
,
tex_coord
).
s
;;
float
lum
=
TEXTURE
2D
(
FontTexture
,
tex_coord
).
s
;;
// no } because it is added in the shader class code (with other things)
// no } because it is added in the shader class code (with other things)
CGoGN/src/
Utils/Qt
/qthistodraw.cpp
→
CGoGN/src/
Algo/Histogram
/qthistodraw.cpp
View file @
788c7b14
File moved
CGoGN/src/Utils/GLSLShader.cpp
View file @
788c7b14
...
@@ -59,7 +59,9 @@ std::string GLSLShader::DEFINES_GL2=\
...
@@ -59,7 +59,9 @@ std::string GLSLShader::DEFINES_GL2=\
"#define VARYING_FRAG varying
\n
"
"#define VARYING_FRAG varying
\n
"
"#define FRAG_OUT_DEF float pipo_FRAGDEF
\n
"
"#define FRAG_OUT_DEF float pipo_FRAGDEF
\n
"
"#define FRAG_OUT gl_FragColor
\n
"
"#define FRAG_OUT gl_FragColor
\n
"
"#define INVARIANT_POS float pipo_INVARIANT
\n
"
;
"#define INVARIANT_POS float pipo_INVARIANT
\n
"
"#define TEXTURE2D texture2D
\n
"
;
std
::
string
GLSLShader
::
DEFINES_GL3
=
\
std
::
string
GLSLShader
::
DEFINES_GL3
=
\
...
@@ -70,7 +72,8 @@ std::string GLSLShader::DEFINES_GL3=\
...
@@ -70,7 +72,8 @@ std::string GLSLShader::DEFINES_GL3=\
"#define VARYING_FRAG in
\n
"
"#define VARYING_FRAG in
\n
"
"#define FRAG_OUT_DEF out vec4 outFragColor
\n
"
"#define FRAG_OUT_DEF out vec4 outFragColor
\n
"
"#define FRAG_OUT outFragColor
\n
"
"#define FRAG_OUT outFragColor
\n
"
"#define INVARIANT_POS invariant gl_Position
\n
"
;
"#define INVARIANT_POS invariant gl_Position
\n
"
"#define TEXTURE2D texture
\n
"
;
std
::
string
*
GLSLShader
::
DEFINES_GL
=
NULL
;
std
::
string
*
GLSLShader
::
DEFINES_GL
=
NULL
;
...
@@ -98,7 +101,7 @@ GLSLShader::GLSLShader() :
...
@@ -98,7 +101,7 @@ GLSLShader::GLSLShader() :
*
m_uniMat_Normal
=
-
1
;
*
m_uniMat_Normal
=
-
1
;
if
(
DEFINES_GL
==
NULL
)
if
(
DEFINES_GL
==
NULL
)
DEFINES_GL
=
&
DEFINES_GL2
;
setCurrentOGLVersion
(
MAJOR_OGL_CORE
,
MINOR_OGL_CORE
)
;
m_nbMaxVertices
=
16
;
m_nbMaxVertices
=
16
;
...
...
CGoGN/src/Utils/Qt/qtQGLV.cpp
View file @
788c7b14
...
@@ -56,16 +56,14 @@ SimpleQGLV::SimpleQGLV() :
...
@@ -56,16 +56,14 @@ SimpleQGLV::SimpleQGLV() :
QGLFormat
format
;
QGLFormat
format
;
if
(
GLSLShader
::
CURRENT_OGL_VERSION
>=
3
)
if
(
GLSLShader
::
CURRENT_OGL_VERSION
>=
3
)
{
{
f
ormat
.
setProfile
(
QGLFormat
::
CoreProfile
)
;
QGLF
ormat
glFormat
;
f
ormat
.
setVersion
(
GLSLShader
::
MAJOR_OGL_CORE
,
GLSLShader
::
MINOR_OGL_CORE
);
glF
ormat
.
setVersion
(
Utils
::
GLSLShader
::
MAJOR_OGL_CORE
,
Utils
::
GLSLShader
::
MINOR_OGL_CORE
);
f
ormat
.
set
Depth
(
true
);
glF
ormat
.
set
Profile
(
QGLFormat
::
CoreProfile
);
// Requires >=Qt-4.8.0
f
ormat
.
set
DepthBufferSize
(
24
);
glF
ormat
.
set
SampleBuffers
(
true
);
f
ormat
.
setD
oubleBuffer
(
true
);
QGLF
ormat
::
setD
efaultFormat
(
glFormat
);
}
}
else
format
=
QGLFormat
::
defaultFormat
();
m_qglWidget
=
new
QGLView
(
this
,
format
);
m_qglWidget
=
new
QGLView
(
this
);
setCentralWidget
(
m_qglWidget
);
setCentralWidget
(
m_qglWidget
);
setWindowTitle
(
tr
(
"CGoGN"
));
setWindowTitle
(
tr
(
"CGoGN"
));
...
@@ -143,7 +141,7 @@ SimpleQGLV::SimpleQGLV(const SimpleQGLV& sqt):
...
@@ -143,7 +141,7 @@ SimpleQGLV::SimpleQGLV(const SimpleQGLV& sqt):
m_transfo_matrix
(
m_mat
.
m_matrices
[
2
])
m_transfo_matrix
(
m_mat
.
m_matrices
[
2
])
{
{
QGLFormat
format
=
sqt
.
m_qglWidget
->
format
();
QGLFormat
format
=
sqt
.
m_qglWidget
->
format
();
m_qglWidget
=
new
QGLView
(
this
,
format
);
m_qglWidget
=
new
QGLView
(
this
);
setCentralWidget
(
m_qglWidget
);
setCentralWidget
(
m_qglWidget
);
...
@@ -172,8 +170,7 @@ SimpleQGLV::~SimpleQGLV()
...
@@ -172,8 +170,7 @@ SimpleQGLV::~SimpleQGLV()
void
SimpleQGLV
::
operator
=
(
const
SimpleQGLV
&
sqt
)
void
SimpleQGLV
::
operator
=
(
const
SimpleQGLV
&
sqt
)
{
{
QGLFormat
format
=
sqt
.
m_qglWidget
->
format
();
m_qglWidget
=
new
QGLView
(
this
);
m_qglWidget
=
new
QGLView
(
this
,
format
);
setCentralWidget
(
m_qglWidget
)
;
setCentralWidget
(
m_qglWidget
)
;
...
...
CGoGN/src/Utils/Qt/qtQGLV_glw.cpp
View file @
788c7b14
...
@@ -44,8 +44,8 @@ namespace QT
...
@@ -44,8 +44,8 @@ namespace QT
{
{
QGLView
::
QGLView
(
SimpleQGLV
*
ptr
,
QGLFormat
&
format
,
QWidget
*
parent
)
:
QGLView
::
QGLView
(
SimpleQGLV
*
ptr
,
QWidget
*
parent
)
:
QGLViewer
(
format
,
parent
),
QGLViewer
(
parent
),
m_sqgl
(
ptr
),
m_state_modifier
(
0
)
m_sqgl
(
ptr
),
m_state_modifier
(
0
)
{
{
}
}
...
...
CGoGN/src/Utils/Qt/qtSimple.cpp
View file @
788c7b14
...
@@ -56,16 +56,12 @@ SimpleQT::SimpleQT() :
...
@@ -56,16 +56,12 @@ SimpleQT::SimpleQT() :
{
{
if
(
GLSLShader
::
CURRENT_OGL_VERSION
>=
3
)
if
(
GLSLShader
::
CURRENT_OGL_VERSION
>=
3
)
{
{
QGLFormat
format
;
QGLFormat
glFormat
;
format
.
setProfile
(
QGLFormat
::
CoreProfile
);
glFormat
.
setVersion
(
Utils
::
GLSLShader
::
MAJOR_OGL_CORE
,
Utils
::
GLSLShader
::
MINOR_OGL_CORE
);
format
.
setVersion
(
GLSLShader
::
MAJOR_OGL_CORE
,
GLSLShader
::
MINOR_OGL_CORE
);
glFormat
.
setProfile
(
QGLFormat
::
CoreProfile
);
// Requires >=Qt-4.8.0
format
.
setDepth
(
true
);
glFormat
.
setSampleBuffers
(
true
);
// format.setDepthBufferSize(24);
QGLFormat
::
setDefaultFormat
(
glFormat
);
format
.
setDoubleBuffer
(
true
);
m_glWidget
=
new
GLWidget
(
this
,
format
);
}
}
else
m_glWidget
=
new
GLWidget
(
this
);
m_glWidget
=
new
GLWidget
(
this
);
...
...
CMakeLists.txt
View file @
788c7b14
...
@@ -140,7 +140,7 @@ LIST(APPEND CGoGN_DEFS -DGLM_FORCE_RADIANS)
...
@@ -140,7 +140,7 @@ LIST(APPEND CGoGN_DEFS -DGLM_FORCE_RADIANS)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_ASSERT_BOOL=
${
CGoGN_ASSERT_ACTIVED
}
)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_ASSERT_BOOL=
${
CGoGN_ASSERT_ACTIVED
}
)
IF
(
CGoGN_USE_OGL_CORE_PROFILE
)
IF
(
CGoGN_USE_OGL_CORE_PROFILE
)
LIST
(
APPEND CGoGN_DEFS -DCG
o
GN_USE_OGL_CORE_PROFILE=1
)
LIST
(
APPEND CGoGN_DEFS -DCG
O
GN_USE_OGL_CORE_PROFILE=1
)
ENDIF
()
ENDIF
()
LIST
(
APPEND CGoGN_DEFS -DSHADERPATH=\"
${
CGoGN_ROOT_DIR
}
/lib/Shaders/\"
)
LIST
(
APPEND CGoGN_DEFS -DSHADERPATH=\"
${
CGoGN_ROOT_DIR
}
/lib/Shaders/\"
)
...
...
SCHNApps/include/view.h
View file @
788c7b14
...
@@ -40,8 +40,8 @@ class SCHNAPPS_API View : public QGLViewer
...
@@ -40,8 +40,8 @@ class SCHNAPPS_API View : public QGLViewer
public:
public:
static
unsigned
int
viewCount
;
static
unsigned
int
viewCount
;
View
(
const
QString
&
name
,
SCHNApps
*
s
,
QGLFormat
&
format
);
View
(
const
QString
&
name
,
SCHNApps
*
s
);
View
(
const
QString
&
name
,
SCHNApps
*
s
,
QGLFormat
&
format
,
const
QGLWidget
*
shareWidget
);
View
(
const
QString
&
name
,
SCHNApps
*
s
,
const
QGLWidget
*
shareWidget
);
~
View
();
~
View
();
const
QString
&
getName
()
const
{
return
m_name
;
}
const
QString
&
getName
()
const
{
return
m_name
;
}
...
...
SCHNApps/src/schnapps.cpp
View file @
788c7b14
...
@@ -44,12 +44,6 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
...
@@ -44,12 +44,6 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
{
{
GenericMap
::
initAllStatics
(
&
m_sp
);
GenericMap
::
initAllStatics
(
&
m_sp
);
#ifdef CGoGN_USE_OGL_CORE_PROFILE
CGoGN
::
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
3
);
#else
CGoGN
::
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
#endif
this
->
setupUi
(
this
);
this
->
setupUi
(
this
);
// create & setup control dock
// create & setup control dock
...
@@ -116,6 +110,15 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
...
@@ -116,6 +110,15 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
b_rootSplitterInitialized
=
false
;
b_rootSplitterInitialized
=
false
;
m_centralLayout
->
addWidget
(
m_rootSplitter
);
m_centralLayout
->
addWidget
(
m_rootSplitter
);
if
(
Utils
::
GLSLShader
::
CURRENT_OGL_VERSION
>=
3
)
{
QGLFormat
glFormat
;
glFormat
.
setVersion
(
Utils
::
GLSLShader
::
MAJOR_OGL_CORE
,
Utils
::
GLSLShader
::
MINOR_OGL_CORE
);
glFormat
.
setProfile
(
QGLFormat
::
CoreProfile
);
// Requires >=Qt-4.8.0
glFormat
.
setSampleBuffers
(
true
);
QGLFormat
::
setDefaultFormat
(
glFormat
);
}
m_firstView
=
addView
();
m_firstView
=
addView
();
setSelectedView
(
m_firstView
);
setSelectedView
(
m_firstView
);
m_rootSplitter
->
addWidget
(
m_firstView
);
m_rootSplitter
->
addWidget
(
m_firstView
);
...
@@ -196,27 +199,7 @@ View* SCHNApps::addView(const QString& name)
...
@@ -196,27 +199,7 @@ View* SCHNApps::addView(const QString& name)
if
(
m_views
.
contains
(
name
))
if
(
m_views
.
contains
(
name
))
return
NULL
;
return
NULL
;
QGLFormat
format
;
View
*
view
=
new
View
(
name
,
this
,
m_firstView
);
if
(
Utils
::
GLSLShader
::
CURRENT_OGL_VERSION
>=
3
)
{
format
.
setProfile
(
QGLFormat
::
CoreProfile
);
format
.
setVersion
(
Utils
::
GLSLShader
::
MAJOR_OGL_CORE
,
Utils
::
GLSLShader
::
MINOR_OGL_CORE
);
format
.
setDepth
(
true
);
format
.
setDoubleBuffer
(
true
);
format
.
setBlueBufferSize
(
8
);
std
::
cout
<<
"CORE_PROFILE GL"
<<
std
::
endl
;
}
else
{
format
=
QGLFormat
::
defaultFormat
();
std
::
cout
<<
"DEFAULT GL"
<<
std
::
endl
;
}
View
*
view
=
NULL
;
if
(
m_firstView
==
NULL
)
view
=
new
View
(
name
,
this
,
format
);
else
view
=
new
View
(
name
,
this
,
format
,
m_firstView
);
m_views
.
insert
(
name
,
view
);
m_views
.
insert
(
name
,
view
);
...
...
SCHNApps/src/view.cpp
View file @
788c7b14
...
@@ -21,9 +21,8 @@ namespace SCHNApps
...
@@ -21,9 +21,8 @@ namespace SCHNApps
{
{
unsigned
int
View
::
viewCount
=
0
;
unsigned
int
View
::
viewCount
=
0
;
View
::
View
(
const
QString
&
name
,
SCHNApps
*
s
)
:
View
::
View
(
const
QString
&
name
,
SCHNApps
*
s
,
QGLFormat
&
format
)
:
QGLViewer
(),
QGLViewer
(
format
,
NULL
,
NULL
),
b_updatingUI
(
false
),
b_updatingUI
(
false
),
m_name
(
name
),
m_name
(
name
),
m_schnapps
(
s
),
m_schnapps
(
s
),
...
@@ -83,8 +82,8 @@ View::View(const QString& name, SCHNApps* s, QGLFormat& format) :
...
@@ -83,8 +82,8 @@ View::View(const QString& name, SCHNApps* s, QGLFormat& format) :
connect
(
m_schnapps
,
SIGNAL
(
schnappsClosing
()),
this
,
SLOT
(
closeDialogs
()));
connect
(
m_schnapps
,
SIGNAL
(
schnappsClosing
()),
this
,
SLOT
(
closeDialogs
()));
}
}
View
::
View
(
const
QString
&
name
,
SCHNApps
*
s
,
QGLFormat
&
format
,
const
QGLWidget
*
shareWidget
)
:
View
::
View
(
const
QString
&
name
,
SCHNApps
*
s
,
const
QGLWidget
*
shareWidget
)
:
QGLViewer
(
format
,
NULL
,
shareWidget
),
QGLViewer
(
NULL
,
shareWidget
),
b_updatingUI
(
false
),
b_updatingUI
(
false
),
m_name
(
name
),
m_name
(
name
),
m_schnapps
(
s
),
m_schnapps
(
s
),
...
@@ -354,11 +353,8 @@ void View::init()
...
@@ -354,11 +353,8 @@ void View::init()
glewExperimental
=
GL_TRUE
;
// needed for GL Core Profile 3.3
glewExperimental
=
GL_TRUE
;
// needed for GL Core Profile 3.3
glewInit
();
glewInit
();
// int major = 0;
std
::
cout
<<
"using "
<<
glGetString
(
GL_VERSION
)
<<
std
::
endl
;
// int minor = 0;
// glGetIntegerv(GL_MAJOR_VERSION, &major);
// glGetIntegerv(GL_MINOR_VERSION, &minor);
// std::cout << this->getName().toStdString() << "is using GL "<< major <<"."<< minor << std::endl;
qglviewer
::
Camera
*
c
=
this
->
camera
();
qglviewer
::
Camera
*
c
=
this
->
camera
();
this
->
setCamera
(
m_currentCamera
);
this
->
setCamera
(
m_currentCamera
);
...
...
ThirdParty/PythonQt/CMakeLists.txt
View file @
788c7b14
...
@@ -16,7 +16,7 @@ project(PythonQt)
...
@@ -16,7 +16,7 @@ project(PythonQt)
find_package
(
PythonLibs 2.7 REQUIRED
)
find_package
(
PythonLibs 2.7 REQUIRED
)
include_directories
(
"
${
PYTHON_INCLUDE_DIR
}
"
)
include_directories
(
"
${
PYTHON_INCLUDE_DIR
}
"
)
add_definitions
(
"-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK"
)
add_definitions
(
"-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK"
)
FILE
(
WRITE
${
CGoGN_ROOT_DIR
}
/include/python_version.h
${
PYTHONLIBS_VERSION_STRING
}
)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Build options
# Build options
...
...
ThirdParty/libQGLViewer/QGLViewer/qglviewer.cpp
View file @
788c7b14
...
@@ -363,8 +363,8 @@ void QGLViewer::postDraw()
...
@@ -363,8 +363,8 @@ void QGLViewer::postDraw()
glEnable(GL_RESCALE_NORMAL);
glEnable(GL_RESCALE_NORMAL);
#endif
#endif
glDisable(GL_COLOR_MATERIAL);
//
glDisable(GL_COLOR_MATERIAL);
qglColor(foregroundColor());
//
qglColor(foregroundColor());
if (cameraIsEdited())
if (cameraIsEdited())
camera()->drawAllPaths();
camera()->drawAllPaths();
...
...
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