📅  最后修改于: 2022-03-11 14:55:11.938000             🧑  作者: Mango
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 );