2020-06-29 16:47:27 +00:00
|
|
|
#pragma once
|
|
|
|
#include "common/gl/program.h"
|
|
|
|
#include "common/gl/texture.h"
|
|
|
|
#include "core/host_display.h"
|
|
|
|
#include "frontend-common/opengl_host_display.h"
|
|
|
|
#include "libretro.h"
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
class LibretroOpenGLHostDisplay final : public FrontendCommon::OpenGLHostDisplay
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LibretroOpenGLHostDisplay();
|
|
|
|
~LibretroOpenGLHostDisplay();
|
|
|
|
|
2020-08-03 16:08:54 +00:00
|
|
|
static bool RequestHardwareRendererContext(retro_hw_render_callback* cb, bool prefer_gles);
|
2020-06-29 16:47:27 +00:00
|
|
|
|
|
|
|
RenderAPI GetRenderAPI() const override;
|
|
|
|
|
|
|
|
bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device) override;
|
2020-07-09 03:29:58 +00:00
|
|
|
void DestroyRenderDevice() override;
|
2020-06-29 16:47:27 +00:00
|
|
|
|
|
|
|
void ResizeRenderWindow(s32 new_window_width, s32 new_window_height) override;
|
|
|
|
|
|
|
|
void SetVSync(bool enabled) override;
|
|
|
|
|
|
|
|
bool Render() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_is_gles = false;
|
|
|
|
};
|