Debian Codegraph @

Source/Core/Common/GL/GLInterface/AGL.h

raw symbols SCIP
1 // Copyright 2008 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 // This define will silence all "OpenGL is deprecated, use Metal" warnings.
7 #define GL_SILENCE_DEPRECATION 1
8
9 #if defined(__APPLE__) && defined(__OBJC__)
10 #import <AppKit/AppKit.h>
11 #else
12 struct NSOpenGLContext;
13 struct NSOpenGLPixelFormat;
14 struct NSView;
15 #endif
16
17 #include "Common/GL/GLContext.h"
18
19 class GLContextAGL final : public GLContext
20 {
21 public:
22 ~GLContextAGL() override;
23
24 bool IsHeadless() const override;
25
26 std::unique_ptr<GLContext> CreateSharedContext() override;
27
28 bool MakeCurrent() override;
29 bool ClearCurrent() override;
30
31 void Update() override;
32
33 void Swap() override;
34 void SwapInterval(int interval) override;
35
36 protected:
37 bool Initialize(const WindowSystemInfo& wsi, bool stereo, bool core) override;
38
39 NSView* m_view = nullptr;
40 NSOpenGLContext* m_context = nullptr;
41 NSOpenGLPixelFormat* m_pixel_format = nullptr;
42 };