diff options
author | Christoph Haag | 2016-09-24 23:57:39 +0200 |
---|---|---|
committer | Christoph Haag | 2016-09-24 23:57:39 +0200 |
commit | f00921e886f3b4c860f34d394658ebc6e711fe33 (patch) | |
tree | eb3d7547da6aa059ab8575b268d3349be80159cf | |
parent | 4e5269a6bb2794f298a2bc1639c56eb21029583f (diff) | |
download | aur-f00921e886f3b4c860f34d394658ebc6e711fe33.tar.gz |
add optional core profile patch
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | use_core_profile_unconditionally.diff | 17 |
3 files changed, 42 insertions, 8 deletions
@@ -1,6 +1,6 @@ pkgbase = osvr-rendermanager-git pkgdesc = TW, ATW and high performance rendering with OpenGL and GLES - pkgver = v00_06_43.r453.gdcc4f22 + pkgver = v00_06_52.r11.g03b6f9c pkgrel = 1 url = https://github.com/sensics/OSVR-RenderManager arch = i686 @@ -1,5 +1,5 @@ pkgname=osvr-rendermanager-git -pkgver=v00_06_43.r453.gdcc4f22 +pkgver=v00_06_52.r11.g03b6f9c pkgrel=1 pkgdesc="TW, ATW and high performance rendering with OpenGL and GLES" arch=(i686 x86_64) @@ -29,7 +29,30 @@ prepare() { git submodule update #--init #--recursive #NDA mkdir -p "$srcdir/osvr-rendermanager-build" + + # this copies over osvr-core files from the system into the install directory so they would simply be overwritten in /usr/lib sed -i "/osvrrm_copy_deps(osvr::osvrClientKit osvr::osvrClient osvr::osvrCommon osvr::osvrUtil)/d" CMakeLists.txt + + echo + echo "Patch Rendermanager to use an OpenGL Core Profile?" + echo "For mesa drivers you should say Y, for proprietary drivers you should say n." + echo "(Some of the example programs will not work with a Core Profile, this is not a rendermanagager bug, but a result of this patch)" + echo "For more information refer to" + echo "https://github.com/sensics/OSVR-RenderManager/issues/68" + echo "https://github.com/sensics/OSVR-RenderManager/issues/233" + read -p "[Y/n]? " -n 1 -r + echo # (optional) move to a new line + case "$REPLY" in + y*|Y*|"" ) + echo "Patching rendermanager to use a core profile..." + git apply -vvv "$srcdir"/../use_core_profile_unconditionally.diff + echo "Patched..." + ;; + * ) + echo "Building unpatched..." + ;; + esac + sleep 1 } build() { @@ -41,12 +64,6 @@ build() { package() { cd osvr-rendermanager-build make DESTDIR="$pkgdir/" install - - # *sigh* -# rm -f "$pkgdir"/usr/lib/libosvrClient.so.0.6 -# rm -f "$pkgdir"/usr/lib/libosvrClientKit.so.0.6 -# rm -f "$pkgdir"/usr/lib/libosvrCommon.so.0.6 -# rm -f "$pkgdir"/usr/lib/libosvrUtil.so.0.6 } # vim:set ts=2 sw=2 et: diff --git a/use_core_profile_unconditionally.diff b/use_core_profile_unconditionally.diff new file mode 100644 index 000000000000..cad925bdb8e5 --- /dev/null +++ b/use_core_profile_unconditionally.diff @@ -0,0 +1,17 @@ +diff --git a/osvr/RenderKit/RenderManagerOpenGL.cpp b/osvr/RenderKit/RenderManagerOpenGL.cpp +index e637096..0d4811c 100755 +--- a/osvr/RenderKit/RenderManagerOpenGL.cpp ++++ b/osvr/RenderKit/RenderManagerOpenGL.cpp +@@ -150,12 +150,10 @@ public: + SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, p->bitsPerPixel); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); + SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); +-#ifdef __APPLE__ + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, + SDL_GL_CONTEXT_PROFILE_CORE); +-#endif + + // If we have multiple displays, we need to re-use the + // same context between them. In fact, we always want |