opengl es - What does GL_UNSIGNED_BYTE mean for glTexImage2D? -


i want load byte array containing texture in rgba 8888 format.

the opengl es docs offer 4 constants use: gl_unsigned_byte, gl_unsigned_short_5_6_5, gl_unsigned_short_4_4_4_4, , gl_unsigned_short_5_5_5_1.

on regular opengl, there value gl_unsigned_int_8_8_8_8 meets needs -- , numbers interpreted thus:

example, if internalformat gl_r3_g3_b2, asking texels 3 bits of red, 3 bits of green, , 2 bits of blue.

so gl_unsigned_int_8_8_8_8 must 8 bits of r, 8 bits of g , 8 bits of b , 8 bits of a.

but gl_unsigned_byte mean on es platform , how interpretted? (how many bits r, g, b , a?)

gl_unsigned_byte should work format gl_rgba, giving 8 bits per component.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

c# - How to execute a particular part of code asynchronously in a class -

c# - Asterisk click to call -