enable (broken) visibility test for BSP, remov imgui cleanup until it stops segfaulting on me
This commit is contained in:
parent
87d310b55c
commit
8158a61f10
@ -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);
|
||||
|
||||
@ -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();
|
||||
}
|
||||
@ -14,10 +14,11 @@ 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);
|
||||
|
||||
|
||||
auto in = win.getInput();
|
||||
Renderer ren(win);
|
||||
in->setCursor(false);
|
||||
@ -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");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user