mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 18:55:35 +00:00
Added support for wglCreateContextAttribsARB.
This commit is contained in:
parent
f84cc5678f
commit
cf20b474f6
|
@ -522,6 +522,37 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public static partial class Arb
|
public static partial class Arb
|
||||||
{
|
{
|
||||||
|
[CLSCompliant(false)]
|
||||||
|
unsafe public static
|
||||||
|
IntPtr CreateContextAttribs(IntPtr hDC, IntPtr hShareContext, int* attribList)
|
||||||
|
{
|
||||||
|
return Delegates.wglCreateContextAttribsARB((IntPtr)hDC, (IntPtr)hShareContext, (int*)attribList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static
|
||||||
|
IntPtr CreateContextAttribs(IntPtr hDC, IntPtr hShareContext, ref int attribList)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (int* attribList_ptr = &attribList)
|
||||||
|
{
|
||||||
|
return Delegates.wglCreateContextAttribsARB((IntPtr)hDC, (IntPtr)hShareContext, (int*)attribList_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static
|
||||||
|
IntPtr CreateContextAttribs(IntPtr hDC, IntPtr hShareContext, int[] attribList)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (int* attribList_ptr = attribList)
|
||||||
|
{
|
||||||
|
return Delegates.wglCreateContextAttribsARB((IntPtr)hDC, (IntPtr)hShareContext, (int*)attribList_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[System.CLSCompliant(false)]
|
[System.CLSCompliant(false)]
|
||||||
public static
|
public static
|
||||||
IntPtr CreateBufferRegion(IntPtr hDC, int iLayerPlane, UInt32 uType)
|
IntPtr CreateBufferRegion(IntPtr hDC, int iLayerPlane, UInt32 uType)
|
||||||
|
|
|
@ -83,6 +83,9 @@ namespace OpenTK.Platform.Windows
|
||||||
internal unsafe delegate Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics);
|
internal unsafe delegate Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics);
|
||||||
internal unsafe static UseFontOutlinesW wglUseFontOutlinesW;
|
internal unsafe static UseFontOutlinesW wglUseFontOutlinesW;
|
||||||
[System.Security.SuppressUnmanagedCodeSecurity()]
|
[System.Security.SuppressUnmanagedCodeSecurity()]
|
||||||
|
internal unsafe delegate IntPtr CreateContextAttribsARB(IntPtr hDC, IntPtr hShareContext, int* attribList);
|
||||||
|
internal unsafe static CreateContextAttribsARB wglCreateContextAttribsARB;
|
||||||
|
[System.Security.SuppressUnmanagedCodeSecurity()]
|
||||||
internal delegate IntPtr CreateBufferRegionARB(IntPtr hDC, int iLayerPlane, UInt32 uType);
|
internal delegate IntPtr CreateBufferRegionARB(IntPtr hDC, int iLayerPlane, UInt32 uType);
|
||||||
internal static CreateBufferRegionARB wglCreateBufferRegionARB;
|
internal static CreateBufferRegionARB wglCreateBufferRegionARB;
|
||||||
[System.Security.SuppressUnmanagedCodeSecurity()]
|
[System.Security.SuppressUnmanagedCodeSecurity()]
|
||||||
|
|
|
@ -1,9 +1,19 @@
|
||||||
namespace OpenTK.Platform.Windows
|
namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
namespace Enums
|
#pragma warning disable 3019
|
||||||
|
#pragma warning disable 1591
|
||||||
|
|
||||||
|
public enum ArbCreateContext
|
||||||
{
|
{
|
||||||
#pragma warning disable 3019
|
DebugBit = 0x0001,
|
||||||
#pragma warning disable 1591
|
ForwardCompatibleBit = 0x0002,
|
||||||
|
MajorVersion = 0x2091,
|
||||||
|
MinorVersion = 0x2092,
|
||||||
|
LayerPlane = 0x2093,
|
||||||
|
Flags = 0x2094,
|
||||||
|
ErrorInvalidVersion = 0x2095,
|
||||||
|
}
|
||||||
|
|
||||||
public enum WGL_ARB_buffer_region
|
public enum WGL_ARB_buffer_region
|
||||||
{
|
{
|
||||||
BackColorBufferBitArb = ((int)0x00000002),
|
BackColorBufferBitArb = ((int)0x00000002),
|
||||||
|
@ -505,6 +515,4 @@ namespace OpenTK.Platform.Windows
|
||||||
public enum WGL_I3D_swap_frame_lock
|
public enum WGL_I3D_swap_frame_lock
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue