mirror of https://github.com/encounter/SDL.git
Don't try to create a vbo if we aren't using any vertices
This commit is contained in:
parent
b7885abc44
commit
b08e57e926
|
@ -1090,6 +1090,7 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (vertices) {
|
||||
/* upload the new VBO data for this set of commands. */
|
||||
vbo = data->vertexBuffers[vboidx];
|
||||
if (data->vertexBufferSize[vboidx] < vertsize) {
|
||||
|
@ -1131,6 +1132,7 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "This error will not be logged again for this renderer.");
|
||||
data->reportedVboProblem = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
IDirect3DDevice9_SetStreamSource(data->device, 0, vbo, 0, sizeof (Vertex));
|
||||
|
||||
|
|
Loading…
Reference in New Issue