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

[NO SQUASH] Non-SDL: Add opengl3 support #15306

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

SmallJoker
Copy link
Member

@SmallJoker SmallJoker commented Oct 20, 2024

video_driver = opengl3 support for the non-SDL Linux and Win32 Irrlicht device.

Benefits:

  • Less code duplication (of stub functions)
  • Alternative access to OpenGL 3 without the SDL2 dependency
  • Minimal amount of additional code.
  • ????

The change GL_VENDOR -> GL_RENDERER was done because latter does provide more helpful information about the video card that is being used. See debug_log_level = info + debug.txt for comparison.

  • Before: glxinfo | grep "OpenGL vendor string" (vendor name only)
  • Now: glxinfo | grep "OpenGL renderer string" (more detailed graphics card information)

To do

This PR is Ready for Review.

How to test

  1. Compile with USE_SDL2=0 and ENABLE_OPENGL3=1
  2. See window title
  3. See debug.txt
  4. Shaders must work
  5. Dynamic shadows should work properly
  6. ??

@SmallJoker SmallJoker added Linux Feature ✨ PRs that add or enhance a feature Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) labels Oct 20, 2024
@SmallJoker SmallJoker changed the title Pr 15306 irr add opengl egl Irrlicht: Add opengl3 support via EGL Oct 20, 2024
@SmallJoker SmallJoker marked this pull request as draft October 20, 2024 18:48
@Zughy Zughy added the Roadmap: supported by core dev PR not adhering to the roadmap, yet some core dev decided to take care of it label Oct 20, 2024
@sfan5 sfan5 added Rebase needed The PR needs to be rebased by its author and removed Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) labels Oct 22, 2024
irr/src/CEGLManager.cpp Outdated Show resolved Hide resolved
irr/src/CEGLManager.cpp Outdated Show resolved Hide resolved
@SmallJoker SmallJoker force-pushed the pr_15306_irr_add_opengl_egl branch from 4fab40b to e1b9295 Compare November 2, 2024 14:52
@SmallJoker SmallJoker changed the title Irrlicht: Add opengl3 support via EGL [NO SQUASH] Non-SDL: Add opengl3 support Nov 2, 2024
@SmallJoker SmallJoker removed the Rebase needed The PR needs to be rebased by its author label Nov 2, 2024
@SmallJoker SmallJoker force-pushed the pr_15306_irr_add_opengl_egl branch 2 times, most recently from c06d9ef to 51cb072 Compare November 2, 2024 16:20
@SmallJoker SmallJoker marked this pull request as ready for review November 2, 2024 16:20
@sfan5 sfan5 added the Rebase needed The PR needs to be rebased by its author label Nov 13, 2024
@sfan5
Copy link
Collaborator

sfan5 commented Nov 13, 2024

Rebase needed.
Considering we are hoping to stay with SDL for real this time you may choose that the effort is not worth it and close the PR.

@SmallJoker SmallJoker force-pushed the pr_15306_irr_add_opengl_egl branch from 6aef219 to 5c787dc Compare November 13, 2024 17:58
@SmallJoker
Copy link
Member Author

The rebase was trivial. I am continuing this until SDL is mandatory on all platforms.

@SmallJoker SmallJoker removed the Rebase needed The PR needs to be rebased by its author label Nov 13, 2024
irr/README.md Outdated Show resolved Hide resolved
src/client/shadows/dynamicshadowsrender.cpp Outdated Show resolved Hide resolved
irr/src/CMakeLists.txt Outdated Show resolved Hide resolved
irr/src/OpenGL/Driver.cpp Outdated Show resolved Hide resolved
src/client/shadows/dynamicshadowsrender.cpp Outdated Show resolved Hide resolved
@sfan5
Copy link
Collaborator

sfan5 commented Nov 13, 2024

can you turn this into a real check?
https://github.com/minetest/minetest/blob/0c3117f9b32624955846314ebf87f757d124184f/irr/src/OpenGL3/Driver.cpp#L37-L38

side note: this only currently works because the the opengl3 driver doesn't (yet) use the core profile, but runs in the compatibility profile.
if this wasn't the case the GLX and WGL plumbing code would need actual changes to make this work.

@SmallJoker SmallJoker force-pushed the pr_15306_irr_add_opengl_egl branch from 5c787dc to 08304c9 Compare November 13, 2024 20:27
Copy link
Collaborator

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

doesn't break anything. shadows work on gl3.

@sfan5 sfan5 merged commit 8f03b70 into luanti-org:master Nov 15, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature ✨ PRs that add or enhance a feature Linux One approval ✅ ◻️ Roadmap: supported by core dev PR not adhering to the roadmap, yet some core dev decided to take care of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants