Code Monkey home page Code Monkey logo

Comments (2)

dapetcu21 avatar dapetcu21 commented on June 11, 2024

What would be the use case of this? You can always get the size of the window when the window is full screen. You'll also be able to get it if we implement #87.

I would be against setting the screen resolution, though. On macOS, at least, that's bad practice. This was a useful practice on CRT screens, but on LCD, your pixels are scaled anyway.

From Apple's documentation: Avoid changing the display resolution from that chosen by the user. If your application needs to render data at a lower resolution for performance reasons, you can explicitly create a back buffer at the desired resolution and allow OpenGL to scale those results to the display. See Controlling the Back Buffer Size.

On macOS this has other implications like having to capture the display and not allowing the user to do basic things like Cmd+Tab away or change their media volume. I've seen way too many games get this wrong...

from defos.

rgrams avatar rgrams commented on June 11, 2024

Hmm, that's a good point. Perhaps I am outdated in my thinking. I certainly agree that changing the display resolution is bad. And changing the game's resolution would be done on the game side of things (render target and whatnot). If you can get the full size of the display with #87, that would be fine.

from defos.

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.