Skip to content

Conversation

@lyonsno
Copy link
Owner

@lyonsno lyonsno commented Nov 21, 2025

Summary

  • fail fast in SEC3DEMO when the required WEBGL_draw_buffers extension is unavailable
  • gate shader prefixing on WEBGL_draw_buffers support to avoid extension-related link failures

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +522 to +527
if (!gl.getExtension("WEBGL_draw_buffers")) {
console.warn("WEBGL_draw_buffers extension unavailable; rendering will fail.");
if (msg) {
msg.innerText = "WEBGL_draw_buffers is required for SEC3DEMO.";
}
return;

Choose a reason for hiding this comment

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

P1 Badge Abort init when draw_buffers extension missing

The new WEBGL_draw_buffers guard in setupScene returns early when the extension is disabled, but main continues to call setKeyInputs, SEC3.renderer.init(), etc. without checking that initialization succeeded. In environments without the extension (the case this code targets), scene, interactor, and related globals are never created, so downstream calls will throw (e.g., interactor.onKeyDown in setKeyInputs) instead of failing fast. Consider surfacing the failure to main or skipping the rest of initialization when the extension check fails.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants