From Ohm
From the OpenGL point of view, an image is a linear data chunk of 8- or 16-Bit RGB values stored sequentially in main memory. The first RGB value is the left top corner. Then the RFB values of the columns of the first row are specified, followed by the RGB values of all other rows (column first order).
A data chunk needs to be uploaded in texture memory of the graphics hardware with the following OpenGL command:
pixel format | components |
---|---|
GL_LUMINANCE | 1 |
GL_RGB | 3 |
GL_RGBA | 4 |
GL_ALPHA | 1 |
GL_LUMINANCE_ALPHA | 2 |
Texture data example for a checker board texture am Beispiel eines (gray value = luminance):
Retrieved from http://schorsch.efi.fh-nuernberg.de/roettger/index.php/MedicalVisualization/TextureData
Page last modified on November 03, 2015, at 05:26 PM