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

wrage? #315

Merged
merged 6 commits into from
Oct 19, 2023
Merged

wrage? #315

merged 6 commits into from
Oct 19, 2023

Conversation

OFFTKP
Copy link
Collaborator

@OFFTKP OFFTKP commented Oct 17, 2023

Use a different loading function for android, otherwise it would not load some functions like glad_glTexStorage2D which normally gets loaded at load_GL_VERSION_4_2 which android was probably missing, and now loads from load_GL_ES_VERSION_3_0.

A standalone function is also helpful to further separate the emulator core from the UI

@wheremyfoodat
Copy link
Owner

Needs to check the PANDA3DS_ENABLE_OPENGL define before defining this, also likely better to put this somewhere outside of emulator.cpp

@OFFTKP OFFTKP changed the title Add loadGlFunctions function wrage? Oct 18, 2023
@OFFTKP
Copy link
Collaborator Author

OFFTKP commented Oct 18, 2023

There's some code duplication (frontend_qt code also exists in frontend_sdl). I was thinking of making the initFrontend function handle that common code in emulator.cpp and call an initFrontendInternal which would be the frontend specific code defined in frontend_sdl/qt but not sure how common the duplicated code is (would it be needed for every possible frontend panda might have in the future?)

@OFFTKP
Copy link
Collaborator Author

OFFTKP commented Oct 18, 2023

Apart from ease to adding new frontends, I think this makes it easier to create unit tests in the future. Say you want to run the emulator class as a standalone, only initialize opengl for testing. You could add another ifdef in emulator.cpp, or you could simply define initFrontend (which maybe should be named initEnvironment) in the test file to initialize the environment the way you want for your testing purposes.

@wheremyfoodat
Copy link
Owner

Will be reopened at a later date

@wheremyfoodat wheremyfoodat reopened this Oct 18, 2023
@wheremyfoodat
Copy link
Owner

wheremyfoodat commented Oct 19, 2023

Can sdl_frontend.hpp include <filesystem> rq
Merging this right after

@wheremyfoodat wheremyfoodat merged commit c348725 into wheremyfoodat:master Oct 19, 2023
@wheremyfoodat
Copy link
Owner

Wait you included it in the .cpp not .hpp
🤯

@OFFTKP OFFTKP deleted the wrage-4 branch October 25, 2023 10:49
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.

2 participants