amino
Lightweight Robot Utility Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
scene_sdl.h
Go to the documentation of this file.
1 /* -*- mode: C; c-basic-offset: 4; -*- */
2 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
3 /*
4  * Copyright (c) 2015, Rice University
5  * All rights reserved.
6  *
7  * Author(s): Neil T. Dantam <ntd@rice.edu>
8  *
9  * Redistribution and use in source and binary forms, with or
10  * without modification, are permitted provided that the following
11  * conditions are met:
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of copyright holder the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
23  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
24  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
27  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
30  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
31  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 
38 #ifndef AMINO_RX_SCENE_SDL_H
39 #define AMINO_RX_SCENE_SDL_H
40 
69 AA_API void aa_sdl_init( void );
70 
71 AA_API void aa_sdl_scroll(
72  struct aa_gl_globals * globals,
73  int *update, int *quit );
74 
75 
76 AA_API void aa_sdl_display_loop(
77  SDL_Window* window,
78  struct aa_gl_globals * globals,
79  aa_sdl_display_fun display,
80  void *context );
81 
82 
83 
84 AA_API void aa_sdl_gl_window(
85  const char* title,
86  int x_pos,
87  int y_pos,
88  int width,
89  int height,
90  Uint32 flags,
91  SDL_Window **pwindow,
92  SDL_GLContext *p_glcontext );
93 
94 AA_API const struct timespec *
95 aa_sdl_display_params_get_time_now( struct aa_sdl_display_params *params );
96 
97 AA_API const struct timespec *
98 aa_sdl_display_params_get_time_last( struct aa_sdl_display_params *params );
99 
100 AA_API const struct timespec *
101 aa_sdl_display_params_get_time_initial( struct aa_sdl_display_params *params );
102 
103 AA_API int
104 aa_sdl_display_params_get_update( struct aa_sdl_display_params *params );
105 
106 AA_API void
107 aa_sdl_display_params_set_quit( struct aa_sdl_display_params *params );
108 
109 AA_API void
110 aa_sdl_display_params_set_update( struct aa_sdl_display_params *params );
111 
112 AA_API int
113 aa_sdl_display_params_is_first( struct aa_sdl_display_params *params );
114 
115 #endif /*AMINO_RX_SCENE_SDL_H*/
AA_API void aa_sdl_init(void)
Initialize SDL library and options.
int(* aa_sdl_display_fun)(void *context, struct aa_sdl_display_params *params)
Definition: rxtype.h:87
#define AA_API
calling and name mangling convention for functions
Definition: amino.h:86
Parameters for SDL display function.
Definition: rxtype.h:73