Added space in the common state structure for render targets
parent
4f39f0115b
commit
30f7e86882
|
@ -82,6 +82,7 @@ typedef struct
|
||||||
Uint32 render_flags;
|
Uint32 render_flags;
|
||||||
SDL_bool skip_renderer;
|
SDL_bool skip_renderer;
|
||||||
SDL_Renderer **renderers;
|
SDL_Renderer **renderers;
|
||||||
|
SDL_Texture **targets;
|
||||||
|
|
||||||
/* Audio info */
|
/* Audio info */
|
||||||
const char *audiodriver;
|
const char *audiodriver;
|
||||||
|
|
|
@ -809,6 +809,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
||||||
state->renderers =
|
state->renderers =
|
||||||
(SDL_Renderer **) SDL_malloc(state->num_windows *
|
(SDL_Renderer **) SDL_malloc(state->num_windows *
|
||||||
sizeof(*state->renderers));
|
sizeof(*state->renderers));
|
||||||
|
state->targets =
|
||||||
|
(SDL_Texture **) SDL_malloc(state->num_windows *
|
||||||
|
sizeof(*state->targets));
|
||||||
if (!state->windows || !state->renderers) {
|
if (!state->windows || !state->renderers) {
|
||||||
fprintf(stderr, "Out of memory!\n");
|
fprintf(stderr, "Out of memory!\n");
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
|
@ -861,6 +864,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
||||||
SDL_ShowWindow(state->windows[i]);
|
SDL_ShowWindow(state->windows[i]);
|
||||||
|
|
||||||
state->renderers[i] = NULL;
|
state->renderers[i] = NULL;
|
||||||
|
state->targets[i] = NULL;
|
||||||
|
|
||||||
if (!state->skip_renderer
|
if (!state->skip_renderer
|
||||||
&& (state->renderdriver
|
&& (state->renderdriver
|
||||||
|
|
Loading…
Reference in New Issue