mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 15:32:53 +01:00
Fix bad glClearColor parameters
Container spec indicates that background color is written in BGRA byte order, but glClearColor() parameters are RGBA. Anyway the checkerboard is displayed right after glClear() calls so it replaces background color. In response to webp-discuss/TkLHALGaHaM Change-Id: Ief5435fadfd6a422b881a9dc240b5e8dc6546e19
This commit is contained in:
parent
da96d8d9ab
commit
78ad57a36a
@ -408,9 +408,9 @@ static void StartDisplay(void) {
|
|||||||
glutKeyboardFunc(HandleKey);
|
glutKeyboardFunc(HandleKey);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glClearColor(GetColorf(kParams.bg_color, 0),
|
glClearColor(GetColorf(kParams.bg_color, 16), // BGRA from spec
|
||||||
GetColorf(kParams.bg_color, 8),
|
GetColorf(kParams.bg_color, 8),
|
||||||
GetColorf(kParams.bg_color, 16),
|
GetColorf(kParams.bg_color, 0),
|
||||||
GetColorf(kParams.bg_color, 24));
|
GetColorf(kParams.bg_color, 24));
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
DrawCheckerBoard();
|
DrawCheckerBoard();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user