Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen doesn't fit screen appropriately (Macbook Pro Retina) #20

Closed
johnjelinek opened this issue Dec 14, 2013 · 11 comments
Closed

Comments

@johnjelinek
Copy link
Contributor

Example from example 01:

fullscreen_12_14_13__3_05_pm

@johnjelinek
Copy link
Contributor Author

My appropriate resolution should be 1440x960 but I think it's trying to do the full retina display resolution.

@johnjelinek
Copy link
Contributor Author

Here is another example. I think the problem is that the retina MBPs run pixel doubled at the standard resolution.

fullscreen_12_14_13__6_07_pm

@johnjelinek
Copy link
Contributor Author

More screenshots:

fullscreen_12_14_13__6_25_pm

fullscreen_12_14_13__6_27_pm

As you can see, the full screen window is double the size of my display.

@johnjelinek
Copy link
Contributor Author

Looking at this a bit closer, I see this when reviewing my display-modes:

(display-modes) ;;=> (#<DisplayMode 2880 x 1800 x 32 @0Hz> #<DisplayMode 2880 x 1800 x 16 @0Hz> 
#<DisplayMode 2560 x 1600 x 32 @0Hz> #<DisplayMode 2560 x 1600 x 16 @0Hz> 
#<DisplayMode 2048 x 1280 x 32 @0Hz> #<DisplayMode 2048 x 1280 x 16 @0Hz> 
#<DisplayMode 1680 x 1050 x 32 @0Hz> #<DisplayMode 1680 x 1050 x 16 @0Hz> 
#<DisplayMode 1440 x 900 x 32 @0Hz> #<DisplayMode 1440 x 900 x 16 @0Hz> 
#<DisplayMode 1280 x 800 x 32 @0Hz> #<DisplayMode 1280 x 800 x 16 @0Hz> 
#<DisplayMode 1024 x 768 x 32 @0Hz> #<DisplayMode 1024 x 768 x 16 @0Hz> 
#<DisplayMode 800 x 600 x 32 @0Hz> #<DisplayMode 800 x 600 x 16 @0Hz> 
#<DisplayMode 640 x 480 x 32 @0Hz> #<DisplayMode 640 x 480 x 16 @0Hz>)

In my scenario, it should be the 9th and not the first one in this list.

@johnjelinek
Copy link
Contributor Author

Making progress :)

fullscreen_12_14_13__9_33_pm

I also found (Display/getDisplayMode) gives me the resolution I'd expect.

@samaaron Any reason why you chose to make a function that gets all display modes instead of the one currently being used?

@johnjelinek
Copy link
Contributor Author

Note: You have to restart nrepl to have it recognize you've switched resolutions with (Display/getDisplayMode). I'm gonna send in a PR.

@rogerallen
Copy link
Member

Hi John,

Thanks for digging in and resolving this. It looks like your pull request solves this elegantly. I'll check this out myself and likely accept it soon.

@samaaron and I were both assuming that the highest-res Display first in the sorted (display-modes) sequence would be equivalent to the Display you would want when running full-screen. Apparently the retina display breaks that assumption due to some pixel-doubling that LWJGL can not know about.

I'm curious, is it possible for you to select a 1:1 pixel mode for display on your desktop? #<DisplayMode 2880 x 1800 x 32 @0Hz>? Some might shadertone users may actually want to run at full-res.

[LOL: 0Hz? that's a pretty low frame rate. I bet that makes some LWJGL apps blow up with a divide-by-zero!]

@johnjelinek
Copy link
Contributor Author

@rogerallen Where did you see I had 0HZ? Regarding 1:1 pixel-modes, MBPs don't give you access to that unless you use a third party tool like SetResX.

@rogerallen
Copy link
Member

@johnjelinek re @0Hz. See the output from (display-modes) above.

#<DisplayMode 2880 x 1800 x 32 @0Hz> #<DisplayMode 2880 x 1800 x 16 @0Hz> ...

@johnjelinek
Copy link
Contributor Author

oh lol! I guess my head filtered out the stuff surrounding <``> because I didn't see it until right now. off-topic: do you have any recommended tutorials around glsl? I've been grabbing stuff from shadertoy, but I'm not familiar with the API and a lot of the math stuff is going right over my head (it seems a lot of them have logic baked in with the display, gross).

@rogerallen
Copy link
Member

I'll circle back if I find anything. For the moment, see http://www.reddit.com/r/twotriangles/ esp. sidebar for some info.

I would just caution you that, yes, this can be really complicated if you want to make pseudo-realistic imagery. You're basically writing a ray tracer in GLSL. But, try to start small with simple geometric patterns and give yourself some time to learn the more involved rendering over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants