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

VR: Add the VR code to all builds. Remove IsVRBuild calls from the renderer. #16246

Merged
merged 9 commits into from
Oct 18, 2022

Conversation

hrydgard
Copy link
Owner

First step towards refactoring things so that the VR code is always built on desktop and can be selectively enabled.

Adds all the VR code to all the build systems. Generally, I don't want the build systems to include/exclude code, each CPP file should itself be responsible for checking PPSSPP_PLATFORM and so on.

Will definitely need a few buildfixes, so marking as draft.

@hrydgard hrydgard added the Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. label Oct 17, 2022
@hrydgard hrydgard added this to the v1.14.0 milestone Oct 17, 2022
@hrydgard hrydgard added the VR OpenXR VR support label Oct 17, 2022
@lvonasek
Copy link
Contributor

I see you started it big 😉. I will keep my hands off for a few days to prevent conflicts.

Just a few notes:

  • PPSSPP_PLATFORM(ANDROID) define is not a good way to avoid GL/XR code.
  • I would really love to keep VR*.* files independ of PPSSPP to be able to use it in other VR projects

If you need a help, I can offer you a pair programming this Friday afternoon (CET).

@hrydgard
Copy link
Owner Author

Yeah I guess I can avoid ppsspp_config.h for now, I'll change the ifdefs.

I don't know how realistic it is to make it a reusable library in the long run though, I feel that might restrict the API and organization of the code a little much... We'll see.

@lvonasek
Copy link
Contributor

Thank you, it somehow surprised me that you started this multiplatform work. I have honestly some doubts that it is a good way to go.

@hrydgard
Copy link
Owner Author

hrydgard commented Oct 17, 2022

I generally like to compile all code for all platforms, as far as it's possible, even if some ends up completely unused on some platforms. Ends up checking more code with more compilers on CI, ending up with less breakage overall.

And I'm definitely gonna need to at a minimum have all this code building on Windows anyway...

@hrydgard
Copy link
Owner Author

OK, I think it should be more to your liking now. Tested and works.

@hrydgard hrydgard marked this pull request as ready for review October 17, 2022 21:14
Copy link
Contributor

@lvonasek lvonasek left a comment

Choose a reason for hiding this comment

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

It looks better but I see still a several include "Common/..." in VR*.*

If you don't have GL on the target platform you should use ifdef XR_USE_GRAPHICS_API_OPENGL_ES instead of ifdef ANDROID.

If you don't have XR on the target platform you should use ifdef OPENXR instead of ifdef ANDROID.

@hrydgard hrydgard merged commit c2f97c8 into master Oct 18, 2022
@hrydgard hrydgard deleted the vr-refactoring branch October 18, 2022 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. VR OpenXR VR support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants