GearEngine  0.0.1
Gear::OpenGLContext 클래스 참조

#include <OpenGLContext.h>

Gear::OpenGLContext에 대한 상속 다이어그램 :
Inheritance graph
Gear::OpenGLContext에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

 OpenGLContext (GLFWwindow *windowHandle)
 
virtual void init () override
 
virtual void SwapBuffers () override
 

Private 속성

GLFWwindow * m_WindowHandle
 

상세한 설명

OpenGLContext.h 파일의 8 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ OpenGLContext()

Gear::OpenGLContext::OpenGLContext ( GLFWwindow *  windowHandle)

OpenGLContext.cpp 파일의 9 번째 라인에서 정의되었습니다.

10  : m_WindowHandle(windowHandle)
11  {
12  GR_CORE_ASSERT(windowHandle, "Window hadle is null!")
13  }

멤버 함수 문서화

◆ init()

void Gear::OpenGLContext::init ( )
overridevirtual

Gear::GraphicsContext를 구현.

OpenGLContext.cpp 파일의 15 번째 라인에서 정의되었습니다.

16  {
18 
19  glfwMakeContextCurrent(m_WindowHandle);
20  int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
21  GR_CORE_ASSERT(status, "Failed to initialize Glad!");
22  GR_CORE_INFO("OpenGL Info:");
23  GR_CORE_INFO("Vendor : {0}", glGetString(GL_VENDOR));
24  GR_CORE_INFO("Renderer : {0}", glGetString(GL_RENDERER));
25  GR_CORE_INFO("Version : {0}", glGetString(GL_VERSION));
26 
27  #ifdef GR_ENABLE_ASSERTS
28  int versionMajor;
29  int versionMinor;
30  glGetIntegerv(GL_MAJOR_VERSION, &versionMajor);
31  glGetIntegerv(GL_MINOR_VERSION, &versionMinor);
32 
33  GR_CORE_ASSERT(versionMajor > 4 || (versionMajor == 4 && versionMinor >= 5), "Gear requires at least OpenGL version 4.5!");
34  #endif
35  }

◆ SwapBuffers()

void Gear::OpenGLContext::SwapBuffers ( )
overridevirtual

Gear::GraphicsContext를 구현.

OpenGLContext.cpp 파일의 37 번째 라인에서 정의되었습니다.

38  {
40 
41  glfwSwapBuffers(m_WindowHandle);
42  }

멤버 데이터 문서화

◆ m_WindowHandle

GLFWwindow* Gear::OpenGLContext::m_WindowHandle
private

OpenGLContext.h 파일의 18 번째 라인에서 정의되었습니다.


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.:
Gear::OpenGLContext::m_WindowHandle
GLFWwindow * m_WindowHandle
Definition: OpenGLContext.h:18
GR_PROFILE_FUNCTION
#define GR_PROFILE_FUNCTION()
Definition: Instrumentor.h:131
GR_CORE_ASSERT
#define GR_CORE_ASSERT(x,...)
Definition: Core.h:68
GR_CORE_INFO
#define GR_CORE_INFO(...)
Definition: Log.h:27