mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fix a bug in vitagles2 renderer
This commit is contained in:
parent
639323ea0d
commit
47c6270ece
@ -1202,6 +1202,9 @@ VITA_GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* upload the new VBO data for this set of commands. */
|
/* upload the new VBO data for this set of commands. */
|
||||||
|
/* NULL/zero vertices could happen SetRenderTarget is the first render command */
|
||||||
|
if (vertsize > 0 && vertices != NULL)
|
||||||
|
{
|
||||||
data->glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
data->glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
||||||
if (data->vertex_buffer_size[vboidx] < vertsize) {
|
if (data->vertex_buffer_size[vboidx] < vertsize) {
|
||||||
data->glBufferData(GL_ARRAY_BUFFER, vertsize, vertices, GL_DYNAMIC_DRAW);
|
data->glBufferData(GL_ARRAY_BUFFER, vertsize, vertices, GL_DYNAMIC_DRAW);
|
||||||
@ -1209,6 +1212,7 @@ VITA_GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void
|
|||||||
} else {
|
} else {
|
||||||
data->glBufferSubData(GL_ARRAY_BUFFER, 0, vertsize, vertices);
|
data->glBufferSubData(GL_ARRAY_BUFFER, 0, vertsize, vertices);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* cycle through a few VBOs so the GL has some time with the data before we replace it. */
|
/* cycle through a few VBOs so the GL has some time with the data before we replace it. */
|
||||||
data->current_vertex_buffer++;
|
data->current_vertex_buffer++;
|
||||||
|
Loading…
Reference in New Issue
Block a user