<<< What is texture unit? | Index | The fragment shader code >>> |
OpenGL buffer objects are linear arrays of memory, where the GPU keeps a binary-identical copy of our data
The format of a texture image, however, is controlled by the GPU hardware
The image data we provide is transformed into internal OpenGL format
This explains the complexity of glTexImage2D() parameters
Internally, glTexImage2D() executes GPU's pixel transfer operation, which does the conversion
The fragment shader gets texture data by individual texels
<<< What is texture unit? | Index | The fragment shader code >>> |