Go to the documentation of this file.
19 #include <emscripten/emscripten.h>
151 #ifdef __EMSCRIPTEN__
190 #ifdef __EMSCRIPTEN__
192 emscripten_cancel_main_loop();
210 for (
i = 1;
i < argc;) {
222 static const char *options[] = {
"[--target]",
NULL };
258 #ifdef __EMSCRIPTEN__
260 emscripten_set_main_loop(
loop, 0, 1);
272 double fps = ((double)
frames * 1000) / (now - then);
273 SDL_Log(
"%2.2f frames per second\n", fps);
#define SDL_RenderPresent
#define SDL_SetRenderTarget
A collection of pixels used in software blitting.
#define SDL_RenderDrawPoint
#define SDL_RenderSetViewport
#define SDL_RenderFillRect
GLfloat GLfloat GLfloat GLfloat h
SDL_Renderer ** renderers
int LoadSprite(char *file, SDL_Renderer *renderer)
SDLTest_CommonState * SDLTest_CommonCreateState(char **argv, Uint32 flags)
Parse command line parameters and create common state.
void SDLTest_CommonQuit(SDLTest_CommonState *state)
Close test window.
#define SDL_GetWindowSize
#define SDL_CreateTextureFromSurface
@ SDL_LOG_CATEGORY_APPLICATION
int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
Process one common argument.
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
void SDLTest_CommonLogUsage(SDLTest_CommonState *state, const char *argv0, const char **options)
Logs command line usage info.
static SDL_bool use_target
#define SDL_LoadBMP(file)
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
Open test window.
int main(int argc, char *argv[])
static SDL_Renderer * renderer
@ SDL_PIXELFORMAT_RGBA8888
A rectangle, with the origin at the upper left (integer).
@ SDL_TEXTUREACCESS_TARGET
static SDL_Texture * sprite
#define SDL_SetRenderDrawColor
void DrawOnViewport(SDL_Renderer *renderer, SDL_Rect viewport)
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
Common event handler for test windows.
#define SDL_RenderDrawLine
#define SDL_RenderSetClipRect
static SDLTest_CommonState * state
#define SDL_CreateTexture
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)
GLubyte GLubyte GLubyte GLubyte w