s-ol’s avatars-ol’s Twitter Archive—№ 643

  1. GLuint ff[] = { GL_LUMINANCE, GL_RGBA, GL_RGB }; GLuint bb[] = { GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_BYTE, GL_UNSIGNED_BYTE_3_3_2, GL_FLOAT }; glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB8, width, height, 0, ff[rand()%3], bb[rand()%5], data-0xfff+rand()%0x1fff );