mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-27 06:19:51 -05:00
Make onscreen gui not break if resolution is changed
This commit is contained in:
+1
-1
Submodule ext/ghoul updated: 7f72d4ec0a...559b2bee29
@@ -74,7 +74,7 @@ namespace {
|
||||
// Setup orthographic projection matrix
|
||||
const float width = ImGui::GetIO().DisplaySize.x;
|
||||
const float height = ImGui::GetIO().DisplaySize.y;
|
||||
static const glm::mat4 ortho(
|
||||
const glm::mat4 ortho(
|
||||
2.f / width, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 2.0f / -height, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, -1.0f, 0.0f,
|
||||
@@ -242,18 +242,17 @@ void GUI::initializeGL() {
|
||||
void GUI::deinitializeGL() {
|
||||
_program = nullptr;
|
||||
|
||||
if (vao) glDeleteVertexArrays(1, &vao);
|
||||
if (vbo) glDeleteBuffers(1, &vbo);
|
||||
glDeleteVertexArrays(1, &vao);
|
||||
glDeleteBuffers(1, &vbo);
|
||||
|
||||
_property.deinitializeGL();
|
||||
_performance.deinitializeGL();
|
||||
_help.deinitializeGL();
|
||||
}
|
||||
|
||||
void GUI::startFrame(float deltaTime,
|
||||
const glm::vec2& windowSize,
|
||||
const glm::vec2& mousePos,
|
||||
uint32_t mouseButtonsPressed)
|
||||
void GUI::startFrame(float deltaTime, const glm::vec2& windowSize,
|
||||
const glm::vec2& mousePos,
|
||||
uint32_t mouseButtonsPressed)
|
||||
{
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
Reference in New Issue
Block a user