1 // SPDX-FileCopyrightText: Copyright 2014 Emil Velikov
2 // SPDX-License-Identifier: BSD-2-Clause
9 #include "wcore_display.h"
10 #include "wcore_util.h"
12 struct wcore_platform
;
14 // XXX: Move the typedefs ?
15 typedef HGLRC (__stdcall
*PFNWGLCREATECONTEXTATTRIBSARBPROC
)(HDC hDC
,
17 const int *attribList
);
19 typedef BOOL (__stdcall
*PFNWGLCHOOSEPIXELFORMATARBPROC
)(HDC hdc
,
20 const int * piAttribIList
,
21 const float * pfAttribFList
,
22 unsigned int nMaxFormats
,
24 unsigned int * nNumFormats
);
27 struct wcore_display wcore
;
34 bool ARB_create_context
;
35 bool ARB_create_context_profile
;
36 bool ARB_create_context_robustness
;
37 bool EXT_create_context_es_profile
;
38 bool EXT_create_context_es2_profile
;
39 bool ARB_pixel_format
;
41 PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB
;
42 PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB
;
45 static inline struct wgl_display
*
46 wgl_display(struct wcore_display
*wcore
)
48 return (struct wgl_display
*)wcore
;
52 wgl_display_connect(struct wcore_platform
*wc_plat
,
56 wgl_display_destroy(struct wcore_display
*wc_self
);
59 wgl_display_supports_context_api(struct wcore_display
*wc_self
,