/* * 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 . */ #ifndef PROGRAM_H__ #define PROGRAM_H__ #include "gl.hpp" #include "glm/glm.hpp" #include "glm/gtc/matrix_transform.hpp" #include "vr_support.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 retro_environment_t environ_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; extern enum retro_hw_context_type active_hw_context; extern bool renderer_is_vulkan(void); 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); void (*context_destroy)(void); /* optional, may be NULL */ } engine_program_t; extern const engine_program_t engine_program_instancingviewer; extern const engine_program_t engine_program_modelviewer; // VR extern bool vr_active; extern unsigned vr_eye_width; extern unsigned vr_eye_height; extern bool vr_update(struct retro_vr_frame_state *fs, bool capable, bool *dupe); #endif