Try to create Embedded context first

By mistake, this code would always create a desktop context. The correct
approach is to create an embedded (EGL) context and only fallback to
desktop if that doesn't work.
This commit is contained in:
Stefanos A. 2013-11-11 11:43:15 +01:00
parent 0d0f578788
commit 12005e0792

View file

@ -24,7 +24,7 @@ namespace Examples.Tutorial
#region Constructor
public SimpleES20Window(GraphicsContextFlags flags)
: base(800, 600, new GraphicsMode(16, 16), "", GameWindowFlags.Default, DisplayDevice.Default, 2, 0, flags)
: base(800, 600, GraphicsMode.Default, "", GameWindowFlags.Default, DisplayDevice.Default, 2, 0, flags)
{ }
#endregion
@ -111,9 +111,7 @@ namespace Examples.Tutorial
SimpleES20Window example;
try
{
example = new SimpleES20Window(GraphicsContextFlags.Default);
//example = new SimpleES20Window(GraphicsContextFlags.Embedded);
example = new SimpleES20Window(GraphicsContextFlags.Embedded);
}
catch
{