MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / PrepQueueCmdDraw

Function PrepQueueCmdDraw

deps/SDL2/src/render/SDL_render.c:416–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416static int
417PrepQueueCmdDraw(SDL_Renderer *renderer, const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a)
418{
419 int retval = QueueCmdSetDrawColor(renderer, r, g, b, a);
420
421 /* Set the viewport and clip rect directly before draws, so the backends
422 * don't have to worry about that state not being valid at draw time. */
423 if (retval == 0 && !renderer->viewport_queued) {
424 retval = QueueCmdSetViewport(renderer);
425 }
426 if (retval == 0 && !renderer->cliprect_queued) {
427 retval = QueueCmdSetClipRect(renderer);
428 }
429 return retval;
430}
431
432static SDL_RenderCommand *
433PrepQueueCmdDrawSolid(SDL_Renderer *renderer, const SDL_RenderCommandType cmdtype)

Callers 2

PrepQueueCmdDrawSolidFunction · 0.85
PrepQueueCmdDrawTextureFunction · 0.85

Calls 3

QueueCmdSetDrawColorFunction · 0.85
QueueCmdSetViewportFunction · 0.85
QueueCmdSetClipRectFunction · 0.85

Tested by

no test coverage detected