-
-
Notifications
You must be signed in to change notification settings - Fork 49
fullScreen(P2D) from an executable does not work properly #514
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
Comments
Created by: dev01111 Please can you format your code using backticks like this and also tabs/spaces: ``` then it will look like
You should often practise these, because they make code easier for others to read. thanks, @dev01111 |
Created by: UnintelligableGoofball I think I formatted it better. Thanks for letting me know, I'm a little new to programming. |
Created by: clankill3r I had a maybe related monitor issue with windows that had nothing to do with processing. I'm not on my windows laptop right, and it was in combination with a projector. But meanwhile, could you give me the exact type number of your monitor o I can check some things. |
Created by: UnintelligableGoofball This was on my laptop, not an external monitor, so I don't have a model number for the monitor or anything like that. It is a 120Hz, 1080p, 14 inch display if that helps. |
Created by: UnintelligableGoofball I used the "text()" function to display the resolution so it would work even when run as a .exe. When I run the program normally, through the processing IDE, it returns the correct information: 1920 and 1080. However, when I export the SAME program and run it, it shows 1536 by 864 and is noticeably low resolution. |
Created by: UnintelligableGoofball If I specify "P2D" in the size declaration and export it, it gets the pixel density correct and is no longer low resolution, but still thinks my screen is 1536 by 864. I think that might be because it checks the pixel density again when you specify P2D? |
Created by: leohumnew So, after much testing, here's what I've found: This happens with any exported program from Processing 4 which uses
I've tested this on multiple computers, and so far can find no way around it, meaning that P2D is fairly useless at the moment if you want to cater for the (fairly likely, especially on laptops) case that someone will have Windows scaled to something other than 100%. EDIT: |
Created by: leohumnew I've further tested it, and had a look through the Processing source code, but unfortunately don't have the skill to work out what is breaking it. I've checked and it definitely happens with P2D, P3D, and JAFAFX (although this last one a bit differently, the window is too large rather than too small). Having Java bundled in the executable or not makes no difference. This seems like a fairly major bug as it makes using P2D (or any renderer other than default) quite risky, breaking it for the not insignificant number of people with Windows scaled - any chance you could take a look when you have the time please @benfry ? Totally understand you probably have very limited time, but it would be amazing if you could fit in a look at this at some point! Or obviously anyone else with the expertise necessary :) |
Created by: benfry I've found the main problem here (and fixed it… the Windows scaling check was broken), but there's still a maze of things to figure out… It's a matrix of:
Essentially, several dozen situations that we need to test to make sure everything is behaving consistently, so it's a lot of effort to get it right. Processing 3.x had “no problem” because it just made everything tiny… So if you had a HiDPI screen, the default 100x100 sketch size was incredibly small. This wasn't too bad if you were doing The goal is to get things to behave more like macOS (and web browsers, for that matter), where the canvas is scaled to a reasonable size, but you can specify whether you want the pixels to be HiDPI. (Edit: updated to note that the matrix is even messier than first posted.) |
Created by: benfry Added some fixes for this for 4.2. It's not perfect, and we're still likely to see weirdness, but the changes mean:
If you find a problem in how it works in 4.2, please file a new issue. |
Created by: UnintelligableGoofball
Description
For me, running a program with fullScreen() works fine from the IDE, but if I export it and run it from the .exe it doesn't cover the whole screen.
Expected Behavior
This is what the program is supposed to do, and what it indeed does do if run through the IDE.
Current Behavior
However, if exported and run from the executable it displays as shown. It is not a window, and cannot be moved. It acts as though it were in fullscreen, and only closes when escape is pressed, but it does not cover the screen.
Steps to Reproduce
1.Create a program that uses "fullScreen(P2D,1);" (you have to use P2D, otherwise it gets the pixel density wrong and makes everything low res, this is covered more in the Possible Causes)
2.Export the program in Presentation Mode
3.Run the resulting .exe file
This is the code which I had problems with, I have not tried any other programs but I am fairly sure the problem is from fullScreen(P2D,1):
Your Environment
Possible Causes / Solutions
I suspect that this is related to another issue I ran into where if I did not specify P2D in fullScreen() and ran it from the excecutable it got the pixel density wrong and made everything really low resolution, but at least that covered the whole screen. (Some digging on forums lead me to including P2D.) My theory is that if before I included P2D it was low res, but basically stretched to cover the whole monitor, then now that it accurately knows the pixel density it might be the same size image, just shrunk down to the right pixel density.
The text was updated successfully, but these errors were encountered: