I have my depth display set with 16 bits and I would like to display a 16 bits color image using glDrawPixel and also glTexImage2D. But I don't know which "format" and "components" arguments to give to those functions :
Argument components should be 3 as my color is RGB coded. Argument type is GL_UNSIGNED_BYTE as *pixel is a GLubyte.Code :GLubyte * pixels; pixels = .... glDrawPixels( w,h, format = GL_RGB ???, type = GL_UNSIGNED_BYTE, pixels ); ... glTexImage2D(GL_TEXTURE_2D, 0, components = 3 ??? w, h, 0, format = GL_RGB?? type = GL_UNSIGNED_BYTE, pixels );
So like this, OpenGL will suppose to have 3 bytes for a pixel, won't it?
But my colors are coded with 16 bits (R->6, G->5, B->5).
Can someone give me the correct arguments please?
Thanks in advance.