-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Define shader language project settings before creation of TextShaderEditor
object.
#73588
Define shader language project settings before creation of TextShaderEditor
object.
#73588
Conversation
TextShaderEditor
object.
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 like you are getting a few errors connected to ShaderWarning
not being available. Note that ShaderWarning
is only defined when DEBUG_ENABLED
is defined (i.e. in editor builds). So any code referencing it outside of editor classes needs to be wrapped in an #ifdef DEBUG_ENABLED
conditional.
Further, core classes like ProjectSettings should not rely on non-core code like shader_warnings.cpp. The definitions, should likely be moved to rendering_server.cpp
godot/servers/rendering_server.cpp
Line 2858 in 29f670b
void RenderingServer::init() { |
thanks. I've moved these definitions into rendering_servers. Why is this the right place for them? It's necessary to wrap |
@clayjohn , this? or wrap all
|
Its a class that is always initialized and it allows you to keep rendering server features within the rendering_server. We have a chain of allowed dependencies that goes like this Core < Servers < Scene < Editor. You can include stuff from the left but not the right. So anything can depend on Core, but core shouldn't depend on servers, scene, or editor. The
None of the other definitions rely on a class that is conditionally compiled. The issue here is that
This looks fine. You just need it around the sections referencing |
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.
Just some comments on formatting changes
Looks great! The final step before merging is to squash all the commits together so that the whole PR only contains 1 big commit with all your changes. We like to merge one commit at a time to keep the git history clean and navigable. If you don't know how to do that, we have a helpful tutorial in the official documentation https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html#the-interactive-rebase |
1601a49
to
786ad51
Compare
@clayjohn the commits are squashed. Can this be merged? |
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 great now! Sorry for the slow re-review
Thanks! And congrats for your first merged Godot contribution 🎉 |
This appears to break CI |
Making a fix |
Fix #73336
Preamble: this is my first contribution. From the description and the comment from @Calinou , I have moved the
GLOBAL_DEF
forshader_language
settings into theProjectSettings
contstructor.