mirror of https://github.com/libsdl-org/SDL
Fixed bug 4453 - GLES / GLES2: first white renderer clear cmd is drawn as black
This commit is contained in:
parent
7b42f03fd9
commit
be991f3a78
|
@ -1210,6 +1210,8 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
data->glEnableClientState(GL_VERTEX_ARRAY);
|
||||
data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
|
||||
data->glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
data->drawstate.blend = SDL_BLENDMODE_INVALID;
|
||||
data->drawstate.color = 0xFFFFFFFF;
|
||||
data->drawstate.clear_color = 0xFFFFFFFF;
|
||||
|
|
|
@ -2076,6 +2076,7 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
|
|||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_EXTERNAL_OES;
|
||||
#endif
|
||||
|
||||
/* Set up parameters for rendering */
|
||||
data->glActiveTexture(GL_TEXTURE0);
|
||||
data->glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
data->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
@ -2083,6 +2084,8 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
|
|||
data->glEnableVertexAttribArray(GLES2_ATTRIBUTE_POSITION);
|
||||
data->glDisableVertexAttribArray(GLES2_ATTRIBUTE_TEXCOORD);
|
||||
|
||||
data->glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
data->drawstate.blend = SDL_BLENDMODE_INVALID;
|
||||
data->drawstate.color = 0xFFFFFFFF;
|
||||
data->drawstate.clear_color = 0xFFFFFFFF;
|
||||
|
|
Loading…
Reference in New Issue