gitlab-ci: enable sanitizers for the meson builds
[mesa-waffle.git] / src / waffle / wgl / wgl_display.h
blob4874e55b58495d63fbd000ef159ed99c6c80bfb3
1 // SPDX-FileCopyrightText: Copyright 2014 Emil Velikov
2 // SPDX-License-Identifier: BSD-2-Clause
4 #pragma once
6 #include <stdbool.h>
7 #include <stdint.h>
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,
16 HGLRC hShareContext,
17 const int *attribList);
19 typedef BOOL (__stdcall *PFNWGLCHOOSEPIXELFORMATARBPROC )(HDC hdc,
20 const int * piAttribIList,
21 const float * pfAttribFList,
22 unsigned int nMaxFormats,
23 int * piFormats,
24 unsigned int * nNumFormats);
26 struct wgl_display {
27 struct wcore_display wcore;
29 HWND hWnd;
30 HDC hDC;
31 int pixel_format;
32 HGLRC hglrc;
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;
51 struct wcore_display*
52 wgl_display_connect(struct wcore_platform *wc_plat,
53 const char *name);
55 bool
56 wgl_display_destroy(struct wcore_display *wc_self);
58 bool
59 wgl_display_supports_context_api(struct wcore_display *wc_self,
60 int32_t context_api);