andykorth / Pencil.Gaming

An open-source, cross-platform gaming library for C# with bindings for OpenGL, OpenAL, and GLFW.
134 stars 35 forks source link

Demo using Pencil.Gaming and suggestions #49

Open migueltk opened 7 years ago

migueltk commented 7 years ago

Unable to run my application correctly on Linux-Ubuntu using OpenTK have had to resort to Penci.Gaming, and the result has been satisfactory.

However the beginning was frustrating, using Monodevelop 5.10, the start of each building with a sample project, informed me that construction was canceled

"Running: mv" /home/miguel/Descargas/Pencil.Gaming-master/Pencil.Gaming/bin/Compatibility-GLFW2/natives32-glfw2 "" /home/miguel/Descargas/Pencil.Gaming-master/Pencil.Gaming/ bin / Compatibility-GLFW2 / natives32 " / Bin / mv: can not move '/home/miguel/Descargas/Pencil.Gaming-master/Pencil.Gaming/bin/Compatibility-GLFW2/natives32-glfw2' a '/home/miguel/Descargas/Pencil.Gaming- master / Pencil.Gaming / bin / Compatibility-GLFW2 / natives32 / natives32-glfw2 ': The directory is not empty "

To fix this remove all custom commands in Monodevelop.

I also had to modify the strings that reference libraries;

To GLFW2_32: private const string lib = "natives32-glfw2 / glfw.dll"; To GLFW2_64: private const string lib = "natives64-glfw2 / glfw.dll"; To GLFW3_32: private const string lib = "natives32-glfw3 / glfw3.dll"; To GLFW3_64: private const string lib = "natives64-glfw3 / glfw3.dll";

Of course, you also have to modify "Pencil.Gaming.dll.config", being so;

<Configuration>
  <Dllmap os = "linux" dll = "natives64-glfw2 / glfw.dll" target = "natives64-glfw2 / libglfw.so" />
  <Dllmap os = "linux" dll = "natives64-glfw3 / glfw3.dll" target = "natives64-glfw3 / libglfw.so.3.2" />
  <Dllmap os = "linux" dll = "natives32-glfw2 / glfw.dll" target = "natives32-glfw2 / libglfw.so" />
  <Dllmap os = "linux" dll = "natives32-glfw3 / glfw3.dll" target = "natives32-glfw3 / libglfw.so" />
  <Dllmap os = "linux" dll = "natives64 / openal32.dll" target = "natives64 / libopenal.so" />
  <Dllmap os = "linux" dll = "natives32 / openal32.dll" target = "natives32 / libopenal.so" />
  <Dllmap os = "linux" dll = "opengl32.dll" target = "libGL.so.1" />
  <Dllmap os = "linux" dll = "natives64 / lua.dll" target = "natives64 / liblua.so" />
  <Dllmap os = "linux" dll = "natives32 / lua.dll" target = "natives32 / liblua.so" />
  <Dllmap os = "osx" dll = "natives32 / glfw.dll" target = "natives32 / libglfw.dylib" />
  <Dllmap os = "osx" dll = "natives32 / openal32.dll" target = "/ System / Library / Frameworks / OpenAL.framework / OpenAL" />
  <Dllmap os = "osx" dll = "natives32 / lua.dll" target = "natives32 / liblua.dylib" />
</ Configuration>

Use my application as an example of using Pencil.Gaming, you can find it here: https://sites.google.com/site/bitiopia/nanovg-fontstash

regards

antonijn commented 7 years ago

I'll try to build using MonoDevelop, and see what results I get. I'll look at this over the weekend as part of v2. Building should be as easy as possible of course!