mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 15:55:29 +00:00
Updated SupportsExtension functions.
This commit is contained in:
parent
8041f1fe29
commit
c7837ac381
|
@ -170,13 +170,13 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <param name="deviceContext">The device context.</param>
|
/// <param name="deviceContext">The device context.</param>
|
||||||
/// <param name="ext">The extension to check.</param>
|
/// <param name="ext">The extension to check.</param>
|
||||||
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
|
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
|
||||||
public static bool SupportsExtension(IntPtr deviceContext, string ext)
|
public static bool SupportsExtension(WinGLContext context, string ext)
|
||||||
{
|
{
|
||||||
if (Wgl.Delegates.wglGetExtensionsStringARB != null)
|
if (Wgl.Delegates.wglGetExtensionsStringARB != null)
|
||||||
{
|
{
|
||||||
if (extensions == null || rebuildExtensionList)
|
if (extensions == null || rebuildExtensionList)
|
||||||
{
|
{
|
||||||
extensions = Wgl.Arb.GetExtensionsString(deviceContext).Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
extensions = Wgl.Arb.GetExtensionsString(context.Device).Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||||
Array.Sort(extensions);
|
Array.Sort(extensions);
|
||||||
rebuildExtensionList = false;
|
rebuildExtensionList = false;
|
||||||
}
|
}
|
||||||
|
@ -194,10 +194,9 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a Wgl extension is supported by the given context.
|
/// Checks if a Wgl extension is supported by the given context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="deviceContext">The device context.</param>
|
|
||||||
/// <param name="ext">The extension to check.</param>
|
/// <param name="ext">The extension to check.</param>
|
||||||
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
|
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
|
||||||
public static bool SupportsExtension(IntPtr deviceContext, string ext)
|
public static bool SupportsExtension(string ext)
|
||||||
{
|
{
|
||||||
if (Wgl.Delegates.wglGetExtensionsStringEXT != null)
|
if (Wgl.Delegates.wglGetExtensionsStringEXT != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue