Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am currently facing an error that I cannot seem to figure out.

In chrome I am receiving:

GL ERROR :GL_INVALID_VALUE : glTexImage2D: invalid internal_format GL_FALSE
RENDER WARNING: there is no texture bound to the unit 0

Which is resulting in my 3D object having just a black texture rather than the image I have waiting to be rendered.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
403 views
Welcome To Ask or Share your Answers For Others

1 Answer

internal_format is the 3rd argument to gl.texImage2D. The error mesages says you are passing either 0 or undefined or null. All of those become 0 which is the same as GL_FALSE.

You need to pass a valid internal format like gl.RGBA, gl.RGB, etc...

The second error is because of the first.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...