From 7775fa64aaff86454619c47d2c1597e0a650f195 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Wed, 27 Nov 2013 19:37:59 +0100 Subject: [PATCH] Removed unused WGL bindings Our WGL bindings contained dozens of methods that OpenTK did not use. Removing these reduces the dll size and improves startup times. --- .../OpenTK/Platform/Windows/Bindings/Wgl.cs | 1728 ----------------- .../Platform/Windows/Bindings/WglCore.cs | 42 - .../Platform/Windows/Bindings/WglDelegates.cs | 144 -- 3 files changed, 1914 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/Bindings/Wgl.cs b/Source/OpenTK/Platform/Windows/Bindings/Wgl.cs index 345830a3..ab794a8d 100644 --- a/Source/OpenTK/Platform/Windows/Bindings/Wgl.cs +++ b/Source/OpenTK/Platform/Windows/Bindings/Wgl.cs @@ -207,231 +207,6 @@ namespace OpenTK.Platform.Windows return Delegates.wglShareLists((IntPtr)hrcSrvShare, (IntPtr)hrcSrvSource); } - public static - IntPtr CreateLayerContext(IntPtr hDc, int level) - { - return Delegates.wglCreateLayerContext((IntPtr)hDc, (int)level); - } - - [System.CLSCompliant(false)] - public static - Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, UInt32 nBytes, LayerPlaneDescriptor[] plpd) - { - unsafe - { - fixed (LayerPlaneDescriptor* plpd_ptr = plpd) - { - return Delegates.wglDescribeLayerPlane((IntPtr)hDc, (int)pixelFormat, (int)layerPlane, (UInt32)nBytes, (LayerPlaneDescriptor*)plpd_ptr); - } - } - } - - public static - Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, Int32 nBytes, LayerPlaneDescriptor[] plpd) - { - unsafe - { - fixed (LayerPlaneDescriptor* plpd_ptr = plpd) - { - return Delegates.wglDescribeLayerPlane((IntPtr)hDc, (int)pixelFormat, (int)layerPlane, (UInt32)nBytes, (LayerPlaneDescriptor*)plpd_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, UInt32 nBytes, ref LayerPlaneDescriptor plpd) - { - unsafe - { - fixed (LayerPlaneDescriptor* plpd_ptr = &plpd) - { - return Delegates.wglDescribeLayerPlane((IntPtr)hDc, (int)pixelFormat, (int)layerPlane, (UInt32)nBytes, (LayerPlaneDescriptor*)plpd_ptr); - } - } - } - - public static - Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, Int32 nBytes, ref LayerPlaneDescriptor plpd) - { - unsafe - { - fixed (LayerPlaneDescriptor* plpd_ptr = &plpd) - { - return Delegates.wglDescribeLayerPlane((IntPtr)hDc, (int)pixelFormat, (int)layerPlane, (UInt32)nBytes, (LayerPlaneDescriptor*)plpd_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, UInt32 nBytes, LayerPlaneDescriptor* plpd) - { - return Delegates.wglDescribeLayerPlane((IntPtr)hDc, (int)pixelFormat, (int)layerPlane, (UInt32)nBytes, (LayerPlaneDescriptor*)plpd); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, Int32 nBytes, LayerPlaneDescriptor* plpd) - { - return Delegates.wglDescribeLayerPlane((IntPtr)hDc, (int)pixelFormat, (int)layerPlane, (UInt32)nBytes, (LayerPlaneDescriptor*)plpd); - } - - public static - int SetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32[] pcr) - { - unsafe - { - fixed (Int32* pcr_ptr = pcr) - { - return Delegates.wglSetLayerPaletteEntries((IntPtr)hdc, (int)iLayerPlane, (int)iStart, (int)cEntries, (Int32*)pcr_ptr); - } - } - } - - public static - int SetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, ref Int32 pcr) - { - unsafe - { - fixed (Int32* pcr_ptr = &pcr) - { - return Delegates.wglSetLayerPaletteEntries((IntPtr)hdc, (int)iLayerPlane, (int)iStart, (int)cEntries, (Int32*)pcr_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe int SetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr) - { - return Delegates.wglSetLayerPaletteEntries((IntPtr)hdc, (int)iLayerPlane, (int)iStart, (int)cEntries, (Int32*)pcr); - } - - public static - int GetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32[] pcr) - { - unsafe - { - fixed (Int32* pcr_ptr = pcr) - { - return Delegates.wglGetLayerPaletteEntries((IntPtr)hdc, (int)iLayerPlane, (int)iStart, (int)cEntries, (Int32*)pcr_ptr); - } - } - } - - public static - int GetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, ref Int32 pcr) - { - unsafe - { - fixed (Int32* pcr_ptr = &pcr) - { - return Delegates.wglGetLayerPaletteEntries((IntPtr)hdc, (int)iLayerPlane, (int)iStart, (int)cEntries, (Int32*)pcr_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe int GetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr) - { - return Delegates.wglGetLayerPaletteEntries((IntPtr)hdc, (int)iLayerPlane, (int)iStart, (int)cEntries, (Int32*)pcr); - } - - public static - Boolean RealizeLayerPalette(IntPtr hdc, int iLayerPlane, Boolean bRealize) - { - return Delegates.wglRealizeLayerPalette((IntPtr)hdc, (int)iLayerPlane, (Boolean)bRealize); - } - - [System.CLSCompliant(false)] - public static - Boolean SwapLayerBuffers(IntPtr hdc, UInt32 fuFlags) - { - return Delegates.wglSwapLayerBuffers((IntPtr)hdc, (UInt32)fuFlags); - } - - public static - Boolean SwapLayerBuffers(IntPtr hdc, Int32 fuFlags) - { - return Delegates.wglSwapLayerBuffers((IntPtr)hdc, (UInt32)fuFlags); - } - - public static - Boolean UseFontBitmapsA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase) - { - return Delegates.wglUseFontBitmapsA((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase); - } - - public static - Boolean UseFontBitmapsW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase) - { - return Delegates.wglUseFontBitmapsW((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase); - } - - public static - Boolean UseFontOutlinesA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat[] glyphMetrics) - { - unsafe - { - fixed (GlyphMetricsFloat* glyphMetrics_ptr = glyphMetrics) - { - return Delegates.wglUseFontOutlinesA((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase, (float)thickness, (float)deviation, (Int32)fontMode, (GlyphMetricsFloat*)glyphMetrics_ptr); - } - } - } - - public static - Boolean UseFontOutlinesA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, ref GlyphMetricsFloat glyphMetrics) - { - unsafe - { - fixed (GlyphMetricsFloat* glyphMetrics_ptr = &glyphMetrics) - { - return Delegates.wglUseFontOutlinesA((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase, (float)thickness, (float)deviation, (Int32)fontMode, (GlyphMetricsFloat*)glyphMetrics_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean UseFontOutlinesA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics) - { - return Delegates.wglUseFontOutlinesA((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase, (float)thickness, (float)deviation, (Int32)fontMode, (GlyphMetricsFloat*)glyphMetrics); - } - - public static - Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat[] glyphMetrics) - { - unsafe - { - fixed (GlyphMetricsFloat* glyphMetrics_ptr = glyphMetrics) - { - return Delegates.wglUseFontOutlinesW((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase, (float)thickness, (float)deviation, (Int32)fontMode, (GlyphMetricsFloat*)glyphMetrics_ptr); - } - } - } - - public static - Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, ref GlyphMetricsFloat glyphMetrics) - { - unsafe - { - fixed (GlyphMetricsFloat* glyphMetrics_ptr = &glyphMetrics) - { - return Delegates.wglUseFontOutlinesW((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase, (float)thickness, (float)deviation, (Int32)fontMode, (GlyphMetricsFloat*)glyphMetrics_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics) - { - return Delegates.wglUseFontOutlinesW((IntPtr)hDC, (Int32)first, (Int32)count, (Int32)listBase, (float)thickness, (float)deviation, (Int32)fontMode, (GlyphMetricsFloat*)glyphMetrics); - } - public static Boolean MakeContextCurrentEXT(IntPtr hDrawDC, IntPtr hReadDC, IntPtr hglrc) { @@ -1321,1508 +1096,5 @@ namespace OpenTK.Platform.Windows } } - - public static partial class NV - { - [System.CLSCompliant(false)] - public static - unsafe IntPtr AllocateMemory(Int32 size, Single readfreq, Single writefreq, Single priority) - { - return Delegates.wglAllocateMemoryNV((Int32)size, (Single)readfreq, (Single)writefreq, (Single)priority); - } - - public static - void FreeMemory([Out] IntPtr pointer) - { - unsafe - { - Delegates.wglFreeMemoryNV((IntPtr)pointer); - } - } - - public static - void FreeMemory([In, Out] object pointer) - { - unsafe - { - System.Runtime.InteropServices.GCHandle pointer_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pointer, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - Delegates.wglFreeMemoryNV((IntPtr)pointer_ptr.AddrOfPinnedObject()); - } - finally - { - pointer_ptr.Free(); - } - } - } - - } - - public static partial class Oml - { - public static - Boolean GetSyncValues(IntPtr hdc, [Out] Int64[] ust, [Out] Int64[] msc, [Out] Int64[] sbc) - { - unsafe - { - fixed (Int64* ust_ptr = ust) - fixed (Int64* msc_ptr = msc) - fixed (Int64* sbc_ptr = sbc) - { - return Delegates.wglGetSyncValuesOML((IntPtr)hdc, (Int64*)ust_ptr, (Int64*)msc_ptr, (Int64*)sbc_ptr); - } - } - } - - public static - Boolean GetSyncValues(IntPtr hdc, [Out] out Int64 ust, [Out] out Int64 msc, [Out] out Int64 sbc) - { - unsafe - { - fixed (Int64* ust_ptr = &ust) - fixed (Int64* msc_ptr = &msc) - fixed (Int64* sbc_ptr = &sbc) - { - Boolean retval = Delegates.wglGetSyncValuesOML((IntPtr)hdc, (Int64*)ust_ptr, (Int64*)msc_ptr, (Int64*)sbc_ptr); - ust = *ust_ptr; - msc = *msc_ptr; - sbc = *sbc_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetSyncValues(IntPtr hdc, [Out] Int64* ust, [Out] Int64* msc, [Out] Int64* sbc) - { - return Delegates.wglGetSyncValuesOML((IntPtr)hdc, (Int64*)ust, (Int64*)msc, (Int64*)sbc); - } - - public static - Boolean GetMscRate(IntPtr hdc, [Out] Int32[] numerator, [Out] Int32[] denominator) - { - unsafe - { - fixed (Int32* numerator_ptr = numerator) - fixed (Int32* denominator_ptr = denominator) - { - return Delegates.wglGetMscRateOML((IntPtr)hdc, (Int32*)numerator_ptr, (Int32*)denominator_ptr); - } - } - } - - public static - Boolean GetMscRate(IntPtr hdc, [Out] out Int32 numerator, [Out] out Int32 denominator) - { - unsafe - { - fixed (Int32* numerator_ptr = &numerator) - fixed (Int32* denominator_ptr = &denominator) - { - Boolean retval = Delegates.wglGetMscRateOML((IntPtr)hdc, (Int32*)numerator_ptr, (Int32*)denominator_ptr); - numerator = *numerator_ptr; - denominator = *denominator_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetMscRate(IntPtr hdc, [Out] Int32* numerator, [Out] Int32* denominator) - { - return Delegates.wglGetMscRateOML((IntPtr)hdc, (Int32*)numerator, (Int32*)denominator); - } - - public static - Int64 SwapBuffersMsc(IntPtr hdc, Int64 target_msc, Int64 divisor, Int64 remainder) - { - return Delegates.wglSwapBuffersMscOML((IntPtr)hdc, (Int64)target_msc, (Int64)divisor, (Int64)remainder); - } - - public static - Int64 SwapLayerBuffersMsc(IntPtr hdc, int fuPlanes, Int64 target_msc, Int64 divisor, Int64 remainder) - { - return Delegates.wglSwapLayerBuffersMscOML((IntPtr)hdc, (int)fuPlanes, (Int64)target_msc, (Int64)divisor, (Int64)remainder); - } - - public static - Boolean WaitForMsc(IntPtr hdc, Int64 target_msc, Int64 divisor, Int64 remainder, [Out] Int64[] ust, [Out] Int64[] msc, [Out] Int64[] sbc) - { - unsafe - { - fixed (Int64* ust_ptr = ust) - fixed (Int64* msc_ptr = msc) - fixed (Int64* sbc_ptr = sbc) - { - return Delegates.wglWaitForMscOML((IntPtr)hdc, (Int64)target_msc, (Int64)divisor, (Int64)remainder, (Int64*)ust_ptr, (Int64*)msc_ptr, (Int64*)sbc_ptr); - } - } - } - - public static - Boolean WaitForMsc(IntPtr hdc, Int64 target_msc, Int64 divisor, Int64 remainder, [Out] out Int64 ust, [Out] out Int64 msc, [Out] out Int64 sbc) - { - unsafe - { - fixed (Int64* ust_ptr = &ust) - fixed (Int64* msc_ptr = &msc) - fixed (Int64* sbc_ptr = &sbc) - { - Boolean retval = Delegates.wglWaitForMscOML((IntPtr)hdc, (Int64)target_msc, (Int64)divisor, (Int64)remainder, (Int64*)ust_ptr, (Int64*)msc_ptr, (Int64*)sbc_ptr); - ust = *ust_ptr; - msc = *msc_ptr; - sbc = *sbc_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean WaitForMsc(IntPtr hdc, Int64 target_msc, Int64 divisor, Int64 remainder, [Out] Int64* ust, [Out] Int64* msc, [Out] Int64* sbc) - { - return Delegates.wglWaitForMscOML((IntPtr)hdc, (Int64)target_msc, (Int64)divisor, (Int64)remainder, (Int64*)ust, (Int64*)msc, (Int64*)sbc); - } - - public static - Boolean WaitForSbc(IntPtr hdc, Int64 target_sbc, [Out] Int64[] ust, [Out] Int64[] msc, [Out] Int64[] sbc) - { - unsafe - { - fixed (Int64* ust_ptr = ust) - fixed (Int64* msc_ptr = msc) - fixed (Int64* sbc_ptr = sbc) - { - return Delegates.wglWaitForSbcOML((IntPtr)hdc, (Int64)target_sbc, (Int64*)ust_ptr, (Int64*)msc_ptr, (Int64*)sbc_ptr); - } - } - } - - public static - Boolean WaitForSbc(IntPtr hdc, Int64 target_sbc, [Out] out Int64 ust, [Out] out Int64 msc, [Out] out Int64 sbc) - { - unsafe - { - fixed (Int64* ust_ptr = &ust) - fixed (Int64* msc_ptr = &msc) - fixed (Int64* sbc_ptr = &sbc) - { - Boolean retval = Delegates.wglWaitForSbcOML((IntPtr)hdc, (Int64)target_sbc, (Int64*)ust_ptr, (Int64*)msc_ptr, (Int64*)sbc_ptr); - ust = *ust_ptr; - msc = *msc_ptr; - sbc = *sbc_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean WaitForSbc(IntPtr hdc, Int64 target_sbc, [Out] Int64* ust, [Out] Int64* msc, [Out] Int64* sbc) - { - return Delegates.wglWaitForSbcOML((IntPtr)hdc, (Int64)target_sbc, (Int64*)ust, (Int64*)msc, (Int64*)sbc); - } - - } - - public static partial class I3d - { - public static - Boolean GetDigitalVideoParameters(IntPtr hDC, int iAttribute, [Out] int[] piValue) - { - unsafe - { - fixed (int* piValue_ptr = piValue) - { - return Delegates.wglGetDigitalVideoParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - } - } - } - - public static - Boolean GetDigitalVideoParameters(IntPtr hDC, int iAttribute, [Out] out int piValue) - { - unsafe - { - fixed (int* piValue_ptr = &piValue) - { - Boolean retval = Delegates.wglGetDigitalVideoParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - piValue = *piValue_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetDigitalVideoParameters(IntPtr hDC, int iAttribute, [Out] int* piValue) - { - return Delegates.wglGetDigitalVideoParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue); - } - - public static - Boolean SetDigitalVideoParameters(IntPtr hDC, int iAttribute, int[] piValue) - { - unsafe - { - fixed (int* piValue_ptr = piValue) - { - return Delegates.wglSetDigitalVideoParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - } - } - } - - public static - Boolean SetDigitalVideoParameters(IntPtr hDC, int iAttribute, ref int piValue) - { - unsafe - { - fixed (int* piValue_ptr = &piValue) - { - return Delegates.wglSetDigitalVideoParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean SetDigitalVideoParameters(IntPtr hDC, int iAttribute, int* piValue) - { - return Delegates.wglSetDigitalVideoParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue); - } - - public static - Boolean GetGammaTableParameters(IntPtr hDC, int iAttribute, [Out] int[] piValue) - { - unsafe - { - fixed (int* piValue_ptr = piValue) - { - return Delegates.wglGetGammaTableParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - } - } - } - - public static - Boolean GetGammaTableParameters(IntPtr hDC, int iAttribute, [Out] out int piValue) - { - unsafe - { - fixed (int* piValue_ptr = &piValue) - { - Boolean retval = Delegates.wglGetGammaTableParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - piValue = *piValue_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGammaTableParameters(IntPtr hDC, int iAttribute, [Out] int* piValue) - { - return Delegates.wglGetGammaTableParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue); - } - - public static - Boolean SetGammaTableParameters(IntPtr hDC, int iAttribute, int[] piValue) - { - unsafe - { - fixed (int* piValue_ptr = piValue) - { - return Delegates.wglSetGammaTableParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - } - } - } - - public static - Boolean SetGammaTableParameters(IntPtr hDC, int iAttribute, ref int piValue) - { - unsafe - { - fixed (int* piValue_ptr = &piValue) - { - return Delegates.wglSetGammaTableParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean SetGammaTableParameters(IntPtr hDC, int iAttribute, int* piValue) - { - return Delegates.wglSetGammaTableParametersI3D((IntPtr)hDC, (int)iAttribute, (int*)piValue); - } - - [System.CLSCompliant(false)] - public static - Boolean GetGammaTable(IntPtr hDC, int iEntries, [Out] UInt16[] puRed, [Out] UInt16[] puGreen, [Out] UInt16[] puBlue) - { - unsafe - { - fixed (UInt16* puRed_ptr = puRed) - fixed (UInt16* puGreen_ptr = puGreen) - fixed (UInt16* puBlue_ptr = puBlue) - { - return Delegates.wglGetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - } - } - } - - public static - Boolean GetGammaTable(IntPtr hDC, int iEntries, [Out] Int16[] puRed, [Out] Int16[] puGreen, [Out] Int16[] puBlue) - { - unsafe - { - fixed (Int16* puRed_ptr = puRed) - fixed (Int16* puGreen_ptr = puGreen) - fixed (Int16* puBlue_ptr = puBlue) - { - return Delegates.wglGetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean GetGammaTable(IntPtr hDC, int iEntries, [Out] out UInt16 puRed, [Out] out UInt16 puGreen, [Out] out UInt16 puBlue) - { - unsafe - { - fixed (UInt16* puRed_ptr = &puRed) - fixed (UInt16* puGreen_ptr = &puGreen) - fixed (UInt16* puBlue_ptr = &puBlue) - { - Boolean retval = Delegates.wglGetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - puRed = *puRed_ptr; - puGreen = *puGreen_ptr; - puBlue = *puBlue_ptr; - return retval; - } - } - } - - public static - Boolean GetGammaTable(IntPtr hDC, int iEntries, [Out] out Int16 puRed, [Out] out Int16 puGreen, [Out] out Int16 puBlue) - { - unsafe - { - fixed (Int16* puRed_ptr = &puRed) - fixed (Int16* puGreen_ptr = &puGreen) - fixed (Int16* puBlue_ptr = &puBlue) - { - Boolean retval = Delegates.wglGetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - puRed = *puRed_ptr; - puGreen = *puGreen_ptr; - puBlue = *puBlue_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGammaTable(IntPtr hDC, int iEntries, [Out] UInt16* puRed, [Out] UInt16* puGreen, [Out] UInt16* puBlue) - { - return Delegates.wglGetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed, (UInt16*)puGreen, (UInt16*)puBlue); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGammaTable(IntPtr hDC, int iEntries, [Out] Int16* puRed, [Out] Int16* puGreen, [Out] Int16* puBlue) - { - return Delegates.wglGetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed, (UInt16*)puGreen, (UInt16*)puBlue); - } - - [System.CLSCompliant(false)] - public static - Boolean SetGammaTable(IntPtr hDC, int iEntries, UInt16[] puRed, UInt16[] puGreen, UInt16[] puBlue) - { - unsafe - { - fixed (UInt16* puRed_ptr = puRed) - fixed (UInt16* puGreen_ptr = puGreen) - fixed (UInt16* puBlue_ptr = puBlue) - { - return Delegates.wglSetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - } - } - } - - public static - Boolean SetGammaTable(IntPtr hDC, int iEntries, Int16[] puRed, Int16[] puGreen, Int16[] puBlue) - { - unsafe - { - fixed (Int16* puRed_ptr = puRed) - fixed (Int16* puGreen_ptr = puGreen) - fixed (Int16* puBlue_ptr = puBlue) - { - return Delegates.wglSetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean SetGammaTable(IntPtr hDC, int iEntries, ref UInt16 puRed, ref UInt16 puGreen, ref UInt16 puBlue) - { - unsafe - { - fixed (UInt16* puRed_ptr = &puRed) - fixed (UInt16* puGreen_ptr = &puGreen) - fixed (UInt16* puBlue_ptr = &puBlue) - { - return Delegates.wglSetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - } - } - } - - public static - Boolean SetGammaTable(IntPtr hDC, int iEntries, ref Int16 puRed, ref Int16 puGreen, ref Int16 puBlue) - { - unsafe - { - fixed (Int16* puRed_ptr = &puRed) - fixed (Int16* puGreen_ptr = &puGreen) - fixed (Int16* puBlue_ptr = &puBlue) - { - return Delegates.wglSetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed_ptr, (UInt16*)puGreen_ptr, (UInt16*)puBlue_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean SetGammaTable(IntPtr hDC, int iEntries, UInt16* puRed, UInt16* puGreen, UInt16* puBlue) - { - return Delegates.wglSetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed, (UInt16*)puGreen, (UInt16*)puBlue); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean SetGammaTable(IntPtr hDC, int iEntries, Int16* puRed, Int16* puGreen, Int16* puBlue) - { - return Delegates.wglSetGammaTableI3D((IntPtr)hDC, (int)iEntries, (UInt16*)puRed, (UInt16*)puGreen, (UInt16*)puBlue); - } - - public static - Boolean EnableGenlock(IntPtr hDC) - { - return Delegates.wglEnableGenlockI3D((IntPtr)hDC); - } - - public static - Boolean DisableGenlock(IntPtr hDC) - { - return Delegates.wglDisableGenlockI3D((IntPtr)hDC); - } - - public static - Boolean IsEnabledGenlock(IntPtr hDC, [Out] Boolean[] pFlag) - { - unsafe - { - fixed (Boolean* pFlag_ptr = pFlag) - { - return Delegates.wglIsEnabledGenlockI3D((IntPtr)hDC, (Boolean*)pFlag_ptr); - } - } - } - - public static - Boolean IsEnabledGenlock(IntPtr hDC, [Out] out Boolean pFlag) - { - unsafe - { - fixed (Boolean* pFlag_ptr = &pFlag) - { - Boolean retval = Delegates.wglIsEnabledGenlockI3D((IntPtr)hDC, (Boolean*)pFlag_ptr); - pFlag = *pFlag_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean IsEnabledGenlock(IntPtr hDC, [Out] Boolean* pFlag) - { - return Delegates.wglIsEnabledGenlockI3D((IntPtr)hDC, (Boolean*)pFlag); - } - - [System.CLSCompliant(false)] - public static - Boolean GenlockSource(IntPtr hDC, UInt32 uSource) - { - return Delegates.wglGenlockSourceI3D((IntPtr)hDC, (UInt32)uSource); - } - - public static - Boolean GenlockSource(IntPtr hDC, Int32 uSource) - { - return Delegates.wglGenlockSourceI3D((IntPtr)hDC, (UInt32)uSource); - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSource(IntPtr hDC, [Out] UInt32[] uSource) - { - unsafe - { - fixed (UInt32* uSource_ptr = uSource) - { - return Delegates.wglGetGenlockSourceI3D((IntPtr)hDC, (UInt32*)uSource_ptr); - } - } - } - - public static - Boolean GetGenlockSource(IntPtr hDC, [Out] Int32[] uSource) - { - unsafe - { - fixed (Int32* uSource_ptr = uSource) - { - return Delegates.wglGetGenlockSourceI3D((IntPtr)hDC, (UInt32*)uSource_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSource(IntPtr hDC, [Out] out UInt32 uSource) - { - unsafe - { - fixed (UInt32* uSource_ptr = &uSource) - { - Boolean retval = Delegates.wglGetGenlockSourceI3D((IntPtr)hDC, (UInt32*)uSource_ptr); - uSource = *uSource_ptr; - return retval; - } - } - } - - public static - Boolean GetGenlockSource(IntPtr hDC, [Out] out Int32 uSource) - { - unsafe - { - fixed (Int32* uSource_ptr = &uSource) - { - Boolean retval = Delegates.wglGetGenlockSourceI3D((IntPtr)hDC, (UInt32*)uSource_ptr); - uSource = *uSource_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSource(IntPtr hDC, [Out] UInt32* uSource) - { - return Delegates.wglGetGenlockSourceI3D((IntPtr)hDC, (UInt32*)uSource); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSource(IntPtr hDC, [Out] Int32* uSource) - { - return Delegates.wglGetGenlockSourceI3D((IntPtr)hDC, (UInt32*)uSource); - } - - [System.CLSCompliant(false)] - public static - Boolean GenlockSourceEdge(IntPtr hDC, UInt32 uEdge) - { - return Delegates.wglGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32)uEdge); - } - - public static - Boolean GenlockSourceEdge(IntPtr hDC, Int32 uEdge) - { - return Delegates.wglGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32)uEdge); - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSourceEdge(IntPtr hDC, [Out] UInt32[] uEdge) - { - unsafe - { - fixed (UInt32* uEdge_ptr = uEdge) - { - return Delegates.wglGetGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32*)uEdge_ptr); - } - } - } - - public static - Boolean GetGenlockSourceEdge(IntPtr hDC, [Out] Int32[] uEdge) - { - unsafe - { - fixed (Int32* uEdge_ptr = uEdge) - { - return Delegates.wglGetGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32*)uEdge_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSourceEdge(IntPtr hDC, [Out] out UInt32 uEdge) - { - unsafe - { - fixed (UInt32* uEdge_ptr = &uEdge) - { - Boolean retval = Delegates.wglGetGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32*)uEdge_ptr); - uEdge = *uEdge_ptr; - return retval; - } - } - } - - public static - Boolean GetGenlockSourceEdge(IntPtr hDC, [Out] out Int32 uEdge) - { - unsafe - { - fixed (Int32* uEdge_ptr = &uEdge) - { - Boolean retval = Delegates.wglGetGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32*)uEdge_ptr); - uEdge = *uEdge_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSourceEdge(IntPtr hDC, [Out] UInt32* uEdge) - { - return Delegates.wglGetGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32*)uEdge); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSourceEdge(IntPtr hDC, [Out] Int32* uEdge) - { - return Delegates.wglGetGenlockSourceEdgeI3D((IntPtr)hDC, (UInt32*)uEdge); - } - - [System.CLSCompliant(false)] - public static - Boolean GenlockSampleRate(IntPtr hDC, UInt32 uRate) - { - return Delegates.wglGenlockSampleRateI3D((IntPtr)hDC, (UInt32)uRate); - } - - public static - Boolean GenlockSampleRate(IntPtr hDC, Int32 uRate) - { - return Delegates.wglGenlockSampleRateI3D((IntPtr)hDC, (UInt32)uRate); - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSampleRate(IntPtr hDC, [Out] UInt32[] uRate) - { - unsafe - { - fixed (UInt32* uRate_ptr = uRate) - { - return Delegates.wglGetGenlockSampleRateI3D((IntPtr)hDC, (UInt32*)uRate_ptr); - } - } - } - - public static - Boolean GetGenlockSampleRate(IntPtr hDC, [Out] Int32[] uRate) - { - unsafe - { - fixed (Int32* uRate_ptr = uRate) - { - return Delegates.wglGetGenlockSampleRateI3D((IntPtr)hDC, (UInt32*)uRate_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSampleRate(IntPtr hDC, [Out] out UInt32 uRate) - { - unsafe - { - fixed (UInt32* uRate_ptr = &uRate) - { - Boolean retval = Delegates.wglGetGenlockSampleRateI3D((IntPtr)hDC, (UInt32*)uRate_ptr); - uRate = *uRate_ptr; - return retval; - } - } - } - - public static - Boolean GetGenlockSampleRate(IntPtr hDC, [Out] out Int32 uRate) - { - unsafe - { - fixed (Int32* uRate_ptr = &uRate) - { - Boolean retval = Delegates.wglGetGenlockSampleRateI3D((IntPtr)hDC, (UInt32*)uRate_ptr); - uRate = *uRate_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSampleRate(IntPtr hDC, [Out] UInt32* uRate) - { - return Delegates.wglGetGenlockSampleRateI3D((IntPtr)hDC, (UInt32*)uRate); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSampleRate(IntPtr hDC, [Out] Int32* uRate) - { - return Delegates.wglGetGenlockSampleRateI3D((IntPtr)hDC, (UInt32*)uRate); - } - - [System.CLSCompliant(false)] - public static - Boolean GenlockSourceDelay(IntPtr hDC, UInt32 uDelay) - { - return Delegates.wglGenlockSourceDelayI3D((IntPtr)hDC, (UInt32)uDelay); - } - - public static - Boolean GenlockSourceDelay(IntPtr hDC, Int32 uDelay) - { - return Delegates.wglGenlockSourceDelayI3D((IntPtr)hDC, (UInt32)uDelay); - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSourceDelay(IntPtr hDC, [Out] UInt32[] uDelay) - { - unsafe - { - fixed (UInt32* uDelay_ptr = uDelay) - { - return Delegates.wglGetGenlockSourceDelayI3D((IntPtr)hDC, (UInt32*)uDelay_ptr); - } - } - } - - public static - Boolean GetGenlockSourceDelay(IntPtr hDC, [Out] Int32[] uDelay) - { - unsafe - { - fixed (Int32* uDelay_ptr = uDelay) - { - return Delegates.wglGetGenlockSourceDelayI3D((IntPtr)hDC, (UInt32*)uDelay_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean GetGenlockSourceDelay(IntPtr hDC, [Out] out UInt32 uDelay) - { - unsafe - { - fixed (UInt32* uDelay_ptr = &uDelay) - { - Boolean retval = Delegates.wglGetGenlockSourceDelayI3D((IntPtr)hDC, (UInt32*)uDelay_ptr); - uDelay = *uDelay_ptr; - return retval; - } - } - } - - public static - Boolean GetGenlockSourceDelay(IntPtr hDC, [Out] out Int32 uDelay) - { - unsafe - { - fixed (Int32* uDelay_ptr = &uDelay) - { - Boolean retval = Delegates.wglGetGenlockSourceDelayI3D((IntPtr)hDC, (UInt32*)uDelay_ptr); - uDelay = *uDelay_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSourceDelay(IntPtr hDC, [Out] UInt32* uDelay) - { - return Delegates.wglGetGenlockSourceDelayI3D((IntPtr)hDC, (UInt32*)uDelay); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetGenlockSourceDelay(IntPtr hDC, [Out] Int32* uDelay) - { - return Delegates.wglGetGenlockSourceDelayI3D((IntPtr)hDC, (UInt32*)uDelay); - } - - [System.CLSCompliant(false)] - public static - Boolean QueryGenlockMaxSourceDelay(IntPtr hDC, [Out] UInt32[] uMaxLineDelay, [Out] UInt32[] uMaxPixelDelay) - { - unsafe - { - fixed (UInt32* uMaxLineDelay_ptr = uMaxLineDelay) - fixed (UInt32* uMaxPixelDelay_ptr = uMaxPixelDelay) - { - return Delegates.wglQueryGenlockMaxSourceDelayI3D((IntPtr)hDC, (UInt32*)uMaxLineDelay_ptr, (UInt32*)uMaxPixelDelay_ptr); - } - } - } - - public static - Boolean QueryGenlockMaxSourceDelay(IntPtr hDC, [Out] Int32[] uMaxLineDelay, [Out] Int32[] uMaxPixelDelay) - { - unsafe - { - fixed (Int32* uMaxLineDelay_ptr = uMaxLineDelay) - fixed (Int32* uMaxPixelDelay_ptr = uMaxPixelDelay) - { - return Delegates.wglQueryGenlockMaxSourceDelayI3D((IntPtr)hDC, (UInt32*)uMaxLineDelay_ptr, (UInt32*)uMaxPixelDelay_ptr); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean QueryGenlockMaxSourceDelay(IntPtr hDC, [Out] out UInt32 uMaxLineDelay, [Out] out UInt32 uMaxPixelDelay) - { - unsafe - { - fixed (UInt32* uMaxLineDelay_ptr = &uMaxLineDelay) - fixed (UInt32* uMaxPixelDelay_ptr = &uMaxPixelDelay) - { - Boolean retval = Delegates.wglQueryGenlockMaxSourceDelayI3D((IntPtr)hDC, (UInt32*)uMaxLineDelay_ptr, (UInt32*)uMaxPixelDelay_ptr); - uMaxLineDelay = *uMaxLineDelay_ptr; - uMaxPixelDelay = *uMaxPixelDelay_ptr; - return retval; - } - } - } - - public static - Boolean QueryGenlockMaxSourceDelay(IntPtr hDC, [Out] out Int32 uMaxLineDelay, [Out] out Int32 uMaxPixelDelay) - { - unsafe - { - fixed (Int32* uMaxLineDelay_ptr = &uMaxLineDelay) - fixed (Int32* uMaxPixelDelay_ptr = &uMaxPixelDelay) - { - Boolean retval = Delegates.wglQueryGenlockMaxSourceDelayI3D((IntPtr)hDC, (UInt32*)uMaxLineDelay_ptr, (UInt32*)uMaxPixelDelay_ptr); - uMaxLineDelay = *uMaxLineDelay_ptr; - uMaxPixelDelay = *uMaxPixelDelay_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean QueryGenlockMaxSourceDelay(IntPtr hDC, [Out] UInt32* uMaxLineDelay, [Out] UInt32* uMaxPixelDelay) - { - return Delegates.wglQueryGenlockMaxSourceDelayI3D((IntPtr)hDC, (UInt32*)uMaxLineDelay, (UInt32*)uMaxPixelDelay); - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean QueryGenlockMaxSourceDelay(IntPtr hDC, [Out] Int32* uMaxLineDelay, [Out] Int32* uMaxPixelDelay) - { - return Delegates.wglQueryGenlockMaxSourceDelayI3D((IntPtr)hDC, (UInt32*)uMaxLineDelay, (UInt32*)uMaxPixelDelay); - } - - [System.CLSCompliant(false)] - public static - unsafe IntPtr CreateImageBuffer(IntPtr hDC, Int32 dwSize, UInt32 uFlags) - { - return Delegates.wglCreateImageBufferI3D((IntPtr)hDC, (Int32)dwSize, (UInt32)uFlags); - } - - [System.CLSCompliant(false)] - public static - unsafe IntPtr CreateImageBuffer(IntPtr hDC, Int32 dwSize, Int32 uFlags) - { - return Delegates.wglCreateImageBufferI3D((IntPtr)hDC, (Int32)dwSize, (UInt32)uFlags); - } - - public static - Boolean DestroyImageBuffer(IntPtr hDC, IntPtr pAddress) - { - unsafe - { - return Delegates.wglDestroyImageBufferI3D((IntPtr)hDC, (IntPtr)pAddress); - } - } - - public static - Boolean DestroyImageBuffer(IntPtr hDC, [In, Out] object pAddress) - { - unsafe - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglDestroyImageBufferI3D((IntPtr)hDC, (IntPtr)pAddress_ptr.AddrOfPinnedObject()); - } - finally - { - pAddress_ptr.Free(); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr[] pEvent, IntPtr pAddress, Int32[] pSize, UInt32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = pEvent) - fixed (Int32* pSize_ptr = pSize) - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress, (Int32*)pSize_ptr, (UInt32)count); - } - } - } - - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr[] pEvent, IntPtr pAddress, Int32[] pSize, Int32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = pEvent) - fixed (Int32* pSize_ptr = pSize) - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress, (Int32*)pSize_ptr, (UInt32)count); - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr[] pEvent, [In, Out] object pAddress, Int32[] pSize, UInt32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = pEvent) - fixed (Int32* pSize_ptr = pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr[] pEvent, [In, Out] object pAddress, Int32[] pSize, Int32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = pEvent) - fixed (Int32* pSize_ptr = pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr[] pEvent, [In, Out] object pAddress, ref Int32 pSize, UInt32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = pEvent) - fixed (Int32* pSize_ptr = &pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr[] pEvent, [In, Out] object pAddress, ref Int32 pSize, Int32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = pEvent) - fixed (Int32* pSize_ptr = &pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, ref IntPtr pEvent, [In, Out] object pAddress, Int32[] pSize, UInt32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = &pEvent) - fixed (Int32* pSize_ptr = pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, ref IntPtr pEvent, [In, Out] object pAddress, Int32[] pSize, Int32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = &pEvent) - fixed (Int32* pSize_ptr = pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, ref IntPtr pEvent, [In, Out] object pAddress, ref Int32 pSize, UInt32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = &pEvent) - fixed (Int32* pSize_ptr = &pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - public static - Boolean AssociateImageBufferEvents(IntPtr hDC, ref IntPtr pEvent, [In, Out] object pAddress, ref Int32 pSize, Int32 count) - { - unsafe - { - fixed (IntPtr* pEvent_ptr = &pEvent) - fixed (Int32* pSize_ptr = &pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent_ptr, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr* pEvent, [In, Out] object pAddress, Int32* pSize, UInt32 count) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr* pEvent, [In, Out] object pAddress, Int32* pSize, Int32 count) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr* pEvent, [In, Out] object pAddress, Int32[] pSize, UInt32 count) - { - unsafe - { - fixed (Int32* pSize_ptr = pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr* pEvent, [In, Out] object pAddress, Int32[] pSize, Int32 count) - { - unsafe - { - fixed (Int32* pSize_ptr = pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr* pEvent, [In, Out] object pAddress, ref Int32 pSize, UInt32 count) - { - unsafe - { - fixed (Int32* pSize_ptr = &pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean AssociateImageBufferEvents(IntPtr hDC, IntPtr* pEvent, [In, Out] object pAddress, ref Int32 pSize, Int32 count) - { - unsafe - { - fixed (Int32* pSize_ptr = &pSize) - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglAssociateImageBufferEventsI3D((IntPtr)hDC, (IntPtr*)pEvent, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (Int32*)pSize_ptr, (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - } - - [System.CLSCompliant(false)] - public static - Boolean ReleaseImageBufferEvents(IntPtr hDC, IntPtr pAddress, UInt32 count) - { - unsafe - { - return Delegates.wglReleaseImageBufferEventsI3D((IntPtr)hDC, (IntPtr)pAddress, (UInt32)count); - } - } - - public static - Boolean ReleaseImageBufferEvents(IntPtr hDC, IntPtr pAddress, Int32 count) - { - unsafe - { - return Delegates.wglReleaseImageBufferEventsI3D((IntPtr)hDC, (IntPtr)pAddress, (UInt32)count); - } - } - - [System.CLSCompliant(false)] - public static - Boolean ReleaseImageBufferEvents(IntPtr hDC, [In, Out] object pAddress, UInt32 count) - { - unsafe - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglReleaseImageBufferEventsI3D((IntPtr)hDC, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - - public static - Boolean ReleaseImageBufferEvents(IntPtr hDC, [In, Out] object pAddress, Int32 count) - { - unsafe - { - System.Runtime.InteropServices.GCHandle pAddress_ptr = System.Runtime.InteropServices.GCHandle.Alloc(pAddress, System.Runtime.InteropServices.GCHandleType.Pinned); - try - { - return Delegates.wglReleaseImageBufferEventsI3D((IntPtr)hDC, (IntPtr)pAddress_ptr.AddrOfPinnedObject(), (UInt32)count); - } - finally - { - pAddress_ptr.Free(); - } - } - } - - public static - Boolean EnableFrameLock() - { - return Delegates.wglEnableFrameLockI3D(); - } - - public static - Boolean DisableFrameLock() - { - return Delegates.wglDisableFrameLockI3D(); - } - - public static - Boolean IsEnabledFrameLock([Out] Boolean[] pFlag) - { - unsafe - { - fixed (Boolean* pFlag_ptr = pFlag) - { - return Delegates.wglIsEnabledFrameLockI3D((Boolean*)pFlag_ptr); - } - } - } - - public static - Boolean IsEnabledFrameLock([Out] out Boolean pFlag) - { - unsafe - { - fixed (Boolean* pFlag_ptr = &pFlag) - { - Boolean retval = Delegates.wglIsEnabledFrameLockI3D((Boolean*)pFlag_ptr); - pFlag = *pFlag_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean IsEnabledFrameLock([Out] Boolean* pFlag) - { - return Delegates.wglIsEnabledFrameLockI3D((Boolean*)pFlag); - } - - public static - Boolean QueryFrameLockMaster([Out] Boolean[] pFlag) - { - unsafe - { - fixed (Boolean* pFlag_ptr = pFlag) - { - return Delegates.wglQueryFrameLockMasterI3D((Boolean*)pFlag_ptr); - } - } - } - - public static - Boolean QueryFrameLockMaster([Out] out Boolean pFlag) - { - unsafe - { - fixed (Boolean* pFlag_ptr = &pFlag) - { - Boolean retval = Delegates.wglQueryFrameLockMasterI3D((Boolean*)pFlag_ptr); - pFlag = *pFlag_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean QueryFrameLockMaster([Out] Boolean* pFlag) - { - return Delegates.wglQueryFrameLockMasterI3D((Boolean*)pFlag); - } - - public static - Boolean GetFrameUsage([Out] float[] pUsage) - { - unsafe - { - fixed (float* pUsage_ptr = pUsage) - { - return Delegates.wglGetFrameUsageI3D((float*)pUsage_ptr); - } - } - } - - public static - Boolean GetFrameUsage([Out] out float pUsage) - { - unsafe - { - fixed (float* pUsage_ptr = &pUsage) - { - Boolean retval = Delegates.wglGetFrameUsageI3D((float*)pUsage_ptr); - pUsage = *pUsage_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean GetFrameUsage([Out] float* pUsage) - { - return Delegates.wglGetFrameUsageI3D((float*)pUsage); - } - - public static - Boolean BeginFrameTracking() - { - return Delegates.wglBeginFrameTrackingI3D(); - } - - public static - Boolean EndFrameTracking() - { - return Delegates.wglEndFrameTrackingI3D(); - } - - public static - Boolean QueryFrameTracking([Out] Int32[] pFrameCount, [Out] Int32[] pMissedFrames, [Out] float[] pLastMissedUsage) - { - unsafe - { - fixed (Int32* pFrameCount_ptr = pFrameCount) - fixed (Int32* pMissedFrames_ptr = pMissedFrames) - fixed (float* pLastMissedUsage_ptr = pLastMissedUsage) - { - return Delegates.wglQueryFrameTrackingI3D((Int32*)pFrameCount_ptr, (Int32*)pMissedFrames_ptr, (float*)pLastMissedUsage_ptr); - } - } - } - - public static - Boolean QueryFrameTracking([Out] out Int32 pFrameCount, [Out] out Int32 pMissedFrames, [Out] out float pLastMissedUsage) - { - unsafe - { - fixed (Int32* pFrameCount_ptr = &pFrameCount) - fixed (Int32* pMissedFrames_ptr = &pMissedFrames) - fixed (float* pLastMissedUsage_ptr = &pLastMissedUsage) - { - Boolean retval = Delegates.wglQueryFrameTrackingI3D((Int32*)pFrameCount_ptr, (Int32*)pMissedFrames_ptr, (float*)pLastMissedUsage_ptr); - pFrameCount = *pFrameCount_ptr; - pMissedFrames = *pMissedFrames_ptr; - pLastMissedUsage = *pLastMissedUsage_ptr; - return retval; - } - } - } - - [System.CLSCompliant(false)] - public static - unsafe Boolean QueryFrameTracking([Out] Int32* pFrameCount, [Out] Int32* pMissedFrames, [Out] float* pLastMissedUsage) - { - return Delegates.wglQueryFrameTrackingI3D((Int32*)pFrameCount, (Int32*)pMissedFrames, (float*)pLastMissedUsage); - } - - } - } } diff --git a/Source/OpenTK/Platform/Windows/Bindings/WglCore.cs b/Source/OpenTK/Platform/Windows/Bindings/WglCore.cs index b2bfa4db..9bd191ae 100644 --- a/Source/OpenTK/Platform/Windows/Bindings/WglCore.cs +++ b/Source/OpenTK/Platform/Windows/Bindings/WglCore.cs @@ -25,9 +25,6 @@ namespace OpenTK.Platform.Windows internal extern static Boolean MakeCurrent(IntPtr hDc, IntPtr newContext); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglCopyContext", ExactSpelling = true, SetLastError = true)] - internal extern static Boolean CopyContext(IntPtr hglrcSrc, IntPtr hglrcDst, UInt32 mask); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglChoosePixelFormat", ExactSpelling = true, SetLastError = true)] internal extern static unsafe int ChoosePixelFormat(IntPtr hDc, PixelFormatDescriptor* pPfd); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglDescribePixelFormat", ExactSpelling = true, SetLastError = true)] @@ -37,9 +34,6 @@ namespace OpenTK.Platform.Windows internal extern static IntPtr GetCurrentDC(); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetDefaultProcAddress", ExactSpelling = true, SetLastError = true)] - internal extern static IntPtr GetDefaultProcAddress(String lpszProc); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetProcAddress", ExactSpelling = true, SetLastError = true)] internal extern static IntPtr GetProcAddress(String lpszProc); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetPixelFormat", ExactSpelling = true, SetLastError = true)] @@ -53,42 +47,6 @@ namespace OpenTK.Platform.Windows [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglShareLists", ExactSpelling = true, SetLastError = true)] internal extern static Boolean ShareLists(IntPtr hrcSrvShare, IntPtr hrcSrvSource); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglCreateLayerContext", ExactSpelling = true, SetLastError = true)] - internal extern static IntPtr CreateLayerContext(IntPtr hDc, int level); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglDescribeLayerPlane", ExactSpelling = true)] - internal extern static unsafe Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, UInt32 nBytes, LayerPlaneDescriptor* plpd); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglSetLayerPaletteEntries", ExactSpelling = true)] - internal extern static unsafe int SetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetLayerPaletteEntries", ExactSpelling = true)] - internal extern static unsafe int GetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglRealizeLayerPalette", ExactSpelling = true)] - internal extern static Boolean RealizeLayerPalette(IntPtr hdc, int iLayerPlane, Boolean bRealize); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglSwapLayerBuffers", ExactSpelling = true)] - internal extern static Boolean SwapLayerBuffers(IntPtr hdc, UInt32 fuFlags); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontBitmapsA", CharSet = CharSet.Auto)] - internal extern static Boolean UseFontBitmapsA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontBitmapsW", CharSet = CharSet.Auto)] - internal extern static Boolean UseFontBitmapsW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontOutlinesA", CharSet = CharSet.Auto)] - internal extern static unsafe Boolean UseFontOutlinesA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontOutlinesW", CharSet = CharSet.Auto)] - internal extern static unsafe Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglMakeContextCurrentEXT", ExactSpelling = true, SetLastError = true)] - internal extern static Boolean MakeContextCurrentEXT(IntPtr hDrawDC, IntPtr hReadDC, IntPtr hglrc); - [System.Security.SuppressUnmanagedCodeSecurity()] - [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglChoosePixelFormatEXT", ExactSpelling = true, SetLastError = true)] - internal extern static unsafe Boolean ChoosePixelFormatEXT(IntPtr hdc, int* piAttribIList, Single* pfAttribFList, UInt32 nMaxFormats, [Out] int* piFormats, [Out] UInt32* nNumFormats); } } } diff --git a/Source/OpenTK/Platform/Windows/Bindings/WglDelegates.cs b/Source/OpenTK/Platform/Windows/Bindings/WglDelegates.cs index a9272038..ef2f16fc 100644 --- a/Source/OpenTK/Platform/Windows/Bindings/WglDelegates.cs +++ b/Source/OpenTK/Platform/Windows/Bindings/WglDelegates.cs @@ -53,36 +53,6 @@ namespace OpenTK.Platform.Windows internal delegate Boolean ShareLists(IntPtr hrcSrvShare, IntPtr hrcSrvSource); internal static ShareLists wglShareLists; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate IntPtr CreateLayerContext(IntPtr hDc, int level); - internal static CreateLayerContext wglCreateLayerContext; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, UInt32 nBytes, LayerPlaneDescriptor* plpd); - internal unsafe static DescribeLayerPlane wglDescribeLayerPlane; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate int SetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr); - internal unsafe static SetLayerPaletteEntries wglSetLayerPaletteEntries; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate int GetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr); - internal unsafe static GetLayerPaletteEntries wglGetLayerPaletteEntries; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean RealizeLayerPalette(IntPtr hdc, int iLayerPlane, Boolean bRealize); - internal static RealizeLayerPalette wglRealizeLayerPalette; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean SwapLayerBuffers(IntPtr hdc, UInt32 fuFlags); - internal static SwapLayerBuffers wglSwapLayerBuffers; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean UseFontBitmapsA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase); - internal static UseFontBitmapsA wglUseFontBitmapsA; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean UseFontBitmapsW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase); - internal static UseFontBitmapsW wglUseFontBitmapsW; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean UseFontOutlinesA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics); - internal unsafe static UseFontOutlinesA wglUseFontOutlinesA; - [System.Security.SuppressUnmanagedCodeSecurity()] - 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; - [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate IntPtr CreateContextAttribsARB(IntPtr hDC, IntPtr hShareContext, int* attribList); internal unsafe static CreateContextAttribsARB wglCreateContextAttribsARB; [System.Security.SuppressUnmanagedCodeSecurity()] @@ -190,120 +160,6 @@ namespace OpenTK.Platform.Windows [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate int GetSwapIntervalEXT(); internal static GetSwapIntervalEXT wglGetSwapIntervalEXT; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate IntPtr AllocateMemoryNV(Int32 size, Single readfreq, Single writefreq, Single priority); - internal unsafe static AllocateMemoryNV wglAllocateMemoryNV; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void FreeMemoryNV([Out] IntPtr pointer); - internal static FreeMemoryNV wglFreeMemoryNV; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetSyncValuesOML(IntPtr hdc, [Out] Int64* ust, [Out] Int64* msc, [Out] Int64* sbc); - internal unsafe static GetSyncValuesOML wglGetSyncValuesOML; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetMscRateOML(IntPtr hdc, [Out] Int32* numerator, [Out] Int32* denominator); - internal unsafe static GetMscRateOML wglGetMscRateOML; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Int64 SwapBuffersMscOML(IntPtr hdc, Int64 target_msc, Int64 divisor, Int64 remainder); - internal static SwapBuffersMscOML wglSwapBuffersMscOML; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Int64 SwapLayerBuffersMscOML(IntPtr hdc, int fuPlanes, Int64 target_msc, Int64 divisor, Int64 remainder); - internal static SwapLayerBuffersMscOML wglSwapLayerBuffersMscOML; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean WaitForMscOML(IntPtr hdc, Int64 target_msc, Int64 divisor, Int64 remainder, [Out] Int64* ust, [Out] Int64* msc, [Out] Int64* sbc); - internal unsafe static WaitForMscOML wglWaitForMscOML; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean WaitForSbcOML(IntPtr hdc, Int64 target_sbc, [Out] Int64* ust, [Out] Int64* msc, [Out] Int64* sbc); - internal unsafe static WaitForSbcOML wglWaitForSbcOML; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetDigitalVideoParametersI3D(IntPtr hDC, int iAttribute, [Out] int* piValue); - internal unsafe static GetDigitalVideoParametersI3D wglGetDigitalVideoParametersI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean SetDigitalVideoParametersI3D(IntPtr hDC, int iAttribute, int* piValue); - internal unsafe static SetDigitalVideoParametersI3D wglSetDigitalVideoParametersI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetGammaTableParametersI3D(IntPtr hDC, int iAttribute, [Out] int* piValue); - internal unsafe static GetGammaTableParametersI3D wglGetGammaTableParametersI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean SetGammaTableParametersI3D(IntPtr hDC, int iAttribute, int* piValue); - internal unsafe static SetGammaTableParametersI3D wglSetGammaTableParametersI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetGammaTableI3D(IntPtr hDC, int iEntries, [Out] UInt16* puRed, [Out] UInt16* puGreen, [Out] UInt16* puBlue); - internal unsafe static GetGammaTableI3D wglGetGammaTableI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean SetGammaTableI3D(IntPtr hDC, int iEntries, UInt16* puRed, UInt16* puGreen, UInt16* puBlue); - internal unsafe static SetGammaTableI3D wglSetGammaTableI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean EnableGenlockI3D(IntPtr hDC); - internal static EnableGenlockI3D wglEnableGenlockI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean DisableGenlockI3D(IntPtr hDC); - internal static DisableGenlockI3D wglDisableGenlockI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean IsEnabledGenlockI3D(IntPtr hDC, [Out] Boolean* pFlag); - internal unsafe static IsEnabledGenlockI3D wglIsEnabledGenlockI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean GenlockSourceI3D(IntPtr hDC, UInt32 uSource); - internal static GenlockSourceI3D wglGenlockSourceI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetGenlockSourceI3D(IntPtr hDC, [Out] UInt32* uSource); - internal unsafe static GetGenlockSourceI3D wglGetGenlockSourceI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean GenlockSourceEdgeI3D(IntPtr hDC, UInt32 uEdge); - internal static GenlockSourceEdgeI3D wglGenlockSourceEdgeI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetGenlockSourceEdgeI3D(IntPtr hDC, [Out] UInt32* uEdge); - internal unsafe static GetGenlockSourceEdgeI3D wglGetGenlockSourceEdgeI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean GenlockSampleRateI3D(IntPtr hDC, UInt32 uRate); - internal static GenlockSampleRateI3D wglGenlockSampleRateI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetGenlockSampleRateI3D(IntPtr hDC, [Out] UInt32* uRate); - internal unsafe static GetGenlockSampleRateI3D wglGetGenlockSampleRateI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean GenlockSourceDelayI3D(IntPtr hDC, UInt32 uDelay); - internal static GenlockSourceDelayI3D wglGenlockSourceDelayI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetGenlockSourceDelayI3D(IntPtr hDC, [Out] UInt32* uDelay); - internal unsafe static GetGenlockSourceDelayI3D wglGetGenlockSourceDelayI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean QueryGenlockMaxSourceDelayI3D(IntPtr hDC, [Out] UInt32* uMaxLineDelay, [Out] UInt32* uMaxPixelDelay); - internal unsafe static QueryGenlockMaxSourceDelayI3D wglQueryGenlockMaxSourceDelayI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate IntPtr CreateImageBufferI3D(IntPtr hDC, Int32 dwSize, UInt32 uFlags); - internal unsafe static CreateImageBufferI3D wglCreateImageBufferI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean DestroyImageBufferI3D(IntPtr hDC, IntPtr pAddress); - internal static DestroyImageBufferI3D wglDestroyImageBufferI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean AssociateImageBufferEventsI3D(IntPtr hDC, IntPtr* pEvent, IntPtr pAddress, Int32* pSize, UInt32 count); - internal unsafe static AssociateImageBufferEventsI3D wglAssociateImageBufferEventsI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean ReleaseImageBufferEventsI3D(IntPtr hDC, IntPtr pAddress, UInt32 count); - internal static ReleaseImageBufferEventsI3D wglReleaseImageBufferEventsI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean EnableFrameLockI3D(); - internal static EnableFrameLockI3D wglEnableFrameLockI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean DisableFrameLockI3D(); - internal static DisableFrameLockI3D wglDisableFrameLockI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean IsEnabledFrameLockI3D([Out] Boolean* pFlag); - internal unsafe static IsEnabledFrameLockI3D wglIsEnabledFrameLockI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean QueryFrameLockMasterI3D([Out] Boolean* pFlag); - internal unsafe static QueryFrameLockMasterI3D wglQueryFrameLockMasterI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean GetFrameUsageI3D([Out] float* pUsage); - internal unsafe static GetFrameUsageI3D wglGetFrameUsageI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean BeginFrameTrackingI3D(); - internal static BeginFrameTrackingI3D wglBeginFrameTrackingI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate Boolean EndFrameTrackingI3D(); - internal static EndFrameTrackingI3D wglEndFrameTrackingI3D; - [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate Boolean QueryFrameTrackingI3D([Out] Int32* pFrameCount, [Out] Int32* pMissedFrames, [Out] float* pLastMissedUsage); - internal unsafe static QueryFrameTrackingI3D wglQueryFrameTrackingI3D; } } }