SDL Digest, Vol 104, Issue 4

Message-ID: <1438509169.m2f.48439 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Eric Wing wrote:

I might suggest that individual array elements for src/dst rect must
always have values and can’t be NULL, that way the code that is trying
to shuffle things into registers isn’t needing to check for NULL all
the time.

I agree. In fact I made a small mistake in my example. I mean’t an array of objects, not array of pointers. Including amount of elements inside the array.

That is:

Code:
SDL_RenderCopies(SDL_Renderer* renderer,
SDL_Texture* texture,
const SDL_Rect* srcrect,
const SDL_Rect* dstrect,
int count)

Code:
SDL_RenderCopiesEx(SDL_Renderer* renderer,
SDL_Texture* texture,
const SDL_Rect* srcrect,
const SDL_Rect* dstrect,
const double angle,
const SDL_Point* center,
const SDL_RendererFlip flip,
int count)

That way instead of providing an array of pointers you will provide an address to an array with objects.

I would still suggest a doubly-indirected gather/store form, but as
long as you percolate your point data down to your texture data I
suppose it’s really alright.> Date: Sun, 02 Aug 2015 09:52:49 +0000

From: “.3lite”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] Lack of batching for RenderCopy/RenderCopyEx