fna-workbench

fna-workbench Commit Details


Date:2016-01-14 11:41:10 (9 years 7 months ago)
Author:Ethan Lee
Branch:master
Commit:7bf8aa0c0c39d1def677de79e7fed5d9efc37fff
Parents: 249a2974ccd034d1d8b17e1bb09b84c5579d7b0c
Message:IGL/IAL devices are made by the FNAPlatform

Changes:

File differences

src/Audio/AudioDevice.cs
7171
7272
7373
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
74
8975
9076
9177
}
else
{
try
{
ALDevice = new OpenALDevice();
}
catch(DllNotFoundException e)
{
System.Console.WriteLine("OpenAL not found! Need FNA.dll.config?");
throw e;
}
catch(Exception)
{
/* We ignore and device creation exceptions,
* as they are handled down the line with Instance != null
*/
}
ALDevice = FNAPlatform.CreateALDevice();
}
// Populate device list
src/FNAPlatform.cs
1212
1313
1414
15
1516
1617
1718
......
3940
4041
4142
43
44
4245
4346
4447
......
6972
7073
7174
75
76
77
78
79
80
81
82
7283
7384
7485
using System.IO;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Input;
#endregion
Dispose =SDL2_FNAPlatform.Dispose;
BeforeInitialize =SDL2_FNAPlatform.BeforeInitialize;
RunLoop =SDL2_FNAPlatform.RunLoop;
CreateGLDevice =SDL2_FNAPlatform.CreateGLDevice;
CreateALDevice =SDL2_FNAPlatform.CreateALDevice;
SetPresentationInterval =SDL2_FNAPlatform.SetPresentationInterval;
GetGraphicsAdapters =SDL2_FNAPlatform.GetGraphicsAdapters;
GetKeyFromScancode =SDL2_FNAPlatform.GetKeyFromScancode;
public delegate void RunLoopFunc(Game game);
public static RunLoopFunc RunLoop;
public delegate IGLDevice CreateGLDeviceFunc(
PresentationParameters presentationParameters
);
public static CreateGLDeviceFunc CreateGLDevice;
public delegate IALDevice CreateALDeviceFunc();
public static CreateALDeviceFunc CreateALDevice;
public delegate void SetPresentationIntervalFunc(PresentInterval interval);
public static SetPresentationIntervalFunc SetPresentationInterval;
src/Graphics/GraphicsDevice.cs
383383
384384
385385
386
387
386
387
388388
389389
390390
PresentationParameters.MultiSampleCount
);
// Set up the OpenGL Device. Loads entry points.
GLDevice = new OpenGLDevice(PresentationParameters);
// Set up the IDLDevice
GLDevice = FNAPlatform.CreateGLDevice(PresentationParameters);
// The mouse needs to know this for faux-backbuffer mouse scaling.
Input.Mouse.INTERNAL_BackBufferWidth = PresentationParameters.BackBufferWidth;
src/SDL2/SDL2_FNAPlatform.cs
3333
3434
3535
36
3637
3738
3839
......
434435
435436
436437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
437465
438466
439467
using SDL2;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Input;
#endregion
}
}
public static IGLDevice CreateGLDevice(
PresentationParameters presentationParameters
) {
// This loads the OpenGL entry points.
return new OpenGLDevice(presentationParameters);
}
public static IALDevice CreateALDevice()
{
try
{
return new OpenALDevice();
}
catch(DllNotFoundException e)
{
System.Console.WriteLine("OpenAL not found! Need FNA.dll.config?");
throw e;
}
catch(Exception)
{
/* We ignore device creation exceptions,
* as they are handled down the line with Instance != null
*/
return null;
}
}
public static void SetPresentationInterval(PresentInterval interval)
{
if (interval == PresentInterval.Default || interval == PresentInterval.One)

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.55851s using 13 queries.