fixes for running on linux

This commit is contained in:
Chris Forbes
2010-02-18 23:46:00 +13:00
parent 0b22797b12
commit 5adefb8fee
8 changed files with 17 additions and 10 deletions

3
.gitignore vendored
View File

@@ -30,4 +30,5 @@ cg.dll
cgGL.dll
glfw.dll
/OpenRa.Gl.dll
/OpenRa.Gl.dll
settings.ini

View File

@@ -343,8 +343,8 @@ namespace OpenRa
desktopResolution.Height);
}
[DllImport("user32")]
static extern int ShowCursor([MarshalAs(UnmanagedType.Bool)] bool visible);
// [DllImport("user32")]
// static extern int ShowCursor([MarshalAs(UnmanagedType.Bool)] bool visible);
public static void PreInit(Settings settings)
{
@@ -376,7 +376,7 @@ namespace OpenRa
Game.Initialize(Game.Settings.Map, renderer, new int2(resolution), Game.Settings.Player, controller);
ShowCursor(false);
// ShowCursor(false);
Game.ResetTimer();
}

View File

@@ -155,7 +155,8 @@ namespace OpenRa.Graphics
}
public void DrawText(string text, int2 pos, Color c)
{
{
return;
using (new PerfSample("text"))
{
Bitmap b = RenderTextToBitmap(text, fDebug, c);
@@ -166,7 +167,8 @@ namespace OpenRa.Graphics
}
public void DrawText2(string text, int2 pos, Color c)
{
{
return;
using (new PerfSample("text"))
{
Bitmap b = RenderTextToBitmap(text, fTitle, c);

View File

@@ -103,13 +103,17 @@ namespace OpenRa.GlRenderer
Glfw.glfwGetWindowSize(out width, out height);
windowSize = new Size( width, height );
cgContext = Cg.cgCreateContext();
cgContext = Cg.cgCreateContext();
Cg.cgSetErrorCallback( CgErrorCallback );
CgGl.cgGLRegisterStates( cgContext );
CgGl.cgGLSetManageTextureParameters( cgContext, true );
vertexProfile = CgGl.cgGLGetLatestProfile( CgGl.CG_GL_VERTEX );
fragmentProfile = CgGl.cgGLGetLatestProfile( CgGl.CG_GL_FRAGMENT );
fragmentProfile = CgGl.cgGLGetLatestProfile( CgGl.CG_GL_FRAGMENT );
Console.WriteLine("VP Profile: " + vertexProfile);
Console.WriteLine("FP Profile: " + fragmentProfile);
Gl.glEnableClientState( Gl.GL_VERTEX_ARRAY );
CheckGlError();

View File

@@ -1,11 +1,11 @@
<configuration>
<dllmap dll="OpenAL32.dll">
<dllentry os="linux" dll="libopenal.so.0" />
<dllentry os="linux" dll="libopenal.so.1" />
<dllentry os="windows" dll="OpenAL32.dll" />
<dllentry os="osx" dll="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
</dllmap>
<dllmap dll="alut.dll">
<dllentry os="linux" dll="libalut.so.0" />
<dllentry os="linux" dll="libalut.so.1" />
<dllentry os="windows" dll="alut.dll" />
<dllentry os="osx" dll="libalut.so.0" />
</dllmap>