Skip to content

Commit

Permalink
Pull from main
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMKW committed Nov 18, 2023
2 parents 7e06f82 + 108f9e7 commit e52863a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions include/gui/scene/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

#include "gui/clipboard.hpp"
#include "gui/property/property.hpp"
#include "gui/scene/billboard.hpp"
#include "gui/scene/camera.hpp"
#include "gui/scene/nodeinfo.hpp"
#include "gui/scene/objdialog.hpp"
#include "gui/scene/path.hpp"
#include "gui/window.hpp"

#include <gui/context_menu.hpp>
Expand Down
10 changes: 6 additions & 4 deletions src/gui/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ namespace Toolbox {
this->vPos = inPos;
};

// The projection matrix
void Camera::privUpdateProjectionMatrix(void) {
this->projMatrix = glm::perspective(fovy, aspectRatio, nearDist, farDist);
};
// The projection matrix
void Camera::privUpdateProjectionMatrix(void) {
if (aspectRatio < 1)
return;
this->projMatrix = glm::perspective(fovy, aspectRatio, nearDist, farDist);
};

void Camera::privUpdateViewMatrix(void) {
this->viewMatrix = glm::lookAt(vPos, vPos + vDir, vUp);
Expand Down
10 changes: 9 additions & 1 deletion src/gui/scene/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,15 @@ namespace Toolbox::UI {

buildCreateObjDialog();
buildRenameObjDialog();
}

if (!m_path_renderer.initPathRenderer()) {
// show some error
}

// 128x128 billboards, 10 unique images
if (!m_billboard_renderer.initBillboardRenderer(128, 10)) {
// show some error
}

m_billboard_renderer.loadBillboardTexture("res/question.png", 0);
}
Expand Down

0 comments on commit e52863a

Please sign in to comment.