29 lines
478 B
C#
29 lines
478 B
C#
using System;
|
|
using BizHawk.Bizware.BizwareGL;
|
|
|
|
namespace BizHawk.Client.Common
|
|
{
|
|
public static class Extensions
|
|
{
|
|
public static IGuiRenderer CreateRenderer(this IGL gl)
|
|
{
|
|
if (gl is IGL_TK)
|
|
{
|
|
return new GuiRenderer(gl);
|
|
}
|
|
|
|
if (gl is IGL_SlimDX9)
|
|
{
|
|
return new GuiRenderer(gl);
|
|
}
|
|
|
|
if (gl is IGL_GdiPlus)
|
|
{
|
|
return new GDIPlusGuiRenderer((IGL_GdiPlus)gl);
|
|
}
|
|
|
|
throw new NotSupportedException();
|
|
}
|
|
}
|
|
}
|