gldrawpixels example
Example: gldrawpixels example
unsigned int data[H][W][3];
for( size_t y = 0; y < H; ++y )
{
for( size_t x = 0; x < W; ++x )
{
data[y][x][0] = ( rand() % 256 ) * 256 * 256 * 256;
data[y][x][1] = ( rand() % 256 ) * 256 * 256 * 256;
data[y][x][2] = ( rand() % 256 ) * 256 * 256 * 256;
}
}
glDrawPixels( W, H, GL_RGB, GL_UNSIGNED_INT, data );