38 #ifndef AMINO_RX_SCENE_SDL_H
39 #define AMINO_RX_SCENE_SDL_H
79 struct aa_gl_globals * globals,
95 SDL_GLContext *p_glcontext );
100 AA_API const struct timespec *
106 AA_API const struct timespec *
112 AA_API const struct timespec *
#define AA_API
calling and name mangling convention for functions
int(* aa_sdl_display_fun)(void *context, struct aa_sdl_display_params *params)
Display handler function to call in SDL loop.
AA_API const struct timespec * aa_sdl_display_params_get_time_initial(struct aa_sdl_display_params *params)
Return the initial time step.
AA_API const struct timespec * aa_sdl_display_params_get_time_now(struct aa_sdl_display_params *params)
Return the current time step.
AA_API void aa_sdl_bind_key(SDL_Keycode key, aa_sdl_handler_function handler, void *cx)
Bind a handler function for an SDL key press.
AA_API void aa_sdl_display_params_set_quit(struct aa_sdl_display_params *params)
Indicate a quit (window close) request.
const SDL_Event * aa_sdl_display_params_get_event(struct aa_sdl_display_params *params)
Retrieve the most recent SDL event.
AA_API void aa_sdl_display_loop(SDL_Window *window, struct aa_gl_globals *globals, aa_sdl_display_fun display, void *context)
Run the display loop function.
AA_API void aa_sdl_gl_window(const char *title, int x_pos, int y_pos, int width, int height, Uint32 flags, SDL_Window **pwindow, SDL_GLContext *p_glcontext)
Create an SDL window with an OpenGL context.
AA_API void aa_sdl_bind_event(SDL_EventType event_type, aa_sdl_handler_function handler, void *cx)
Bind a handler function for an SDL event.
AA_API int aa_sdl_display_params_is_first(struct aa_sdl_display_params *params)
Check if this is the fist display call.
int(* aa_sdl_handler_function)(void *cx, struct aa_sdl_display_params *params)
An event handler.
AA_API const struct timespec * aa_sdl_display_params_get_time_last(struct aa_sdl_display_params *params)
Return the previous time step.
AA_API int aa_sdl_display_params_get_update(struct aa_sdl_display_params *params)
Return whether to update the display.
AA_API void aa_sdl_init(void)
Initialize SDL library and options.
AA_API void aa_sdl_display_params_set_update(struct aa_sdl_display_params *params)
Indicate a display update is needed.
Parameters for SDL display function.