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

Function PrepQueueCmdDrawTexture

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

Source from the content-addressed store, hash-verified

494}
495
496static SDL_RenderCommand *
497PrepQueueCmdDrawTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_RenderCommandType cmdtype)
498{
499 /* !!! FIXME: drop this draw if viewport w or h is zero. */
500 SDL_RenderCommand *cmd = NULL;
501 if (PrepQueueCmdDraw(renderer, texture->r, texture->g, texture->b, texture->a) == 0) {
502 cmd = AllocateRenderCommand(renderer);
503 if (cmd != NULL) {
504 cmd->command = cmdtype;
505 cmd->data.draw.first = 0; /* render backend will fill this in. */
506 cmd->data.draw.count = 0; /* render backend will fill this in. */
507 cmd->data.draw.r = texture->r;
508 cmd->data.draw.g = texture->g;
509 cmd->data.draw.b = texture->b;
510 cmd->data.draw.a = texture->a;
511 cmd->data.draw.blend = texture->blendMode;
512 cmd->data.draw.texture = texture;
513 }
514 }
515 return cmd;
516}
517
518static int
519QueueCmdCopy(SDL_Renderer *renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect)

Callers 2

QueueCmdCopyFunction · 0.85
QueueCmdCopyExFunction · 0.85

Calls 2

PrepQueueCmdDrawFunction · 0.85
AllocateRenderCommandFunction · 0.85

Tested by

no test coverage detected