What are the valid possible values to pass to internalformat in WebGL’s texImage2D call? The WebGL spec doesn’t seem to make it clear, and I’m not sure which enums from desktop GL documentation will work in WebGL.
WebGL defines: RGB, RGBA, RGBA4, RGB5_A1, RGB565. Are all of these guaranteed to be valid internal formats?
Does the type parameter get taken in to account? If I set internalformat to RGB and type to UNSIGNED_SHORT_5_6_5, does this guarantee the internal format will be 16-bit? Or does it always use RGB8 or decide based on other factors?
From my understanding the following parameters are valid in webgl:
From the opengl ES 2.0 documentation:
If the webgl documentation does not give enough details maybe the full opengl es 2.0 documentation can help (chapter 3.7.1). From looking at the differences between webgl and opengl es 2.0 there shouldn’t be any difference in
glTexImage2Dbetween webgl and opengl es 2.0