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

Add CLI Support for Window Parameters #1726

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

ZzzhHe
Copy link
Contributor

@ZzzhHe ZzzhHe commented Dec 4, 2024

Close #1546

  • Defined window-related startup parameters (size, vsync, mode) in Python for main and game start modes.
  • Passed these parameters to the main_arguments struct by creating a window_arguments struct
  • Updated C++ logic to forward parameters along main.cpp -> engine.cpp -> presenter.cpp
  • Implemented Fullscreen, Borderless, Windowed three display model in libopenage/renderer/opengl/window.cpp

Copy link
Member

@heinezen heinezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall very good, thank you!

I just have a few requests.

libopenage/engine/engine.cpp Outdated Show resolved Hide resolved
libopenage/engine/engine.h Outdated Show resolved Hide resolved
libopenage/engine/engine.h Outdated Show resolved Hide resolved
libopenage/engine/engine.h Outdated Show resolved Hide resolved
libopenage/main.cpp Show resolved Hide resolved
openage/game/main.py Outdated Show resolved Hide resolved
openage/game/main.py Outdated Show resolved Hide resolved
openage/main/main.py Outdated Show resolved Hide resolved
openage/main/main.py Outdated Show resolved Hide resolved
openage/main/main.py Outdated Show resolved Hide resolved
@ZzzhHe
Copy link
Contributor Author

ZzzhHe commented Dec 6, 2024

Overall very good, thank you!

I just have a few requests.

Thanks!! done.

Copy link
Member

@heinezen heinezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two small issues but then we are good to go I believe.

libopenage/presenter/presenter.h Outdated Show resolved Hide resolved
libopenage/renderer/opengl/window.cpp Outdated Show resolved Hide resolved
@ZzzhHe
Copy link
Contributor Author

ZzzhHe commented Dec 7, 2024

I found two small issues but then we are good to go I believe.

Thanks for pointing that out! I get it now—I'm still getting familiar with multi-threaded code.

libopenage/presenter/presenter.h Outdated Show resolved Hide resolved
@heinezen heinezen force-pushed the cli-window-parameters branch from 7a19570 to 3d05163 Compare December 7, 2024 17:20
@heinezen heinezen force-pushed the cli-window-parameters branch from 3d05163 to 8094dc6 Compare December 7, 2024 17:20
@heinezen heinezen enabled auto-merge December 7, 2024 17:20
@heinezen heinezen merged commit 8e07bba into SFTtech:master Dec 7, 2024
13 checks passed
@heinezen
Copy link
Member

heinezen commented Dec 7, 2024

Look nice with ./run main --window-mode borderless --vsync --window-size 1600 900

grafik

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

Successfully merging this pull request may close these issues.

CLI parameters for window settings
2 participants