From a2c3050c5191c0588c8bf4dbfa65301c87eb1573 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 9 Jan 2022 23:57:13 -0600 Subject: [PATCH] Common: Formatting --- common/GL/Context.h | 98 ++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/common/GL/Context.h b/common/GL/Context.h index 613c71e014..cf0a6e4c8c 100644 --- a/common/GL/Context.h +++ b/common/GL/Context.h @@ -23,64 +23,64 @@ #include namespace GL { -class Context -{ -public: - Context(const WindowInfo& wi); - virtual ~Context(); + class Context + { + public: + Context(const WindowInfo& wi); + virtual ~Context(); - enum class Profile - { - NoProfile, - Core, - ES - }; + enum class Profile + { + NoProfile, + Core, + ES + }; - struct Version - { - Profile profile; - int major_version; - int minor_version; - }; + struct Version + { + Profile profile; + int major_version; + int minor_version; + }; - struct FullscreenModeInfo - { - u32 width; - u32 height; - float refresh_rate; - }; + struct FullscreenModeInfo + { + u32 width; + u32 height; + float refresh_rate; + }; - __fi const WindowInfo& GetWindowInfo() const { return m_wi; } - __fi bool IsGLES() const { return (m_version.profile == Profile::ES); } - __fi u32 GetSurfaceWidth() const { return m_wi.surface_width; } - __fi u32 GetSurfaceHeight() const { return m_wi.surface_height; } + __fi const WindowInfo& GetWindowInfo() const { return m_wi; } + __fi bool IsGLES() const { return (m_version.profile == Profile::ES); } + __fi u32 GetSurfaceWidth() const { return m_wi.surface_width; } + __fi u32 GetSurfaceHeight() const { return m_wi.surface_height; } - virtual void* GetProcAddress(const char* name) = 0; - virtual bool ChangeSurface(const WindowInfo& new_wi) = 0; - virtual void ResizeSurface(u32 new_surface_width = 0, u32 new_surface_height = 0) = 0; - virtual bool SwapBuffers() = 0; - virtual bool MakeCurrent() = 0; - virtual bool DoneCurrent() = 0; - virtual bool SetSwapInterval(s32 interval) = 0; - virtual std::unique_ptr CreateSharedContext(const WindowInfo& wi) = 0; + virtual void* GetProcAddress(const char* name) = 0; + virtual bool ChangeSurface(const WindowInfo& new_wi) = 0; + virtual void ResizeSurface(u32 new_surface_width = 0, u32 new_surface_height = 0) = 0; + virtual bool SwapBuffers() = 0; + virtual bool MakeCurrent() = 0; + virtual bool DoneCurrent() = 0; + virtual bool SetSwapInterval(s32 interval) = 0; + virtual std::unique_ptr CreateSharedContext(const WindowInfo& wi) = 0; - virtual std::vector EnumerateFullscreenModes(); + virtual std::vector EnumerateFullscreenModes(); - static std::unique_ptr Create(const WindowInfo& wi, const Version* versions_to_try, - size_t num_versions_to_try); + static std::unique_ptr Create(const WindowInfo& wi, const Version* versions_to_try, + size_t num_versions_to_try); - template - static std::unique_ptr Create(const WindowInfo& wi, const std::array& versions_to_try) - { - return Create(wi, versions_to_try.data(), versions_to_try.size()); - } + template + static std::unique_ptr Create(const WindowInfo& wi, const std::array& versions_to_try) + { + return Create(wi, versions_to_try.data(), versions_to_try.size()); + } - static std::unique_ptr Create(const WindowInfo& wi) { return Create(wi, GetAllVersionsList()); } + static std::unique_ptr Create(const WindowInfo& wi) { return Create(wi, GetAllVersionsList()); } - static const std::array& GetAllVersionsList(); + static const std::array& GetAllVersionsList(); -protected: - WindowInfo m_wi; - Version m_version = {}; -}; + protected: + WindowInfo m_wi; + Version m_version = {}; + }; } // namespace GL