kodi
GLContextGLX.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "GLContext.h"
12 
13 #include <GL/glx.h>
14 
15 namespace KODI
16 {
17 namespace WINDOWING
18 {
19 namespace X11
20 {
21 
22 class CGLContextGLX : public CGLContext
23 {
24 public:
25  explicit CGLContextGLX(Display *dpy);
26  bool Refresh(bool force, int screen, Window glWindow, bool &newContext) override;
27  void Destroy() override;
28  void Detach() override;
29  void SetVSync(bool enable) override;
30  void SwapBuffers() override;
31  void QueryExtensions() override;
32  GLXWindow m_glxWindow = 0;
33  GLXContext m_glxContext = 0;
34 
35 protected:
36  bool IsSuitableVisual(XVisualInfo *vInfo);
37 
38  int (*m_glXGetVideoSyncSGI)(unsigned int*);
39  int (*m_glXWaitVideoSyncSGI)(int, int, unsigned int*);
40  int (*m_glXSwapIntervalMESA)(int);
41  PFNGLXSWAPINTERVALEXTPROC m_glXSwapIntervalEXT;
42  int m_nScreen;
43  int m_iVSyncErrors;
44  int m_vsyncMode;
45 };
46 
47 }
48 }
49 }
Definition: GLContextGLX.h:22
Definition: AudioDecoder.h:18
Definition: GLContext.h:16