-
Notifications
You must be signed in to change notification settings - Fork 37
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 a config to enable debug output and object labels for OpenGL in erly display. #257
base: main
Are you sure you want to change the base?
Conversation
Last commit published: 264bdc0445e381ada1c66c5cee0e6f3860d79a38. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #257' // https://github.com/neoforged/FancyModLoader/pull/257
url 'https://prmaven.neoforged.net/FancyModLoader/pr257'
content {
includeModule('net.neoforged.fancymodloader', 'earlydisplay')
includeModule('net.neoforged.fancymodloader', 'junit-fml')
includeModule('net.neoforged.fancymodloader', 'loader')
includeModule('net.neoforged.fancymodloader', 'tests')
}
}
} |
fc3ef8c
to
32102f0
Compare
@shartte, this pull request has conflicts, please resolve them for this PR to move forward. |
maxLabelLength = 256; | ||
} | ||
if (capabilities.GL_EXT_debug_marker) { | ||
groupMode = GroupMode.EXTENSION; |
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.
Is there any case where GL_EXT_debug_marker
might be true while GL_EXT_debug_label
is false, causing maxLabelLength
to not be set to a non-zero value?
@@ -390,6 +392,8 @@ public void draw() { | |||
// but only once, the VAO saves this state | |||
GlState.bindVertexArray(vao); | |||
GlState.bindArrayBuffer(vbo); | |||
GlDebug.labelVertexArray(vao, label); | |||
GlDebug.labelBuffer(vao, label); |
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.
Shouldn't this label the VBO
instead of the VAO
?
@@ -41,6 +41,7 @@ public enum ConfigValue { | |||
DEFAULT_CONFIG_PATH("defaultConfigPath", "defaultconfigs", "Default config path for servers"), | |||
DISABLE_OPTIMIZED_DFU("disableOptimizedDFU", Boolean.TRUE, "Disables Optimized DFU client-side - already disabled on servers"), | |||
EARLY_WINDOW_PROVIDER("earlyWindowProvider", "fmlearlywindow", "Early window provider"), | |||
EARLY_WINDOW_GLDEBUG("earlyWindowGlDebug", Boolean.FALSE, "Enable OpenGL debugging in early window provider"), |
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.
I think it would be a good idea to make this setting more generic and wire it into RenderSystem.initRenderer()
in NF (for sync debug output the config would be passed directly to initRenderer()
and for debug labels the config would be ORed together with vanilla's renderDebugLabels
command line option). That way GL debugging controlled by this setting would be consistent across the entire game instead of some parts being enabled in one place but not another and, specifically for sync debug output, would also allow this setting to impact the game even if the early window is disabled.
Adds an FML option to: