Skip to content

gl.texImage3D is not a function error when using with threejs #304

Open

Description

@phongpt156

I'm got this error when init WebGLRenderer object in threejs library. I'm using version 0.171.0 of threejs

Activity

  1. heijieke commented on Dec 20, 2024

    @heijieke

    I have the same problem. It might be caused by a mismatch in the WebGL version. But I don't know the correct version, have you resolved this issue?

  2. eulertour commented on Jan 4, 2025

    @eulertour

    I can confirm this error first occurs on r163 of three.js, presumably because that's the revision that dropped support for WebGL1 and since texImage3D is part of the WebGL2 spec. The paths forward I see are

    1. Stay on r163 of three.js (fine in the short term, bad in the long term)
    2. Support WebGL2 in headless-gl (an unknown amount of effort in the short term, best for the long term)

    @dhritzkiv Do you have an estimate as to how much effort is required to support WebGL2 in headless-gl?

  3. eulertour commented on Jan 4, 2025

    @eulertour

    Alternatively, the proper solution may be to instead try to render with the WebGPU API
    nodejs/node#42896 (comment)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions