GearEngine  0.0.1
Gear::ImGuiLayer 클래스 참조

#include <ImGuiLayer.h>

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

Public 멤버 함수

 ImGuiLayer ()
 
 ~ImGuiLayer ()
 
virtual void OnAttach () override
 
virtual void OnDetach () override
 
void Begin ()
 
void End ()
 
virtual void OnUpdate (Timestep ts)
 
virtual void OnImGuiRender ()
 
virtual void OnEvent (Event &event)
 
const std::string & GetName () const
 

Protected 속성

std::string m_DebugName
 

Private 속성

float m_Time = 0.0f
 

상세한 설명

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

생성자 & 소멸자 문서화

◆ ImGuiLayer()

Gear::ImGuiLayer::ImGuiLayer ( )

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

18  : Layer("ImGuiLayer")
19  {
20  }

◆ ~ImGuiLayer()

Gear::ImGuiLayer::~ImGuiLayer ( )

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

23  {
24  }

멤버 함수 문서화

◆ Begin()

void Gear::ImGuiLayer::Begin ( )

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

70  {
72 
73  ImGui_ImplOpenGL3_NewFrame();
74  ImGui_ImplGlfw_NewFrame();
75  ImGui::NewFrame();
76  }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ End()

void Gear::ImGuiLayer::End ( )

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

79  {
81 
82  ImGuiIO& io = ImGui::GetIO();
83  Application& app = Application::Get();
84  io.DisplaySize = ImVec2((float)app.GetWindow().GetWidth(), (float)app.GetWindow().GetHeight());
85 
86  //Rendering
87  ImGui::Render();
88  ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
89 
90  if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
91  {
92  GLFWwindow* backup_current_context = glfwGetCurrentContext();
93  ImGui::UpdatePlatformWindows();
94  ImGui::RenderPlatformWindowsDefault();
95  glfwMakeContextCurrent(backup_current_context);
96  }
97  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetName()

const std::string& Gear::Layer::GetName ( ) const
inlineinherited

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

20 { return m_DebugName; }

◆ OnAttach()

void Gear::ImGuiLayer::OnAttach ( )
overridevirtual

Gear::Layer(으)로부터 재구현되었습니다.

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

27  {
29 
30  //Setup dear ImGui context
31  IMGUI_CHECKVERSION();
32  ImGui::CreateContext();
33  ImGuiIO& io = ImGui::GetIO(); (void)io;
34  io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
35  //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
36  io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking
37  io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows
38  //io.ConfigViewportsNoAutoMerge = true;
39  //io.ConfigViewportsNoTaskBarIcon = true;
40 
41  // Setup Dear ImGui style
42  ImGui::StyleColorsDark();
43  //ImGui::StyleColorsClassic();
44 
45  //When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
46  ImGuiStyle& style = ImGui::GetStyle();
47  if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
48  {
49  style.WindowRounding = 0.0f;
50  style.Colors[ImGuiCol_WindowBg].w = 1.0f;
51  }
52  Application& app = Application::Get();
53  GLFWwindow* window = static_cast<GLFWwindow*>(app.GetWindow().GetNativeWindow());
54 
55  // Setup Platform/Renderer bindings
56  ImGui_ImplGlfw_InitForOpenGL(window, true);
57  ImGui_ImplOpenGL3_Init("#version 410");
58  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnDetach()

void Gear::ImGuiLayer::OnDetach ( )
overridevirtual

Gear::Layer(으)로부터 재구현되었습니다.

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

61  {
63 
64  ImGui_ImplOpenGL3_Shutdown();
65  ImGui_ImplGlfw_Shutdown();
66  ImGui::DestroyContext();
67  }

◆ OnEvent()

virtual void Gear::Layer::OnEvent ( Event event)
inlinevirtualinherited

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

18 {}

◆ OnImGuiRender()

virtual void Gear::Layer::OnImGuiRender ( )
inlinevirtualinherited

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

17 {}

◆ OnUpdate()

virtual void Gear::Layer::OnUpdate ( Timestep  ts)
inlinevirtualinherited

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

16 {}

멤버 데이터 문서화

◆ m_DebugName

std::string Gear::Layer::m_DebugName
protectedinherited

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

◆ m_Time

float Gear::ImGuiLayer::m_Time = 0.0f
private

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


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.:
Gear::Layer::m_DebugName
std::string m_DebugName
Definition: Layer.h:22
Gear::Application::Get
static Application & Get()
Definition: Application.h:27
Gear::Layer::Layer
Layer(const std::string &name="Layer")
Definition: Layer.cpp:5
GR_PROFILE_FUNCTION
#define GR_PROFILE_FUNCTION()
Definition: Instrumentor.h:131