enable (broken) visibility test for BSP, remov imgui cleanup until it stops segfaulting on me

This commit is contained in:
connellpaxton 2025-08-28 09:33:34 -04:00
parent 87d310b55c
commit 8158a61f10
3 changed files with 7 additions and 6 deletions

View File

@ -43,8 +43,7 @@ static inline glm::vec2 calc_tex_coords(glm::vec3 v, const TexInfo& t) {
void BSP::load_vertices(const glm::vec3& cam_pos, bool visibility_test, const glm::mat4& view) {
std::set<int> present_faces;
std::vector<Face> visible_faces;
// if (visibility_test) {
if(false) {
if (visibility_test) {
auto leaf_idx = determine_leaf(cam_pos);
auto fr_planes = frustum(view);

View File

@ -172,5 +172,8 @@ UI::~UI() {
dev.destroyDescriptorPool(desc_pool);
ImGui_ImplVulkan_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();
// for whatever reason, this segfaults with a read to -1 when it tries saving characteristics.
// TOOD: Debug
// ImGui::DestroyContext();
}

View File

@ -14,6 +14,7 @@ int main(int argc, char* argv[]) {
try {
Window win(argv[0], 256, 512);
// for fullscreen
auto mon = glfwGetPrimaryMonitor();
auto v = glfwGetVideoMode(mon);
glfwSetWindowMonitor(win.win, mon, 0, 0, v->width, v->height, v->refreshRate);
@ -64,7 +65,6 @@ int main(int argc, char* argv[]) {
} else if (event.key.key == GLFW_KEY_Q && event.key.state == GLFW_PRESS) {
if (!ren.in_menu) {
ren.should_close = true;
goto quit;
}
}
break;
@ -86,6 +86,5 @@ int main(int argc, char* argv[]) {
std::cerr << "Exception: " << e << std::endl;
}
quit:
Log::info("Quitting\n");
}