Go to the documentation of this file.
22 #define NUM_SPRITES 100
26 #ifdef TEST_NATIVE_WINDOWS
27 &WindowsWindowFactory,
29 #ifdef TEST_NATIVE_X11
32 #ifdef TEST_NATIVE_COCOA
103 position->
x += velocity->
x;
105 velocity->
x = -velocity->
x;
106 position->
x += velocity->
x;
108 position->
y += velocity->
y;
110 velocity->
y = -velocity->
y;
111 position->
y += velocity->
y;
156 SDL_Log(
"Creating native window for %s driver\n", driver);
213 switch (
event.type) {
215 switch (
event.window.event) {
EGLConfig void * native_window
#define SDL_RenderPresent
A collection of pixels used in software blitting.
void(* DestroyNativeWindow)(void *window)
EGLSurface EGLnsecsANDROID time
static SDL_Texture * sprite
#define SDL_CreateWindowFrom
The type used to identify a window.
void *(* CreateNativeWindow)(int w, int h)
static NativeWindowFactory * factory
#define SDL_GetWindowSize
#define SDL_CreateTextureFromSurface
GLint GLint GLint GLint GLint x
EGLSurface EGLNativeWindowType * window
static SDL_Rect * velocities
#define SDL_RenderGetViewport
#define SDL_SetWindowTitle
#define SDL_LoadBMP(file)
GLint GLint GLint GLint GLint GLint y
static SDL_Renderer * renderer
#define SDL_GetCurrentVideoDriver
#define SDL_LogSetPriority
int main(int argc, char *argv[])
A rectangle, with the origin at the upper left (integer).
#define SDL_SetRenderDrawColor
void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
static SDL_Rect * positions
#define SDL_CreateRenderer
static void * native_window
SDL_Texture * LoadSprite(SDL_Renderer *renderer, char *file)
static NativeWindowFactory * factories[]
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)