SDL
2.0
|
Go to the source code of this file.
Data Structures | |
struct | DrawState |
Functions | |
static void | quit (int rc) |
SDL_Texture * | LoadTexture (SDL_Renderer *renderer, char *file, SDL_bool transparent) |
SDL_bool | DrawComposite (DrawState *s) |
SDL_bool | Draw (DrawState *s) |
void | loop () |
int | main (int argc, char *argv[]) |
Variables | |
static SDLTest_CommonState * | state |
DrawState * | drawstates |
int | done |
SDL_bool | test_composite = SDL_FALSE |
Definition at line 182 of file testrendertarget.c.
References DrawState::background, SDL_Rect::h, NULL, DrawState::renderer, DrawState::scale_direction, SDL_CreateTexture, SDL_DestroyTexture, SDL_FALSE, SDL_GetError, SDL_LOG_CATEGORY_APPLICATION, SDL_LogError, SDL_PIXELFORMAT_ARGB8888, SDL_RenderCopy, SDL_RenderGetViewport, SDL_RenderPresent, SDL_SetRenderTarget, SDL_TEXTUREACCESS_TARGET, SDL_TRUE, DrawState::sprite, DrawState::sprite_rect, viewport, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by loop().
Definition at line 99 of file testrendertarget.c.
References DrawState::background, SDL_Rect::h, NULL, DrawState::renderer, DrawState::scale_direction, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_NONE, SDL_CreateTexture, SDL_DestroyTexture, SDL_FALSE, SDL_Log, SDL_PIXELFORMAT_ARGB8888, SDL_RenderCopy, SDL_RenderFillRect, SDL_RenderGetViewport, SDL_RenderPresent, SDL_RenderReadPixels, SDL_SetRenderDrawBlendMode, SDL_SetRenderDrawColor, SDL_SetRenderTarget, SDL_SetTextureBlendMode, SDL_TEXTUREACCESS_TARGET, SDL_TRUE, DrawState::sprite, DrawState::sprite_rect, viewport, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by loop().
SDL_Texture* LoadTexture | ( | SDL_Renderer * | renderer, |
char * | file, | ||
SDL_bool | transparent | ||
) |
Definition at line 49 of file testrendertarget.c.
References SDL_PixelFormat::BitsPerPixel, SDL_Surface::format, NULL, SDL_PixelFormat::palette, SDL_Surface::pixels, SDL_CreateTextureFromSurface, SDL_FreeSurface, SDL_GetError, SDL_LoadBMP, SDL_LOG_CATEGORY_APPLICATION, SDL_LogError, SDL_SetColorKey, and SDL_TRUE.
Referenced by main().
void loop | ( | ) |
Definition at line 226 of file testrendertarget.c.
References done, Draw(), DrawComposite(), i, NULL, SDLTest_CommonState::num_windows, SDL_PollEvent, SDLTest_CommonEvent(), test_composite, and SDLTest_CommonState::windows.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 252 of file testrendertarget.c.
References DrawState::background, done, SDL_Rect::h, i, LoadTexture(), loop(), NULL, SDLTest_CommonState::num_windows, quit(), DrawState::renderer, SDLTest_CommonState::renderers, DrawState::scale_direction, SDL_FALSE, SDL_GetTicks(), SDL_INIT_VIDEO, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogSetPriority, SDL_QueryTexture, SDL_stack_alloc, SDL_stack_free, SDL_strcasecmp, SDL_TRUE, SDLTest_CommonArg(), SDLTest_CommonCreateState(), SDLTest_CommonInit(), SDLTest_CommonUsage(), DrawState::sprite, DrawState::sprite_rect, test_composite, SDL_Rect::w, DrawState::window, and SDLTest_CommonState::windows.
|
static |
Definition at line 42 of file testrendertarget.c.
References SDLTest_CommonQuit().
Referenced by main().
int done |
Definition at line 37 of file testrendertarget.c.
DrawState* drawstates |
Definition at line 36 of file testrendertarget.c.
|
static |
Definition at line 25 of file testrendertarget.c.