forked from space-wizards/RobustToolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade and Include OpenTK in all projects. (space-wizards#299)
* Upgrades OpenTK 1.6 to 3.0pre in SS14.Client.Graphics project. Adds OpenTK to all projects so that the math library is available. Adds helper functions to SFML and OpenTK vectors for better compatibility. * Fixed issue with OpenTK.dll.config needing to be copied to output.
- Loading branch information
Showing
16 changed files
with
205 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> | ||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> | ||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> | ||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> | ||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> | ||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/> | ||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/> | ||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> | ||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> | ||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> | ||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> | ||
<!-- XQuartz compatibility (X11 on Mac) --> | ||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> | ||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> | ||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> | ||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> | ||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> | ||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="OpenTK" version="3.0.0-pre" targetFramework="net451" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> | ||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> | ||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> | ||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> | ||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> | ||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/> | ||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/> | ||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> | ||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> | ||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> | ||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> | ||
<!-- XQuartz compatibility (X11 on Mac) --> | ||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> | ||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> | ||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> | ||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> | ||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> | ||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.Diagnostics.Runtime" version="0.8.31-beta" targetFramework="net451" /> | ||
<package id="OpenTK" version="3.0.0-pre" targetFramework="net451" /> | ||
<package id="SharpZipLib" version="0.86.0" targetFramework="net451" /> | ||
<package id="YamlDotNet" version="4.2.1" targetFramework="net451" /> | ||
</packages> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> | ||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> | ||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> | ||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> | ||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> | ||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/> | ||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/> | ||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> | ||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> | ||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> | ||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> | ||
<!-- XQuartz compatibility (X11 on Mac) --> | ||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> | ||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> | ||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> | ||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> | ||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> | ||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="CommandLineParser" version="1.9.71" targetFramework="net451" /> | ||
<package id="OpenTK" version="3.0.0-pre" targetFramework="net451" /> | ||
<package id="SharpZipLib" version="0.86.0" targetFramework="net451" /> | ||
<package id="YamlDotNet" version="4.2.1" targetFramework="net451" /> | ||
</packages> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> | ||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> | ||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> | ||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> | ||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> | ||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/> | ||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/> | ||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> | ||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> | ||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> | ||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> | ||
<!-- XQuartz compatibility (X11 on Mac) --> | ||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> | ||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> | ||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> | ||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> | ||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> | ||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using OpenTK; | ||
using SFML.System; | ||
|
||
namespace SS14.Shared.Utility | ||
{ | ||
/// <summary> | ||
/// Provides compatibility extensions to convert between SFML and OpenTK types. | ||
/// </summary> | ||
public static class SfmlCompatibility | ||
{ | ||
/// <summary> | ||
/// Converts a OpenTK Vector2 to a SFML Vector2f. | ||
/// </summary> | ||
/// <param name="vec">OpenTK Vector2.</param> | ||
/// <returns>SFML Vector2.</returns> | ||
public static Vector2f Convert(this Vector2 vec) | ||
{ | ||
return new Vector2f(vec.X, vec.Y); | ||
} | ||
|
||
/// <summary> | ||
/// Converts a SFML Vector2f to a OpenTK Vector2. | ||
/// </summary> | ||
/// <param name="vec">SFML Vector2f.</param> | ||
/// <returns>OpenTK Vector2.</returns> | ||
public static Vector2 Convert(this Vector2f vec) | ||
{ | ||
return new Vector2(vec.X, vec.Y); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> | ||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> | ||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> | ||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> | ||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> | ||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/> | ||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/> | ||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> | ||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> | ||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> | ||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> | ||
<!-- XQuartz compatibility (X11 on Mac) --> | ||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> | ||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> | ||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> | ||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> | ||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> | ||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit" version="3.6.1" targetFramework="net451" /> | ||
<package id="NUnit.ConsoleRunner" version="3.6.1" targetFramework="net451" /> | ||
<package id="NUnit3TestAdapter" version="3.7.0" targetFramework="net451" /> | ||
<package id="OpenTK" version="3.0.0-pre" targetFramework="net451" /> | ||
<package id="SharpZipLib" version="0.86.0" targetFramework="net451" /> | ||
<package id="YamlDotNet" version="4.2.1" targetFramework="net451" /> | ||
<package id="System.ValueTuple" version="4.3.1" targetFramework="net451" /> | ||
</packages> | ||
<package id="YamlDotNet" version="4.2.1" targetFramework="net451" /> | ||
</packages> |