Begin work on the glsl renderer. Renders blue blocks for chrome-rgba.

This commit is contained in:
Paul Chote
2010-11-10 22:00:58 +13:00
parent a058eb06b2
commit f2a20a182e
8 changed files with 103 additions and 77 deletions

View File

@@ -133,14 +133,14 @@ namespace OpenRA.Graphics
internal static void Initialize( OpenRA.FileFormats.Graphics.WindowMode windowMode )
{
var resolution = GetResolution( windowMode );
device = CreateDevice( Assembly.LoadFile( Path.GetFullPath( "OpenRA.Renderer.Cg.dll" ) ), resolution.Width, resolution.Height, windowMode, false );
device = CreateDevice( Assembly.LoadFile( Path.GetFullPath( "OpenRA.Renderer.Gl.dll" ) ), resolution.Width, resolution.Height, windowMode, false );
}
static Size GetResolution(WindowMode windowmode)
{
var desktopResolution = Screen.PrimaryScreen.Bounds.Size;
var desktopResolution = Screen.PrimaryScreen.Bounds.Size;
var customSize = (windowmode == WindowMode.Windowed) ? Game.Settings.Graphics.WindowedSize : Game.Settings.Graphics.FullscreenSize;
if (customSize.X > 0 && customSize.Y > 0)
{
desktopResolution.Width = customSize.X;