Help with creating a framebuffer. #232
-
I've been trying to make a framebuffer using this bit of code. const triFrameBufferInfo = twgl.createFramebufferInfo(gl, [
{ format: gl.RGBA, type: gl.RGBA4, min: gl.LINEAR, wrap: gl.CLAMP_TO_EDGE },
//{ format: gl.DEPTH_ATTACHMENT, },
],480,360); I've been getting these errors too
|
Beta Was this translation helpful? Give feedback.
Answered by
greggman
Apr 28, 2024
Replies: 2 comments 1 reply
-
It's not clear what you're trying to do but there's no such thing as Adding webgl-lint might help find these kinds of errors. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
David-Orangemoon
-
I just figured out I was attaching it wrong lol. Sorry bout that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not clear what you're trying to do but there's no such thing as
type: gl.RGBA4
which means you're gettingINVALID_ENUM
when the texture is created. Change it totype: gl.UNSIGNED_BYTE
Adding webgl-lint might help find these kinds of errors.
https://github.com/greggman/webgl-lint