GithubHelp home page GithubHelp logo

Failed to compile on macOS 10.15.3 about acid HOT 2 CLOSED

eqmg avatar eqmg commented on July 17, 2024
Failed to compile on macOS 10.15.3

from acid.

Comments (2)

mattparks avatar mattparks commented on July 17, 2024

Looks like I just forgot to include <unordered_map> in a few spots, and msdf-c inline methods also failed to be found. Also in macOS 10.14+ releases OpenAL soft must be installed. I made those changes here: 29320ed

Fixed to macOS are not complete yet, the upgrade from GLFW 3.3.1 to 3.3.2 has broke glfwCreateWindowSurface, and DPI scaling on macOS displays the engine at the wrong resolution.

from acid.

f32by avatar f32by commented on July 17, 2024

Thanks! I tried latest commit from ui branch and now tutorial 1 can run. However only 1/4 window is being rendered. Is it a bug caused by glfw? I tried glfw 3.3.1 but got the same result...


Update:
I found some explanations about incorrect viewport from glfw faq (https://www.glfw.org/faq.html). glfw developers recommend to use framebuffer size instead of window size on macOS. After glfw window creation, I called glfwGetFramebufferSize() to overwrite window size with actual framebuffer size. Now it can be rendered correctly:)

--- a/Sources/Devices/Window.cpp
+++ b/Sources/Devices/Window.cpp
@@ -125,6 +125,8 @@ Window::Window() :
                throw std::runtime_error("GLFW failed to create the window");
        }

+       glfwGetFramebufferSize(window, reinterpret_cast<int *>(&size.x), reinterpret_cast<int *>(&size.y));
+
        // Sets the user pointer.
        glfwSetWindowUserPointer(window, this);

from acid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.