cleaned up ImGui a bit
This commit is contained in:
@@ -60,6 +60,7 @@ bool Display::Create( const DisplayProperties& properties )
|
||||
|
||||
Aeon::Rendering::SetupImGui( mWindow, mContext );
|
||||
|
||||
// Make sure ImGUI is ready to be used on the first frame
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui_ImplSDL2_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
@@ -77,7 +78,7 @@ const unsigned int Display::GetHeight()
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
SDL_Window* Display::GetWindow()
|
||||
const SDL_Window* Display::GetWindow()
|
||||
{
|
||||
return mWindow;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
const unsigned int GetWidth();
|
||||
const unsigned int GetHeight();
|
||||
|
||||
SDL_Window* GetWindow();
|
||||
const SDL_Window* GetWindow();
|
||||
const SDL_GLContext& GetContext();
|
||||
|
||||
void SetClearColour( float r, float g, float b, float a = 1.0f );
|
||||
|
||||
0
Aeon/Rendering/Device/OpenGL/Shader.hpp
Normal file
0
Aeon/Rendering/Device/OpenGL/Shader.hpp
Normal file
@@ -1,6 +1,8 @@
|
||||
#ifndef AEON_RENDERING_IMGUI_H_
|
||||
#define AEON_RENDERING_IMGUI_H_
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <SDL.h>
|
||||
extern "C" {
|
||||
#include <ThirdParty/glad.h>
|
||||
@@ -13,14 +15,14 @@ extern "C" {
|
||||
namespace Aeon::Rendering
|
||||
{
|
||||
|
||||
inline void SetupImGui( SDL_Window* window, const SDL_GLContext& context )
|
||||
inline void SetupImGui( const SDL_Window* window, const SDL_GLContext& context )
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
static ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
ImGui_ImplSDL2_InitForOpenGL( window, context );
|
||||
ImGui_ImplSDL2_InitForOpenGL( const_cast<SDL_Window*>(window), context );
|
||||
ImGui_ImplOpenGL3_Init( "#version 450" );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user