; OpenGL wgl prototypes
;
; Convert to asm by Franck Charlet

wglCopyContext proto :dword, :dword, :dword
wglCreateContext proto :dword
wglCreateLayerContext proto :dword, :dword
wglDeleteContext proto :dword
wglGetCurrentContext proto
wglGetCurrentDC proto
wglGetProcAddress proto :dword
wglMakeCurrent proto :dword, :dword
wglShareLists proto :dword, :dword
wglUseFontBitmapsA proto :dword, :dword, :dword, :dword
wglUseFontBitmapsW proto :dword, :dword, :dword, :dword
ifdef UNICODE
wglUseFontBitmaps  equ <wglUseFontBitmapsW>
else
wglUseFontBitmaps  equ <wglUseFontBitmapsA>
endif ; !UNICODE
SwapBuffers proto :dword

;POINTFLOAT STRUCT
; x real4 ?
; y real4 ?
;POINTFLOAT ENDS

;GLYPHMETRICSFLOAT STRUCT
;gmfBlackBoxX real4 ?
;gmfBlackBoxY real4 ?
;gmfptGlyphOrigin POINTFLOAT <>
;gmfCellIncX real4 ?
;gmfCellIncY real4 ?
;GLYPHMETRICSFLOAT ENDS

WGL_FONT_LINES equ 0
WGL_FONT_POLYGONS equ 1
wglUseFontOutlinesA proto :dword, :dword, :dword, :dword, :dword, :dword, :dword, :dword
wglUseFontOutlinesW proto :dword, :dword, :dword, :dword, :dword, :dword, :dword, :dword
ifdef UNICODE
wglUseFontOutlines equ <wglUseFontOutlinesW>
else
wglUseFontOutlines equ <wglUseFontOutlinesA>
endif ; !UNICODE

; Layer plane descriptor
LAYERPLANEDESCRIPTOR STRUCT
    nSize word ?
    nVersion word ?
    dwFlags dword ?
    iPixelType byte ?
    cColorBits byte ?
    cRedBits byte ?
    cRedShift byte ?
    cGreenBits byte ?
    cGreenShift byte ?
    cBlueBits byte ?
    cBlueShift byte ?
    cAlphaBits byte ?
    cAlphaShift byte ?
    cAccumBits byte ?
    cAccumRedBits byte ? 
    cAccumGreenBits byte ?
    cAccumBlueBits byte ?
    cAccumAlphaBits byte ?
    cDepthBits byte ?
    cStencilBits byte ?
    cAuxBuffers byte ?
    iLayerPlane byte ?
    bReserved byte ?
    crTransparent COLORREF ?
LAYERPLANEDESCRIPTOR ENDS

; LAYERPLANEDESCRIPTOR flags
LPD_DOUBLEBUFFER equ 000000001h
LPD_STEREO equ 000000002h
LPD_SUPPORT_GDI equ 000000010h
LPD_SUPPORT_OPENGL equ 000000020h
LPD_SHARE_DEPTH equ 000000040h
LPD_SHARE_STENCIL equ 000000080h
LPD_SHARE_ACCUM equ 000000100h
LPD_SWAP_EXCHANGE equ 000000200h
LPD_SWAP_COPY equ 000000400h
LPD_TRANSPARENT equ 000001000h

LPD_TYPE_RGBA equ 0
LPD_TYPE_COLORINDEX equ 1

; wglSwapLayerBuffers flags
WGL_SWAP_MAIN_PLANE     equ 000000001h
WGL_SWAP_OVERLAY1       equ 000000002h
WGL_SWAP_OVERLAY2       equ 000000004h
WGL_SWAP_OVERLAY3       equ 000000008h
WGL_SWAP_OVERLAY4       equ 000000010h
WGL_SWAP_OVERLAY5       equ 000000020h
WGL_SWAP_OVERLAY6       equ 000000040h
WGL_SWAP_OVERLAY7       equ 000000080h
WGL_SWAP_OVERLAY8       equ 000000100h
WGL_SWAP_OVERLAY9       equ 000000200h
WGL_SWAP_OVERLAY10      equ 000000400h
WGL_SWAP_OVERLAY11      equ 000000800h
WGL_SWAP_OVERLAY12      equ 000001000h
WGL_SWAP_OVERLAY13      equ 000002000h
WGL_SWAP_OVERLAY14      equ 000004000h
WGL_SWAP_OVERLAY15      equ 000008000h
WGL_SWAP_UNDERLAY1      equ 000010000h
WGL_SWAP_UNDERLAY2      equ 000020000h
WGL_SWAP_UNDERLAY3      equ 000040000h
WGL_SWAP_UNDERLAY4      equ 000080000h
WGL_SWAP_UNDERLAY5      equ 000100000h
WGL_SWAP_UNDERLAY6      equ 000200000h
WGL_SWAP_UNDERLAY7      equ 000400000h
WGL_SWAP_UNDERLAY8      equ 000800000h
WGL_SWAP_UNDERLAY9      equ 001000000h
WGL_SWAP_UNDERLAY10     equ 002000000h
WGL_SWAP_UNDERLAY11     equ 004000000h
WGL_SWAP_UNDERLAY12     equ 008000000h
WGL_SWAP_UNDERLAY13     equ 010000000h
WGL_SWAP_UNDERLAY14     equ 020000000h
WGL_SWAP_UNDERLAY15     equ 040000000h

wglDescribeLayerPlane proto :dword, :dword, :dword, :dword, :dword
wglSetLayerPaletteEntries proto :dword, :dword, :dword, :dword, :dword
wglGetLayerPaletteEntries proto :dword, :dword, :dword, :dword, :dword
wglRealizeLayerPalette proto :dword, :dword, :dword
wglSwapLayerBuffers proto :dword, :dword

;ifdef WINVER
;if WINVER >= 00500h
;WGLSWAP STRUCT
;;    hdc HDC ?
;    uiFlags UINT ?
;WGLSWAP ENDS
;WGL_SWAPMULTIPLE_MAX equ 16
;wglSwapMultipleBuffers proto :dword, :dword
;endif ; (WINVER >= 00500h
;endif