mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
Make bgra format more explicit
This commit is contained in:
parent
c745394242
commit
4a74de797c
1 changed files with 5 additions and 3 deletions
|
|
@ -52,9 +52,11 @@ static void Init(void)
|
|||
|
||||
for (s = 0; s < SIZE; s++) {
|
||||
for (t = 0; t < SIZE; t++) {
|
||||
tex2d[t][s][0] = s*255/(SIZE-1);
|
||||
/* bgra:
|
||||
*/
|
||||
tex2d[t][s][0] = 0x30;
|
||||
tex2d[t][s][1] = t*255/(SIZE-1);
|
||||
tex2d[t][s][2] = 0x30;
|
||||
tex2d[t][s][2] = s*255/(SIZE-1);
|
||||
tex2d[t][s][3] = 0xff;
|
||||
}
|
||||
}
|
||||
|
|
@ -76,7 +78,7 @@ static void Init(void)
|
|||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE, SIZE, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
||||
GL_BGRA, GL_UNSIGNED_BYTE, NULL);
|
||||
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue