mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
* opencasecade: disabled FFmpeg * simplify qt path, backport a build fix for freetype --------- Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>
592 lines
21 KiB
Plaintext
592 lines
21 KiB
Plaintext
From 9ca314ae6c4cb7e625d404388229daab31115f37 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 18 Dec 2022 20:25:23 +0100
|
|
Subject: Haiku support
|
|
|
|
|
|
diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake
|
|
index bee8ba7..55e78b2 100644
|
|
--- a/adm/cmake/occt_csf.cmake
|
|
+++ b/adm/cmake/occt_csf.cmake
|
|
@@ -133,6 +133,18 @@ else()
|
|
set (CSF_ThreadLibs "c")
|
|
set (CSF_OpenGlesLibs "EGL GLESv2")
|
|
set (CSF_androidlog "log")
|
|
+ elseif (HAIKU)
|
|
+ set (CSF_psapi "execinfo") # Workaround for linking libexecinfo for Stacktrace support
|
|
+ set (CSF_wsock32 "network")
|
|
+ if (USE_OPENGL)
|
|
+ set (CSF_OpenGlLibs "GL EGL")
|
|
+ endif()
|
|
+ if (USE_XLIB)
|
|
+ set (CSF_XwLibs "X11")
|
|
+ endif()
|
|
+ if (USE_FREETYPE)
|
|
+ set (CSF_fontconfig "fontconfig")
|
|
+ endif()
|
|
elseif (UNIX)
|
|
set (CSF_ThreadLibs "pthread rt stdc++")
|
|
if (USE_XLIB)
|
|
diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in
|
|
index e391ddf..6dc2e77 100644
|
|
--- a/adm/templates/OpenCASCADEConfig.cmake.in
|
|
+++ b/adm/templates/OpenCASCADEConfig.cmake.in
|
|
@@ -20,16 +20,23 @@ set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
|
|
# location, by going up one level + one level if "cmake" + one level if "lib".
|
|
# This is made to support different locations of CMake files:
|
|
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
|
|
+# - in Haiku style: $INSTALL_DIR/develop/lib$secondaryArchSubdir/cmake/opencascade
|
|
# - in Windows style: $INSTALL_DIR/cmake
|
|
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
|
|
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
|
|
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
+ if (HAIKU) # for secondaryArch support
|
|
+ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
+ endif()
|
|
endif()
|
|
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
|
|
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
endif()
|
|
+if (OpenCASCADE_INSTALL_PREFIX MATCHES "/develop$")
|
|
+ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
+endif()
|
|
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")
|
|
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
|
diff --git a/adm/templates/env.build.sh.in b/adm/templates/env.build.sh.in
|
|
index 3026d4c..888440c 100644
|
|
--- a/adm/templates/env.build.sh.in
|
|
+++ b/adm/templates/env.build.sh.in
|
|
@@ -31,6 +31,8 @@ aSystem=`uname -s`
|
|
if [ "$aSystem" == "Darwin" ]; then
|
|
export WOKSTATION="mac";
|
|
export ARCH="64";
|
|
+elif [ "$aSystem" == "Haiku" ]; then
|
|
+ export WOKSTATION="haiku";
|
|
else
|
|
export WOKSTATION="lin";
|
|
fi
|
|
@@ -112,6 +114,14 @@ if [ "$WOKSTATION" == "mac" ]; then
|
|
fi
|
|
fi
|
|
|
|
+if [ "$WOKSTATION" == "haiku" ]; then
|
|
+ if [ "$LIBRARY_PATH" != "" ]; then
|
|
+ export LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBRARY_PATH}"
|
|
+ else
|
|
+ export LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
|
+ fi
|
|
+fi
|
|
+
|
|
# ----- Set envoronment variables used by OCCT -----
|
|
export CSF_LANGUAGE=us
|
|
export MMGT_CLEAR=1
|
|
diff --git a/adm/templates/env.install.sh.in b/adm/templates/env.install.sh.in
|
|
index 36254ff..bc087e6 100644
|
|
--- a/adm/templates/env.install.sh.in
|
|
+++ b/adm/templates/env.install.sh.in
|
|
@@ -33,6 +33,8 @@ aSystem=`uname -s`
|
|
if [ "$aSystem" == "Darwin" ]; then
|
|
export WOKSTATION="mac";
|
|
export ARCH="64";
|
|
+elif [ "$aSystem" == "Haiku" ]; then
|
|
+ export WOKSTATION="haiku";
|
|
else
|
|
export WOKSTATION="lin";
|
|
fi
|
|
@@ -114,6 +116,14 @@ if [ "$WOKSTATION" == "mac" ]; then
|
|
fi
|
|
fi
|
|
|
|
+if [ "$WOKSTATION" == "haiku" ]; then
|
|
+ if [ "$LIBRARY_PATH" != "" ]; then
|
|
+ export LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBRARY_PATH}"
|
|
+ else
|
|
+ export LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
|
+ fi
|
|
+fi
|
|
+
|
|
# ----- Set envoronment variables used by OCCT -----
|
|
export CSF_LANGUAGE=us
|
|
export MMGT_CLEAR=1
|
|
diff --git a/adm/templates/env.sh b/adm/templates/env.sh
|
|
index 4ab363e..48881b2 100644
|
|
--- a/adm/templates/env.sh
|
|
+++ b/adm/templates/env.sh
|
|
@@ -69,6 +69,8 @@ fi
|
|
if [ "$aSystem" == "Darwin" ]; then
|
|
export WOKSTATION="mac";
|
|
export ARCH="64";
|
|
+elif [ "$aSystem" == "Haiku" ]; then
|
|
+ export WOKSTATION="haiku";
|
|
else
|
|
export WOKSTATION="lin";
|
|
fi
|
|
@@ -210,6 +212,9 @@ export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
|
|
if [ "$WOKSTATION" == "mac" ]; then
|
|
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
|
fi
|
|
+if [ "$WOKSTATION" == "haiku" ]; then
|
|
+ export LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBRARY_PATH}"
|
|
+fi
|
|
|
|
# Set envoronment variables used by OCCT
|
|
export CSF_LANGUAGE="us"
|
|
diff --git a/src/DrawResources/CheckCommands.tcl b/src/DrawResources/CheckCommands.tcl
|
|
index e39a130..6fe3945 100644
|
|
--- a/src/DrawResources/CheckCommands.tcl
|
|
+++ b/src/DrawResources/CheckCommands.tcl
|
|
@@ -1095,6 +1095,7 @@ help checkplatform {
|
|
-windows : return 1 if current platform is 'Windows', otherwise return 0
|
|
-linux : return 1 if current platform is 'Linux', otherwise return 0
|
|
-osx : return 1 if current platform is 'MacOS X', otherwise return 0
|
|
+ -haiku : return 1 if current platform is 'Haiku', otherwise return 0
|
|
|
|
Only one option can be used at once.
|
|
If no option is given, procedure will return the name of current platform.
|
|
@@ -1103,10 +1104,12 @@ proc checkplatform {args} {
|
|
set check_for_windows false
|
|
set check_for_linux false
|
|
set check_for_macosx false
|
|
+ set check_for_haiku false
|
|
|
|
set options {{"-windows" check_for_windows 0}
|
|
{"-linux" check_for_linux 0}
|
|
- {"-osx" check_for_macosx 0}}
|
|
+ {"-osx" check_for_macosx 0}
|
|
+ {"-haiku" check_for_haiku 0}}
|
|
|
|
_check_args ${args} ${options} "checkplatform"
|
|
|
|
@@ -1116,15 +1119,17 @@ proc checkplatform {args} {
|
|
set current_platform Linux
|
|
} elseif { $::tcl_platform(os) == "Darwin" } {
|
|
set current_platform MacOS
|
|
+ } elseif { $::tcl_platform(os) == "Haiku" } {
|
|
+ set current_platform Haiku
|
|
}
|
|
|
|
# no args are given
|
|
- if { !${check_for_windows} && !${check_for_linux} && !${check_for_macosx}} {
|
|
+ if { !${check_for_windows} && !${check_for_linux} && !${check_for_macosx} && !${check_for_haiku}} {
|
|
return ${current_platform}
|
|
}
|
|
|
|
# check usage of proc checkplatform
|
|
- if { [expr [string is true ${check_for_windows}] + [string is true ${check_for_linux}] + [string is true ${check_for_macosx}] ] > 1} {
|
|
+ if { [expr [string is true ${check_for_windows}] + [string is true ${check_for_linux}] + [string is true ${check_for_macosx}] + [string is true ${check_for_haiku}] ] > 1} {
|
|
error "Error: wrong usage of command checkplatform, only single option can be used at once"
|
|
}
|
|
|
|
@@ -1143,6 +1148,11 @@ proc checkplatform {args} {
|
|
return 1
|
|
}
|
|
|
|
+ # checking for Haiku platform
|
|
+ if { ${check_for_haiku} && ${current_platform} == "Haiku" } {
|
|
+ return 1
|
|
+ }
|
|
+
|
|
# current platform is not equal to given as argument platform, return false
|
|
return 0
|
|
}
|
|
diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx
|
|
index e034e9e..8b5717a 100644
|
|
--- a/src/OSD/OSD_Path.cxx
|
|
+++ b/src/OSD/OSD_Path.cxx
|
|
@@ -39,6 +39,8 @@ static OSD_SysType whereAmI()
|
|
return OSD_LinuxREDHAT;
|
|
#elif defined(_AIX) || defined(AIX)
|
|
return OSD_Aix;
|
|
+#elif defined(__HAIKU__)
|
|
+ return OSD_Haiku;
|
|
#else
|
|
struct utsname info;
|
|
uname(&info);
|
|
@@ -343,6 +345,7 @@ OSD_Path::OSD_Path(const TCollection_AsciiString& aDependentName,
|
|
case OSD_UnixSystemV:
|
|
case OSD_Aix:
|
|
case OSD_OSF:
|
|
+ case OSD_Haiku:
|
|
UnixExtract(aDependentName,myNode,myUserName,myPassword,myTrek,myName,myExtension);
|
|
break;
|
|
case OSD_OS2:
|
|
diff --git a/src/OSD/OSD_SysType.hxx b/src/OSD/OSD_SysType.hxx
|
|
index 0492120..d9f19dc 100644
|
|
--- a/src/OSD/OSD_SysType.hxx
|
|
+++ b/src/OSD/OSD_SysType.hxx
|
|
@@ -35,7 +35,8 @@ OSD_MacOs,
|
|
OSD_Taligent,
|
|
OSD_WindowsNT,
|
|
OSD_LinuxREDHAT,
|
|
-OSD_Aix
|
|
+OSD_Aix,
|
|
+OSD_Haiku
|
|
};
|
|
|
|
#endif // _OSD_SysType_HeaderFile
|
|
diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
|
|
index 7da3f19..72a1464 100644
|
|
--- a/src/OSD/OSD_signal.cxx
|
|
+++ b/src/OSD/OSD_signal.cxx
|
|
@@ -758,7 +758,7 @@ typedef void (* SIG_PFV) (int);
|
|
|
|
#include <signal.h>
|
|
|
|
-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
|
|
+#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined(__HAIKU__)
|
|
#include <sys/signal.h>
|
|
#endif
|
|
|
|
diff --git a/src/Standard/Standard_CString.cxx b/src/Standard/Standard_CString.cxx
|
|
index c62acd7..719f567 100755
|
|
--- a/src/Standard/Standard_CString.cxx
|
|
+++ b/src/Standard/Standard_CString.cxx
|
|
@@ -49,7 +49,7 @@
|
|
// glibc version for android platform use locale-independent implementation of
|
|
// strtod, strtol, strtoll functions. For other system with locale-depended
|
|
// implementations problems may appear if "C" locale is not set explicitly.
|
|
- #if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__MINGW32__)
|
|
+ #if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__MINGW32__) && !defined(__HAIKU__)
|
|
#error System does not support xlocale. Import/export could be broken if C locale did not specified by application.
|
|
#endif
|
|
#define strtod_l(thePtr, theNextPtr, theLocale) strtod(thePtr, theNextPtr)
|
|
diff --git a/tests/perf/fclasses/bug24947 b/tests/perf/fclasses/bug24947
|
|
index 493de12..ed5f356 100644
|
|
--- a/tests/perf/fclasses/bug24947
|
|
+++ b/tests/perf/fclasses/bug24947
|
|
@@ -6,6 +6,7 @@ switch -nocase [checkplatform] {
|
|
windows {set libname ${libname}.dll}
|
|
linux {set libname lib${libname}.so}
|
|
macos {set libname lib${libname}.dylib}
|
|
+ haiku {set libname lib${libname}.so}
|
|
}
|
|
|
|
for {set i 0} {$i < 1000} {incr i} {
|
|
--
|
|
2.51.0
|
|
|
|
|
|
From 23dfc243c04a270d91952af4375ec3ce39708c13 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 18 Dec 2022 20:26:18 +0100
|
|
Subject: allow building the OpenGl module on Haiku
|
|
|
|
This is not used when building without OpenGL. It uses EGL (which doesn't seem to work).
|
|
There is no native Haiku implementation.
|
|
|
|
diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx
|
|
index 4308080..fa28727 100644
|
|
--- a/src/OpenGl/OpenGl_GlFunctions.hxx
|
|
+++ b/src/OpenGl/OpenGl_GlFunctions.hxx
|
|
@@ -26,7 +26,7 @@
|
|
#if !defined(__APPLE__)
|
|
#define HAVE_EGL // EAGL is used instead of EGL
|
|
#endif
|
|
-#elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB)
|
|
+#elif !defined(_WIN32) && !defined(__APPLE__) && (defined(__HAIKU__) || !defined(HAVE_XLIB))
|
|
#define HAVE_EGL
|
|
#endif
|
|
#endif
|
|
diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx
|
|
index a1b5b2b..26c2d27 100644
|
|
--- a/src/OpenGl/OpenGl_GraphicDriver.cxx
|
|
+++ b/src/OpenGl/OpenGl_GraphicDriver.cxx
|
|
@@ -42,7 +42,12 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver)
|
|
|
|
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && (!defined(__APPLE__) || defined(HAVE_XLIB))
|
|
#include <X11/Xlib.h> // XOpenDisplay()
|
|
- #include <GL/glx.h>
|
|
+ #ifdef __HAIKU__
|
|
+ #define HAVE_EGL
|
|
+ #include <X11/Xutil.h>
|
|
+ #else
|
|
+ #include <GL/glx.h>
|
|
+ #endif
|
|
#endif
|
|
|
|
#if !defined(HAVE_EGL)
|
|
--
|
|
2.51.0
|
|
|
|
|
|
From d8f9d0817f54b02412eea6530f10c394d9a36b10 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 4 Dec 2022 21:33:38 +0100
|
|
Subject: add a stub to allow building on Haiku when not using Xlib
|
|
|
|
an actual implementation of a Haiku_Window is missing
|
|
|
|
diff --git a/tools/View/View_Widget.cxx b/tools/View/View_Widget.cxx
|
|
index a9b7406..87c8069 100644
|
|
--- a/tools/View/View_Widget.cxx
|
|
+++ b/tools/View/View_Widget.cxx
|
|
@@ -116,6 +116,9 @@ void View_Widget::Init()
|
|
#elif defined (__APPLE__)
|
|
NSView* aViewHandle = (NSView*)winId();
|
|
Handle(Aspect_Window) aWnd = new Cocoa_Window (aViewHandle);
|
|
+#elif defined (__HAIKU__)
|
|
+ // TODO: implement Haiku_Window
|
|
+ Handle(Aspect_Window) aWnd = nullptr;
|
|
#else
|
|
//
|
|
#endif
|
|
--
|
|
2.51.0
|
|
|
|
|
|
From c9c25183e35d544b6e2cd913aeb51bb1da4618c7 Mon Sep 17 00:00:00 2001
|
|
From: Bernd Waibel <waebbl@gmail.com>
|
|
Date: Wed, 3 Feb 2021 23:31:23 +0100
|
|
Subject: allow default search path for Qt5
|
|
|
|
Signed-off-by: Bernd Waibel <waebbl@gmail.com>
|
|
|
|
diff --git a/adm/cmake/qt.cmake b/adm/cmake/qt.cmake
|
|
index 535e6a2..ca8fa9a 100644
|
|
--- a/adm/cmake/qt.cmake
|
|
+++ b/adm/cmake/qt.cmake
|
|
@@ -24,7 +24,7 @@ set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
|
|
|
|
# Now we can apply standard CMake finder for Qt5. We do this mostly
|
|
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
|
|
-find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
|
|
+find_package(Qt5 COMPONENTS Widgets Quick Xml REQUIRED)
|
|
if (NOT ${Qt5_FOUND})
|
|
# Now we can apply standard CMake finder for Qt. We do this mostly
|
|
# to have qt4_wrap_cpp() function available
|
|
--
|
|
2.51.0
|
|
|
|
|
|
From 78583d20eb6eb4de1ff09fc15b3ca5897d123fa2 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 18 Dec 2022 20:16:41 +0100
|
|
Subject: allow building without OpenGL (stubbed)
|
|
|
|
Tools which use a 3d viewer will now crash if built without OpenGL because there is no driver.
|
|
|
|
diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake
|
|
index c939915..5e2df27 100644
|
|
--- a/adm/cmake/occt_toolkit.cmake
|
|
+++ b/adm/cmake/occt_toolkit.cmake
|
|
@@ -440,6 +440,10 @@ if (USE_DRACO)
|
|
endif()
|
|
endif()
|
|
|
|
+if (NOT USE_OPENGL)
|
|
+ list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "TKOpenGl")
|
|
+endif()
|
|
+
|
|
if (APPLE)
|
|
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
|
|
if (NOT ${IS_X11_FOUND} EQUAL -1)
|
|
diff --git a/samples/OCCTOverview/code/Viewer3dSamples.cxx b/samples/OCCTOverview/code/Viewer3dSamples.cxx
|
|
index 5cb2b76..52dcb0a 100644
|
|
--- a/samples/OCCTOverview/code/Viewer3dSamples.cxx
|
|
+++ b/samples/OCCTOverview/code/Viewer3dSamples.cxx
|
|
@@ -25,7 +25,9 @@
|
|
|
|
#include <AIS_Shape.hxx>
|
|
#include <AIS_ViewCube.hxx>
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
+#endif
|
|
#include <V3d_SpotLight.hxx>
|
|
#include <V3d_PositionalLight.hxx>
|
|
#include <V3d_DirectionalLight.hxx>
|
|
@@ -325,18 +327,22 @@ void Viewer3dSamples::HalfTransparencyPresentation3dSample()
|
|
|
|
void Viewer3dSamples::VboOn3dSample()
|
|
{
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
if(Handle(OpenGl_GraphicDriver) aDriver =
|
|
Handle(OpenGl_GraphicDriver)::DownCast(myContext->CurrentViewer()->Driver()))
|
|
{
|
|
aDriver->ChangeOptions().vboDisable = Standard_False;
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
void Viewer3dSamples::VboOff3dSample()
|
|
{
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
if(Handle(OpenGl_GraphicDriver) aDriver =
|
|
Handle(OpenGl_GraphicDriver)::DownCast(myContext->CurrentViewer()->Driver()))
|
|
{
|
|
aDriver->ChangeOptions().vboDisable = Standard_True;
|
|
}
|
|
+#endif
|
|
}
|
|
diff --git a/samples/qt/Common/src/ApplicationCommon.cxx b/samples/qt/Common/src/ApplicationCommon.cxx
|
|
index 2dfc5ed..98502d7 100755
|
|
--- a/samples/qt/Common/src/ApplicationCommon.cxx
|
|
+++ b/samples/qt/Common/src/ApplicationCommon.cxx
|
|
@@ -16,7 +16,9 @@
|
|
#include <Standard_WarningsRestore.hxx>
|
|
|
|
#include <Graphic3d_GraphicDriver.hxx>
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
+#endif
|
|
#include <OSD_Environment.hxx>
|
|
|
|
#include <stdlib.h>
|
|
@@ -446,6 +448,7 @@ void ApplicationCommonWindow::onUseVBO()
|
|
if (aContextAIS.IsNull())
|
|
return;
|
|
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
Handle(OpenGl_GraphicDriver) aDriver =
|
|
Handle(OpenGl_GraphicDriver)::DownCast (aContextAIS->CurrentViewer()->Driver());
|
|
|
|
@@ -453,6 +456,7 @@ void ApplicationCommonWindow::onUseVBO()
|
|
{
|
|
aDriver->ChangeOptions().vboDisable = Standard_True;
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
void ApplicationCommonWindow::onCloseDocument(DocumentCommon* theDoc)
|
|
diff --git a/samples/qt/Common/src/DocumentCommon.cxx b/samples/qt/Common/src/DocumentCommon.cxx
|
|
index e4903bb..da1f5c0 100755
|
|
--- a/samples/qt/Common/src/DocumentCommon.cxx
|
|
+++ b/samples/qt/Common/src/DocumentCommon.cxx
|
|
@@ -13,8 +13,11 @@
|
|
|
|
#include <Aspect_DisplayConnection.hxx>
|
|
#include <AIS_InteractiveObject.hxx>
|
|
+#include <Graphic3d_GraphicDriver.hxx>
|
|
#include <Graphic3d_NameOfMaterial.hxx>
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
+#endif
|
|
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
|
#include <OSD_Environment.hxx>
|
|
#endif
|
|
@@ -31,6 +34,7 @@ Handle(V3d_Viewer) DocumentCommon::Viewer (const Standard_ExtString ,
|
|
const Standard_Boolean theComputedMode,
|
|
const Standard_Boolean theDefaultComputedMode )
|
|
{
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
static Handle(OpenGl_GraphicDriver) aGraphicDriver;
|
|
|
|
if (aGraphicDriver.IsNull())
|
|
@@ -41,6 +45,9 @@ Handle(V3d_Viewer) DocumentCommon::Viewer (const Standard_ExtString ,
|
|
#endif
|
|
aGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection);
|
|
}
|
|
+#else
|
|
+ static Handle(Graphic3d_GraphicDriver) aGraphicDriver = nullptr; //TODO
|
|
+#endif
|
|
|
|
Handle(V3d_Viewer) aViewer = new V3d_Viewer (aGraphicDriver);
|
|
aViewer->SetDefaultViewSize (theViewSize);
|
|
diff --git a/samples/qt/OCCTOverview/src/ApplicationCommon.cxx b/samples/qt/OCCTOverview/src/ApplicationCommon.cxx
|
|
index 49d9e89..bfe4247 100644
|
|
--- a/samples/qt/OCCTOverview/src/ApplicationCommon.cxx
|
|
+++ b/samples/qt/OCCTOverview/src/ApplicationCommon.cxx
|
|
@@ -44,7 +44,10 @@
|
|
#include <QDomAttr>
|
|
#include <Standard_WarningsRestore.hxx>
|
|
|
|
+#include <Message.hxx>
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
+#endif
|
|
#include <OSD_Environment.hxx>
|
|
|
|
#include <stdlib.h>
|
|
diff --git a/samples/qt/OCCTOverview/src/DocumentCommon.cxx b/samples/qt/OCCTOverview/src/DocumentCommon.cxx
|
|
index d92b6d5..3f361aa 100644
|
|
--- a/samples/qt/OCCTOverview/src/DocumentCommon.cxx
|
|
+++ b/samples/qt/OCCTOverview/src/DocumentCommon.cxx
|
|
@@ -33,8 +33,11 @@
|
|
|
|
#include <AIS_InteractiveObject.hxx>
|
|
#include <Aspect_DisplayConnection.hxx>
|
|
+#include <Graphic3d_GraphicDriver.hxx>
|
|
#include <Graphic3d_NameOfMaterial.hxx>
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
+#endif
|
|
#include <OSD_Environment.hxx>
|
|
|
|
#include <TCollection_AsciiString.hxx>
|
|
@@ -50,6 +53,7 @@ Handle(V3d_Viewer) DocumentCommon::Viewer(const Standard_ExtString,
|
|
const Standard_Boolean theComputedMode,
|
|
const Standard_Boolean theDefaultComputedMode)
|
|
{
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
static Handle(OpenGl_GraphicDriver) aGraphicDriver;
|
|
if (aGraphicDriver.IsNull())
|
|
{
|
|
@@ -59,6 +63,9 @@ Handle(V3d_Viewer) DocumentCommon::Viewer(const Standard_ExtString,
|
|
#endif
|
|
aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);
|
|
}
|
|
+#else
|
|
+ static Handle(Graphic3d_GraphicDriver) aGraphicDriver = nullptr; //TODO
|
|
+#endif
|
|
|
|
Handle(V3d_Viewer) aViewer = new V3d_Viewer(aGraphicDriver);
|
|
aViewer->SetDefaultViewSize(theViewSize);
|
|
diff --git a/tools/View/View_Viewer.cxx b/tools/View/View_Viewer.cxx
|
|
index 5ba225a..becc510 100644
|
|
--- a/tools/View/View_Viewer.cxx
|
|
+++ b/tools/View/View_Viewer.cxx
|
|
@@ -15,7 +15,11 @@
|
|
|
|
#include <inspector/View_Viewer.hxx>
|
|
|
|
+#include <Aspect_DisplayConnection.hxx>
|
|
+#include <Graphic3d_GraphicDriver.hxx>
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
+#endif
|
|
|
|
// =======================================================================
|
|
// function : CreateView
|
|
@@ -55,7 +59,11 @@ void View_Viewer::InitViewer (const Handle(AIS_InteractiveContext)& theContext)
|
|
Handle(AIS_InteractiveContext) View_Viewer::CreateStandardViewer()
|
|
{
|
|
Handle(Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection();
|
|
+#ifdef HAVE_OPENGL_EXT
|
|
static Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection);
|
|
+#else
|
|
+ static Handle(Graphic3d_GraphicDriver) aGraphicDriver = nullptr; //TODO
|
|
+#endif
|
|
|
|
Handle(V3d_Viewer) aViewer = new V3d_Viewer (aGraphicDriver);
|
|
aViewer->SetDefaultLights();
|
|
--
|
|
2.51.0
|
|
|
|
|
|
From adbea66fbe495bb0779389967f7c8ef621b1cd6c Mon Sep 17 00:00:00 2001
|
|
From: dpasukhi <dpasukhi@opencascade.com>
|
|
Date: Tue, 27 Aug 2024 11:33:29 +0100
|
|
Subject: 0033808: Coding - FreeType Use unsigned point and contour indexing in
|
|
`FT_Outline`
|
|
|
|
Changes to auto instead of specific type
|
|
|
|
diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx
|
|
index ab2d9b3..cd70187 100644
|
|
--- a/src/StdPrs/StdPrs_BRepFont.cxx
|
|
+++ b/src/StdPrs/StdPrs_BRepFont.cxx
|
|
@@ -457,7 +457,7 @@ Standard_Boolean StdPrs_BRepFont::renderGlyph (const Standard_Utf32Char theChar,
|
|
for (short aContour = 0, aStartIndex = 0; aContour < anOutline->n_contours; ++aContour)
|
|
{
|
|
const FT_Vector* aPntList = &anOutline->points[aStartIndex];
|
|
- const char* aTags = &anOutline->tags[aStartIndex];
|
|
+ const auto* aTags = &anOutline->tags[aStartIndex];
|
|
const short anEndIndex = anOutline->contours[aContour];
|
|
const short aPntsNb = (anEndIndex - aStartIndex) + 1;
|
|
aStartIndex = anEndIndex + 1;
|
|
--
|
|
2.51.0
|
|
|