-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 wireframe for compatibility mode #85621
Add wireframe for compatibility mode #85621
Conversation
Hi, I noticed this is your first time contributing to Godot Engine. The Github actions which tests for acceptability to merge has found an error with your formatting. Please see https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html for more details. Let me know if you have questions. |
I think this is wanted, but @clayjohn knows more about adding wireframe modes to the Godot Engine 4 compatibility renderer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks mostly good. Great work!
I left a few suggestions for improvements, mostly just style stuff to help this pass CI, but I left one important suggestion to clean up the implementation a bit
f9c6581
to
6f5ffcd
Compare
sorry about the styling issues, i think i finally figured out how to properly use clang-format |
You still haven't fixed the whitespace, you must not have applied clang-format correctly |
6f5ffcd
to
ddeee3c
Compare
Your commit seems not to be linked to your GitHub account. See: Why are my commits linked to the wrong user? for more info. |
ddeee3c
to
bae6f86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased on top of master
d76c1d0), it mostly works as expected.
However, when using OpenGL, wireframe mode doesn't work in a running project (running with editor binary). Instead, it only works if it's toggled within the editor. This is inconsistent with Forward+/Mobile where you can change the debug draw mode to Wireframe at runtime in a debug build.
It can be useful to support this to debug procedurally generated geometry, so I'd recommend looking into fixing this issue.
func _ready():
get_viewport().debug_draw = Viewport.DEBUG_DRAW_WIREFRAME
Testing project: test_lightmapgi_mobile.zip
Mobile | Compatibility |
---|---|
This is actually by design. The OpenGL renderer needs to generate a store the wireframe versions of the meshes. It would be hugely wasteful to do that at runtime. I think that the current behaviour is preferrable (and matches 3.x) If you need the debug wireframes at runtime, you need to request them with RenderingServer.set_debug_generate_wireframes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Great work
Tagged for cherrypicking. But might not be best for a 4.2.1 if we want 4.2.1 to be ultra-safe. This isn't a high priority cherrypick, but it would be nice to have in 4.2.x eventually. |
Thanks! And congrats on your first merged contribution to the engine! |
Cherry-picked for 4.2.2. |
The implementation for wireframe mode is mostly the same as the one in 4d50c7a
which is used in Godot 3.5