4 * Created: March 1, 2013
5 * Copyright (c) 2013, Attachmate Corporation All Rights Reserved
11 * Derrived from... at http://developer.download.nvidia.com/opengl/includes/wglext.h
14 #define WGL_WGLEXT_PROTOTYPES 1
16 /* WGL_extensions_string extension */
17 typedef const char * (WINAPI
*PFNWGLGETEXTENSIONSSTRINGPROC
)(HDC
);
19 /* WGL_pixel_format extension */
20 typedef BOOL (WINAPI
*PFNWGLCHOOSEPIXELFORMATARBPROC
)(HDC
, const int *, const FLOAT
*, UINT
, int *, UINT
*);
23 * Accepted in the <piAttributes> parameter array of
24 * wglGetPixelFormatAttribivARB, and wglGetPixelFormatAttribfvARB, and
25 * as a type in the <piAttribIList> and <pfAttribFList> parameter
26 * arrays of wglChoosePixelFormatARB:
29 #ifndef WGL_ARB_make_current_read
30 #define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
31 #define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
34 #define WGL_NUMBER_PIXEL_FORMATS 0x2000
35 #define WGL_DRAW_TO_WINDOW 0x2001
36 #define WGL_DRAW_TO_BITMAP 0x2002
37 #define WGL_ACCELERATION 0x2003
38 #define WGL_NEED_PALETTE 0x2004
39 #define WGL_NEED_SYSTEM_PALETTE 0x2005
40 #define WGL_SWAP_LAYER_BUFFERS 0x2006
41 #define WGL_SWAP_METHOD 0x2007
42 #define WGL_NUMBER_OVERLAYS 0x2008
43 #define WGL_NUMBER_UNDERLAYS 0x2009
44 #define WGL_TRANSPARENT 0x200A
45 #define WGL_TRANSPARENT_RED_VALUE 0x2037
46 #define WGL_TRANSPARENT_GREEN_VALUE 0x2038
47 #define WGL_TRANSPARENT_BLUE_VALUE 0x2039
48 #define WGL_TRANSPARENT_ALPHA_VALUE 0x203A
49 #define WGL_TRANSPARENT_INDEX_VALUE 0x203B
50 #define WGL_SHARE_DEPTH 0x200C
51 #define WGL_SHARE_STENCIL 0x200D
52 #define WGL_SHARE_ACCUM 0x200E
53 #define WGL_SUPPORT_GDI 0x200F
54 #define WGL_SUPPORT_OPENGL 0x2010
55 #define WGL_DOUBLE_BUFFER 0x2011
56 #define WGL_STEREO 0x2012
57 #define WGL_PIXEL_TYPE 0x2013
58 #define WGL_COLOR_BITS 0x2014
59 #define WGL_RED_BITS 0x2015
60 #define WGL_RED_SHIFT 0x2016
61 #define WGL_GREEN_BITS 0x2017
62 #define WGL_GREEN_SHIFT 0x2018
63 #define WGL_BLUE_BITS 0x2019
64 #define WGL_BLUE_SHIFT 0x201A
65 #define WGL_ALPHA_BITS 0x201B
66 #define WGL_ALPHA_SHIFT 0x201C
67 #define WGL_ACCUM_BITS 0x201D
68 #define WGL_ACCUM_RED_BITS 0x201E
69 #define WGL_ACCUM_GREEN_BITS 0x201F
70 #define WGL_ACCUM_BLUE_BITS 0x2020
71 #define WGL_ACCUM_ALPHA_BITS 0x2021
72 #define WGL_DEPTH_BITS 0x2022
73 #define WGL_STENCIL_BITS 0x2023
74 #define WGL_AUX_BUFFERS 0x2024
75 #define WGL_SAMPLE_BUFFERS 0x2041
76 #define WGL_SAMPLES 0x2042
77 #define PFD_DRAW_TO_PBUFFER 0x4000
80 * Accepted as a value in the <piAttribIList> and <pfAttribFList>
81 * parameter arrays of wglChoosePixelFormatARB, and returned in the
82 * <piValues> parameter array of wglGetPixelFormatAttribivARB, and the
83 * <pfValues> parameter array of wglGetPixelFormatAttribfvARB:
85 #define WGL_NO_ACCELERATION 0x2025
86 #define WGL_GENERIC_ACCELERATION 0x2026
87 #define WGL_FULL_ACCELERATION 0x2027
89 #define WGL_SWAP_EXCHANGE 0x2028
90 #define WGL_SWAP_COPY 0x2029
91 #define WGL_SWAP_UNDEFINED 0x202A
93 #define WGL_TYPE_RGBA 0x202B
94 #define WGL_TYPE_COLORINDEX 0x202C
95 #define PFD_TYPE_FLOAT_RGBA 2
97 #ifndef WGL_EXT_make_current_read
98 #define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
101 #ifndef WGL_ARB_make_current_read
102 #define WGL_ARB_make_current_read 1
103 #ifdef WGL_WGLEXT_PROTOTYPES
104 extern BOOL WINAPI
wglMakeContextCurrentARB(HDC
, HDC
, HGLRC
);
105 extern HDC WINAPI
wglGetCurrentReadDCARB(void);
106 #endif /* WGL_WGLEXT_PROTOTYPES */
107 typedef BOOL (WINAPI
*PFNWGLMAKECONTEXTCURRENTARBPROC
)(HDC hDrawDC
, HDC hReadDC
, HGLRC hglrc
);
108 typedef HDC (WINAPI
*PFNWGLGETCURRENTREADDCARBPROC
)(void);
112 * Inits some function pointers and return number of formats.
113 * Returns 0 on failure.
115 extern HWND
getWindow(HINSTANCE hInst
, int x
, int y
, int w
, int h
, int format
);
116 extern BOOL
wglExtMakeContextCurrent(HWND did
, HWND rid
, HGLRC gid
);
117 extern BOOL
wglExtSwapBuffers(HWND
);
118 extern int wglExtChoosePixelFormat(const int *);
119 extern BOOL
wglExtInit(HINSTANCE
, WNDPROC
);
120 extern void wglExtDispose(HINSTANCE
);
121 LRESULT
storeDC(HWND hWnd
);
122 HDC
fetchDC(HWND hWnd
);