2023-02-20 04:27:35 +01:00
|
|
|
#ifndef __RT64_LAYER_H__
|
|
|
|
#define __RT64_LAYER_H__
|
|
|
|
|
2023-11-13 01:40:02 +01:00
|
|
|
#include "../ultramodern/ultramodern.hpp"
|
2024-01-01 06:09:14 +01:00
|
|
|
#include "../ultramodern/config.hpp"
|
|
|
|
|
|
|
|
namespace RT64 {
|
|
|
|
struct Application;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ultramodern {
|
2024-05-19 00:46:11 +02:00
|
|
|
enum class RT64SetupResult {
|
|
|
|
Success,
|
|
|
|
DynamicLibrariesNotFound,
|
|
|
|
InvalidGraphicsAPI,
|
|
|
|
GraphicsAPINotFound,
|
|
|
|
GraphicsDeviceNotFound
|
|
|
|
};
|
|
|
|
|
2024-01-01 06:09:14 +01:00
|
|
|
struct WindowHandle;
|
2024-04-14 21:59:42 +02:00
|
|
|
struct RT64Context {
|
|
|
|
public:
|
|
|
|
~RT64Context();
|
|
|
|
RT64Context(uint8_t* rdram, WindowHandle window_handle, bool developer_mode);
|
|
|
|
bool valid() { return static_cast<bool>(app); }
|
2024-05-19 00:46:11 +02:00
|
|
|
RT64SetupResult get_setup_result() { return setup_result; }
|
2024-01-01 06:09:14 +01:00
|
|
|
|
2024-04-14 21:59:42 +02:00
|
|
|
void update_config(const GraphicsConfig& old_config, const GraphicsConfig& new_config);
|
|
|
|
void enable_instant_present();
|
|
|
|
void send_dl(const OSTask* task);
|
|
|
|
void update_screen(uint32_t vi_origin);
|
|
|
|
void shutdown();
|
|
|
|
void set_dummy_vi();
|
|
|
|
uint32_t get_display_framerate();
|
2024-05-26 07:24:46 +02:00
|
|
|
float get_resolution_scale();
|
2024-04-27 06:02:10 +02:00
|
|
|
void load_shader_cache(std::span<const char> cache_binary);
|
2024-04-14 21:59:42 +02:00
|
|
|
private:
|
2024-05-19 00:46:11 +02:00
|
|
|
RT64SetupResult setup_result;
|
2024-04-14 21:59:42 +02:00
|
|
|
std::unique_ptr<RT64::Application> app;
|
|
|
|
};
|
|
|
|
|
|
|
|
RT64::UserConfiguration::Antialiasing RT64MaxMSAA();
|
|
|
|
bool RT64SamplePositionsSupported();
|
2024-05-26 07:24:46 +02:00
|
|
|
bool RT64HighPrecisionFBEnabled();
|
2024-04-14 21:59:42 +02:00
|
|
|
}
|
2023-02-20 04:27:35 +01:00
|
|
|
|
2023-10-31 03:41:05 +01:00
|
|
|
void set_rt64_hooks();
|
|
|
|
|
2023-02-20 04:27:35 +01:00
|
|
|
#endif
|
|
|
|
|