19 #include <emscripten/emscripten.h> 125 SDL_Log(
"Blended pixel: 0x%8.8X\n", P);
241 if (!
Draw(&drawstates[i]))
done = 1;
244 #ifdef __EMSCRIPTEN__ 246 emscripten_cancel_main_loop();
266 for (i = 1; i < argc;) {
278 SDL_Log(
"Usage: %s %s [--composite]\n",
313 #ifdef __EMSCRIPTEN__ 314 emscripten_set_main_loop(
loop, 0, 1);
325 double fps = ((double) frames * 1000) / (now - then);
326 SDL_Log(
"%2.2f frames per second\n", fps);
#define SDL_CreateTexture
#define SDL_RenderReadPixels
#define SDL_SetRenderTarget
#define SDL_LoadBMP(file)
SDLTest_CommonState * SDLTest_CommonCreateState(char **argv, Uint32 flags)
Parse command line parameters and create common state.
#define SDL_RenderFillRect
int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
Process one common argument.
A collection of pixels used in software blitting.
#define SDL_SetTextureBlendMode
#define SDL_SetRenderDrawBlendMode
int main(int argc, char *argv[])
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
Open test window.
SDL_bool DrawComposite(DrawState *s)
GLenum GLenum GLuint texture
#define SDL_CreateTextureFromSurface
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
Common event handler for test windows.
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
static SDL_Renderer * renderer
#define SDL_stack_alloc(type, count)
#define SDL_RenderGetViewport
const char * SDLTest_CommonUsage(SDLTest_CommonState *state)
Returns common usage information.
static SDLTest_CommonState * state
SDL_Renderer ** renderers
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
#define SDL_LogSetPriority
SDL_Texture * LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)
EGLSurface EGLNativeWindowType * window
#define SDL_DestroyTexture
static SDL_Texture * sprite
The type used to identify a window.
#define SDL_SetRenderDrawColor
#define SDL_stack_free(data)
SDL_bool Draw(DrawState *s)
void SDLTest_CommonQuit(SDLTest_CommonState *state)
Close test window.
A rectangle, with the origin at the upper left.
#define SDL_RenderPresent