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

enable GL debug names for RenderDoc #461

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

Trass3r
Copy link
Collaborator

@Trass3r Trass3r commented Jul 9, 2024

This is normally enabled via isGraphicsDebug: https://github.com/jMonkeyEngine/jmonkeyengine/blob/3ab36478ec59b7f8d6af271ca11ab26100df00ad/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglContext.java#L250

%USERHOME\.OpenKeeper\openkeeper.properties

GraphicsDebug(bool)=true
Renderer(string)=LWJGL-OpenGL45

https://github.com/search?q=repo%3AjMonkeyEngine/jmonkeyengine%20isGraphicsDebug&type=code
But that setting also enables checking of all GL calls and there are errors on some drivers which prevent it from starting:
jMonkeyEngine/jmonkeyengine#1996

@tonihele tonihele merged commit 2041ae2 into tonihele:master Jul 10, 2024
2 checks passed
@Trass3r Trass3r deleted the gldebug branch July 10, 2024 09:15
@Trass3r Trass3r requested a review from Copilot November 23, 2024 11:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 suggestion.

Comments skipped due to low confidence (2)

src/toniarts/openkeeper/Main.java:336

  • Ensure that the renderer object is an instance of GLRenderer before casting to avoid ClassCastException.
((GLRenderer)renderer).setDebugEnabled(true);

src/toniarts/openkeeper/Main.java:335

  • Verify that the 'debug' variable is defined and properly initialized before use.
if (debug)

@@ -203,6 +204,8 @@ public ModelViewer() {
@Override
public void simpleInitApp() {

((GLRenderer)renderer).setDebugEnabled(true); // get debug names for GL objects
Copy link
Preview

Copilot AI Nov 23, 2024

Choose a reason for hiding this comment

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

Ensure that 'renderer' is an instance of 'GLRenderer' before casting. This cast can cause a ClassCastException if 'renderer' is not a 'GLRenderer'.

Suggested change
((GLRenderer)renderer).setDebugEnabled(true); // get debug names for GL objects
if (renderer instanceof GLRenderer) { ((GLRenderer)renderer).setDebugEnabled(true); }

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They only have 1 renderer implementation 😅

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