Open
Conversation
itanka9
suggested changes
May 21, 2025
| char *argv[1] = {""}; | ||
|
|
||
| glutInit(&argc, argv); | ||
| DEBUG_GL_CHECK_RAW("glutInit", "%d, %p", argc, argv); |
There was a problem hiding this comment.
Suggested change
| DEBUG_GL_CHECK_RAW("glutInit", "%d, %p", argc, argv); |
This call causes segfault, let's remove it. I think this is a little bit early place to call glGetError().
|
|
||
| static void debug_check_error(JSContext *ctx, const char *func, int argc, JSValueConst *argv) { | ||
| GLenum err = glGetError(); | ||
| if (err != GL_NO_ERROR) { |
There was a problem hiding this comment.
Suggested change
| if (err != GL_NO_ERROR) { | |
| if (err != GL_NO_ERROR || WEBGL_DEBUG > 1) { |
Let's make an improvement: allow to specify -DWEBGL_DEBUG=2 for compiler options and get unconditional OpenGL calls log mode.
| #define DEBUG_GL_CHECK_RAW(name, fmt, ...) \ | ||
| do { \ | ||
| GLenum err = glGetError(); \ | ||
| if (err != GL_NO_ERROR) { \ |
There was a problem hiding this comment.
Suggested change
| if (err != GL_NO_ERROR) { \ | |
| if (err != GL_NO_ERROR || WEBGL_DEBUG > 1) { \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
additions.cfor debug loggingbindgen.jsso generated wrappers log failures whenWEBGL_DEBUGis definedTesting
make test(fails: No rule to make target 'quickjs/qjs.c')