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

Adding support for dynamic fullScreen() in default render mode #6139

Open
BreadBox64 opened this issue Dec 24, 2020 · 4 comments
Open

Adding support for dynamic fullScreen() in default render mode #6139

BreadBox64 opened this issue Dec 24, 2020 · 4 comments

Comments

@BreadBox64
Copy link

I am speaking of either making it so that fullScreen() can be called after setup or adding a new function with this functionality. This would be helpful in cases where a program can run in either fullscreen or windowed modes and wants to allow users to switch between them after export via a settings document. Or a program could have a fullscreen button to switch after program start. Is there a way to implement this feature? Thanks!

@Arpiz-18
Copy link

Hi . I am new to open source and i am willing to contribute to this. How do i start ?
I have set up the project locally and I am able to see the screen who's screenshot I have pasted below . Please help me with contributing part
Screenshot (38)

@dzaima
Copy link

dzaima commented Dec 25, 2020

PSurface is the main class for such things, and there's no direct way to toggle fullscreen through it. However, if you're using P2D, you can use

GLWindow glw = (GLWindow) surface.getNative();
glw.setFullscreen(shouldBeFullScreen);

and there are probably somewhat similar things in the other rendering modes.

@BreadBox64
Copy link
Author

BreadBox64 commented Dec 29, 2020

and there are probably somewhat similar things in the other rendering modes.

Thanks for the info! However, there is no way to do this in the default rendering mode that I could find.

@BreadBox64 BreadBox64 changed the title Adding support for dynamic fullScreen() Adding support for dynamic fullScreen() in default render mode Dec 29, 2020
@dzaima
Copy link

dzaima commented Dec 29, 2020

I can't find any way either, even with access to the frame. It doesn't seem like awt allows changing it dynamically, so it'd probably need to recreate the frame (and whatever is connected to it) on fullscreening.

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

3 participants