Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
Muto::OpenGLContext Class Reference

#include <OpenGLContext.h>

Inheritance diagram for Muto::OpenGLContext:
Muto::GraphicsContext

Public Member Functions

void Init () override
 Initializes the graphics context.
 
 OpenGLContext (GLFWwindow *windowHandle)
 
void SwapBuffers () override
 
virtual ~OpenGLContext ()
 
- Public Member Functions inherited from Muto::GraphicsContext
virtual ~GraphicsContext ()
 

Private Attributes

GLFWwindow * m_WindowHandle
 

Constructor & Destructor Documentation

◆ OpenGLContext()

Muto::OpenGLContext::OpenGLContext ( GLFWwindow *  windowHandle)
13 {
14 MU_CORE_ASSERT(windowHandle, "Window handle is null!");
15
16 }
#define MU_CORE_ASSERT(x,...)
Definition Asserts.h:32
GLFWwindow * m_WindowHandle
Definition OpenGLContext.h:16
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51

References m_WindowHandle.

◆ ~OpenGLContext()

Muto::OpenGLContext::~OpenGLContext ( )
virtual
19 {
20 }

Member Function Documentation

◆ Init()

void Muto::OpenGLContext::Init ( )
overridevirtual

Initializes the graphics context.

Implements Muto::GraphicsContext.

23 {
25
28 MU_CORE_ASSERT(status, "Failed to initialize Glad!");
29 MU_CORE_INFO("OpenGL Info:");
30 MU_CORE_INFO(" Vendor: {0}", (const char *)glGetString(GL_VENDOR));
31 MU_CORE_INFO(" Renderer: {0}", (const char *)glGetString(GL_RENDERER));
32 MU_CORE_INFO(" Version: {0}", (const char *)glGetString(GL_VERSION));
33
34#ifdef MU_ENABLE_ASSERTS
35 int major = 0, minor = 0;
38 MU_CORE_ASSERT(major > 4 || (major == 4 && minor >= 5), "Muto requires at least OpenGL version 4.5!");
39#endif
40
41 }
#define MU_PROFILE_FUNCTION()
Definition Instrumentor.h:240
#define MU_CORE_INFO(...)
info: general information about application flow
Definition Log.h:38

References m_WindowHandle.

◆ SwapBuffers()

void Muto::OpenGLContext::SwapBuffers ( )
overridevirtual

Member Data Documentation

◆ m_WindowHandle

GLFWwindow* Muto::OpenGLContext::m_WindowHandle
private

Referenced by Init(), OpenGLContext(), and SwapBuffers().


The documentation for this class was generated from the following files: