Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
6200b638
Commit
6200b638
authored
May 12, 2016
by
Jan Möbius
Browse files
Revert "Merge branch 'featureQt5.6Support' into 'master'"
This reverts merge request
!92
parent
b837756e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Core/Core.cc
View file @
6200b638
...
...
@@ -2035,7 +2035,7 @@ void Core::showReducedMenuBar(bool reduced) {
}
void
Core
::
finishSplash
()
{
splash_
->
finish
(
coreWidget_
);
splash_
->
finish
(
coreWidget_
);
}
...
...
CoreApp/CMakeLists.txt
View file @
6200b638
...
...
@@ -7,7 +7,6 @@ include_directories (
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIR
}
${
GLUT_INCLUDE_DIR
}
)
...
...
@@ -29,14 +28,8 @@ if( APPLE )
endforeach
()
link_directories
(
${
GLEW_LIBRARY_DIR
}
${
ADDITIONAL_PLUGINLIB_LINK_DIRS
}
)
else
(
APPLE
)
link_directories
(
${
GLEW_LIBRARY_DIR
}
)
endif
(
APPLE
)
if
(
WIN32
)
...
...
@@ -229,7 +222,6 @@ target_link_libraries (${OPENFLIPPER_PRODUCT_STRING}
OpenFlipperPluginLib
${
QT_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
GLEW_LIBRARY
}
${
GLUT_LIBRARIES
}
${
COREAPP_ADDITIONAL_LINK_LIBRARIES
}
${
OPENFLIPPER_STATIC_PLUGINS
}
...
...
Documentation/DeveloperHelpSources/building.docu
View file @
6200b638
...
...
@@ -11,7 +11,6 @@ OpenFlipper.
<ul>
<li> 5.5 >= Qt >= 4.8.6 ( http://www.qt.io/download/ ) Use the OpenGL version for Qt >= 5.0</li>
<li> GLUT ( http://www.opengl.org/resources/libraries/glut/ )</li>
<li> GLEW (>=1.6) ( http://glew.sourceforge.net )</li>
</ul>
\section optlibs Optional libraries ( Without these libraries some functionality might not be available)
...
...
OpenFlipper.cc
View file @
6200b638
...
...
@@ -446,13 +446,9 @@ int main(int argc, char **argv)
}
}
}
// After setting all Options from command line, build the real gui
w
->
init
();
#ifndef __APPLE__
initGlew
();
#endif
// After setting all Options from command line, build the real gui
w
->
init
();
for
(
int
i
=
0
;
i
<
args
.
FileCount
();
++
i
)
w
->
commandLineOpen
(
args
.
File
(
i
),
openPolyMeshes
);
...
...
PluginLib/CMakeLists.txt
View file @
6200b638
...
...
@@ -42,14 +42,12 @@ include_directories (
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIR
}
${
GLUT_INCLUDE_DIR
}
${
ADDITIONAL_PLUGINLIB_INCS
}
${
PACKAGE_INCLUDES
}
)
link_directories
(
${
GLEW_LIBRARY_DIR
}
${
ADDITIONAL_PLUGINLIB_LINK_DIRS
}
)
...
...
@@ -176,7 +174,6 @@ target_link_libraries (OpenFlipperPluginLib
ACG
${
QT_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
GLEW_LIBRARY
}
${
GLUT_LIBRARIES
}
${
FTGL_LIBS
}
${
ADDITIONAL_PLUGINLIB_LIBS
}
...
...
cmake/plugin.cmake
View file @
6200b638
...
...
@@ -16,7 +16,6 @@
# [TRANSLATION_ADDFILES file1 file2 ...]
# [LICENSEMANAGER])
#
# DIRS = additional directories with source files
# DEPS = required dependencies for find_package macro
# OPTDEPS = optional dependencies for find_package macro, if found, a define ENABLE_<Depname> will be added automatically
...
...
@@ -29,7 +28,6 @@
# INCDIRS = additional include directories
# ADDSRC = additional source files
# INSTALLDATA = directories that will be installed into the openflipper data directory
# GLEWDEFINITIONS = Checks glew if it defines the given definitions
#
# TRANSLATION_LANGUAGES = language codes for translation
# TRANSLATION_ADDFILES = additional files that should be included into the translation files
...
...
@@ -72,7 +70,7 @@ endmacro ()
macro
(
_get_plugin_parameters _prefix
)
set
(
_current_var _foo
)
set
(
_supported_var DIRS DEPS OPTDEPS LDFLAGSADD CFLAGSADD CDEFINITIONSADD
LIBRARIES ADD_CORE_APP_LIBRARIES LIBDIRS INCDIRS ADDSRC INSTALLDATA
GLEWDEFINITIONS
TRANSLATION_LANGUAGES TRANSLATION_ADDFILES
)
LIBRARIES ADD_CORE_APP_LIBRARIES LIBDIRS INCDIRS ADDSRC INSTALLDATA TRANSLATION_LANGUAGES TRANSLATION_ADDFILES
)
set
(
_supported_flags LICENSEMANAGER
)
foreach
(
_val
${
_supported_var
}
)
set
(
${
_prefix
}
_
${
_val
}
)
...
...
@@ -376,26 +374,6 @@ macro (_plugin_licensemanagement)
endif
()
endmacro
()
#======================================================
# check dependencies in GLEW library
# _prefix : prefix used ( usually the plugin name )
#======================================================
macro
(
_check_plugin_glew_deps _prefix
)
foreach
(
_extension
${${
_prefix
}
_GLEWDEFINITIONS
}
)
acg_test_glew_definition
(
${
_extension
}
${
_prefix
}
_GLEW_HAS_DEFINITION_
${
_extension
}
)
# If the dependency is not found, we disable the plugin
if
(
NOT
${
_prefix
}
_GLEW_HAS_DEFINITION_
${
_extension
}
)
set
(
${
_prefix
}
_HAS_DEPS FALSE
)
acg_set
(
_
${
_prefix
}
_MISSING_DEPS
"
${
_
${
_prefix
}
_MISSING_DEPS
}
GLEW extension
${
_extension
}
"
)
endif
()
endforeach
()
endmacro
()
#======================================================
...
...
@@ -438,10 +416,6 @@ function (_build_openflipper_plugin plugin)
endforeach
()
set_property
(
GLOBAL PROPERTY GLOBAL_CORE_APP_LIBRARIES
${
global_core_app_libraries
}
)
# CHECK for GLEW definitions
#============================================================================================
_check_plugin_glew_deps
(
${
_PLUGIN
}
)
#============================================================================================
# Remember Lib dirs for bundle generation
...
...
@@ -486,7 +460,6 @@ function (_build_openflipper_plugin plugin)
${${
_PLUGIN
}
_DEPS_INCDIRS
}
${${
_PLUGIN
}
_INCDIRS
}
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIR
}
${
GLUT_INCLUDE_DIR
}
${
CMAKE_BINARY_DIR
}
/OpenFlipper/PluginLib
${
PACKAGE_INCLUDES
}
...
...
common/glew_wrappers.cc
View file @
6200b638
...
...
@@ -48,19 +48,26 @@
\*===========================================================================*/
#include
"glew_wrappers.hh"
#include
<ACG/GL/gl_compat_4_4.hh>
#include
<GL/glew.h>
#include
<stdio.h>
#include
<string>
#include
<sstream>
DLLEXPORT
void
init
Glew
()
{
GLenum
err
=
gl
ewInit
();
if
(
GLEW_OK
!=
err
)
DLLEXPORT
void
init
OpenGLFunctions
()
{
int
err
or
=
o
gl
_LoadFunctions
();
if
(
error
!=
ogl_LOAD_SUCCEEDED
)
{
/* Problem:
glewInit
failed, something is seriously wrong. */
fprintf
(
stderr
,
"Error: %
s
\n
"
,
glewGetErrorString
(
err
)
);
/* Problem:
loading the opengl functions
failed, something is seriously wrong. */
fprintf
(
stderr
,
"Error
when initializing opengl functions
: %
d
\n
"
,
error
);
}
}
DLLEXPORT
const
char
*
getGlewVersion
()
{
return
(
const
char
*
)
glewGetString
(
GLEW_VERSION
);
DLLEXPORT
const
char
*
getOpenGLVersion
()
{
std
::
string
version
;
std
::
stringstream
s
;
s
<<
ogl_GetMajorVersion
()
<<
"."
<<
ogl_GetMinorVersion
();
version
=
s
.
str
();
return
version
.
c_str
()
;
}
common/glew_wrappers.hh
View file @
6200b638
...
...
@@ -52,7 +52,7 @@
#include
<OpenFlipper/common/GlobalDefines.hh>
DLLEXPORT
void
init
Glew
();
DLLEXPORT
const
char
*
get
Glew
Version
();
DLLEXPORT
void
init
OpenGLFunctions
();
DLLEXPORT
const
char
*
get
OpenGL
Version
();
#endif
/* GLEW_WRAPPERS_HH_ */
widgets/coreWidget/About.cc
View file @
6200b638
...
...
@@ -60,6 +60,7 @@
//== INCLUDES =================================================================
#include
<common/glew_wrappers.hh>
#include
"CoreWidget.hh"
#include
<OpenFlipper/common/FileTypes.hh>
...
...
@@ -592,11 +593,12 @@ void CoreWidget::showAboutWidget( ) {
#ifndef __APPLE__
aboutWidget_
->
OpenFlipperAbout
->
append
(
"
\n
"
);
aboutWidget_
->
OpenFlipperAbout
->
setCurrentFont
(
boldFont
);
aboutWidget_
->
OpenFlipperAbout
->
append
(
tr
(
"GL
EW
Specific Info:"
));
aboutWidget_
->
OpenFlipperAbout
->
append
(
tr
(
"
Open
GL Specific Info:"
));
aboutWidget_
->
OpenFlipperAbout
->
setCurrentFont
(
standardFont
);
QString
glewVersion
=
QString
(
getGlewVersion
());
aboutWidget_
->
OpenFlipperAbout
->
append
(
tr
(
"GLEW Version:
\t
"
)
+
glewVersion
);
//TODO: rename this we are not using glew anymore
QString
glewVersion
=
QString
(
getOpenGLVersion
());
aboutWidget_
->
OpenFlipperAbout
->
append
(
tr
(
"OpenGL Version:
\t
"
)
+
glewVersion
);
#endif
// =====================================================================================
...
...
widgets/coreWidget/CoreWidget.cc
View file @
6200b638
...
...
@@ -72,6 +72,7 @@
// -------------------- Qt event Includes
#include
<QGLFormat>
#include
"common/glew_wrappers.hh"
#define WIDGET_HEIGHT 800
#define WIDGET_WIDTH 800
...
...
@@ -249,6 +250,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
#endif
glWidget_
=
new
QGLWidget
(
format
,
0
);
glWidget_
->
makeCurrent
();
PluginFunctions
::
shareGLWidget
(
glWidget_
);
glView_
=
new
QtGLGraphicsView
(
stackedWidget_
);
...
...
@@ -317,6 +319,8 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
// Create examiner
// ======================================================================
initOpenGLFunctions
();
// First we analyze the scenegraph
unsigned
int
maxPases
=
1
;
ACG
::
Vec3d
bbmin
,
bbmax
;
...
...
widgets/coreWidget/CoreWidget.hh
View file @
6200b638
...
...
@@ -67,6 +67,7 @@
#include
<set>
#include
"OpenFlipper/common/Types.hh"
#include
<OpenFlipper/common/GlobalOptions.hh>
#include
<OpenFlipper/BasePlugin/ContextMenuInterface.hh>
...
...
widgets/glWidget/QtGLGraphicsScene.cc
View file @
6200b638
...
...
@@ -110,9 +110,11 @@ void QtGLGraphicsScene::drawBackground(QPainter *_painter, const QRectF &_rect)
static
bool
initialized
=
false
;
if
(
!
initialized
)
{
// we use
GLEW
to manage extensions
// we use
glLoadGen
to manage extensions
:/
// initialize it first
glewInit
();
#ifndef __APPLE__
ogl_LoadFunctions
();
//maybe replace this with a call to the wrapper function. initOpenGLFunctions()
#endif
for
(
unsigned
int
i
=
0
;
i
<
views_
->
size
();
i
++
)
{
views_
->
at
(
i
)
->
initializeGL
();
...
...
widgets/glWidget/simpleGLGraphicsScene.cc
View file @
6200b638
...
...
@@ -114,10 +114,10 @@ void SimpleGLGraphicsScene::drawBackground(QPainter *_painter, const QRectF &_re
if
(
!
initialized_
)
{
// we use
GLEW
to manage extensions
// we use
glLoadGen
to manage extensions
// initialize it first
#ifndef __APPLE__
gl
ewInit
();
o
gl
_LoadFunctions
();
#endif
view_
->
initializeGL
();
cursorPainter_
->
initializeGL
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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