-
Notifications
You must be signed in to change notification settings - Fork 9
/
program.h
62 lines (51 loc) · 1.84 KB
/
program.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Libretro 3DEngine
* Copyright (C) 2013 - Hans-Kristian Arntzen
* Copyright (C) 2013 - Daniel De Matteis
*
* Libretro 3DEngine is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* Libretro 3DEngine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Libretro 3DEngine.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PROGRAM_H__
#define PROGRAM_H__
#include "gl.hpp"
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
extern retro_input_poll_t input_poll_cb;
extern retro_input_state_t input_state_cb;
extern struct retro_hw_render_callback hw_render;
extern retro_video_refresh_t video_cb;
extern unsigned engine_width;
extern unsigned engine_height;
extern GLuint g_texture_target;
extern GLuint tex;
extern bool location_camera_control_enable;
extern bool sensor_enable;
typedef struct
{
float latitude;
float longitude;
float horizontal_accuracy;
float vertical_accuracy;
} retro_position_t;
extern retro_position_t previous_location;
extern retro_position_t current_location;
typedef struct engine_program
{
void (*load_game)(const struct retro_game_info *info);
void (*run)(void);
void (*context_reset)(void);
void (*update_variables)(retro_environment_t environ_cb);
glm::vec3 (*check_input)(void);
} engine_program_t;
extern const engine_program_t engine_program_instancingviewer;
extern const engine_program_t engine_program_modelviewer;
#endif