More changes to accomodate Android - imgui/host display

This commit is contained in:
Connor McLaughlin
2019-11-28 23:29:03 +10:00
committed by Connor McLaughlin
parent f11d357ab9
commit ea0b13a05c
11 changed files with 71 additions and 124 deletions

View File

@@ -78,16 +78,26 @@ HostDisplay::RenderAPI D3D11HostDisplay::GetRenderAPI() const
return HostDisplay::RenderAPI::D3D11;
}
void* D3D11HostDisplay::GetHostRenderDevice() const
void* D3D11HostDisplay::GetRenderDevice() const
{
return m_device.Get();
}
void* D3D11HostDisplay::GetHostRenderContext() const
void* D3D11HostDisplay::GetRenderContext() const
{
return m_context.Get();
}
void* D3D11HostDisplay::GetRenderWindow() const
{
return m_window;
}
void D3D11HostDisplay::ChangeRenderWindow(void* new_window)
{
Panic("Not supported");
}
std::unique_ptr<HostDisplayTexture> D3D11HostDisplay::CreateTexture(u32 width, u32 height, const void* data,
u32 data_stride, bool dynamic)
{

View File

@@ -20,8 +20,11 @@ public:
static std::unique_ptr<HostDisplay> Create(SDL_Window* window);
RenderAPI GetRenderAPI() const override;
void* GetHostRenderDevice() const override;
void* GetHostRenderContext() const override;
void* GetRenderDevice() const override;
void* GetRenderContext() const override;
void* GetRenderWindow() const override;
void ChangeRenderWindow(void* new_window) override;
std::unique_ptr<HostDisplayTexture> CreateTexture(u32 width, u32 height, const void* data, u32 data_stride,
bool dynamic) override;

View File

@@ -80,16 +80,26 @@ HostDisplay::RenderAPI OpenGLHostDisplay::GetRenderAPI() const
return m_is_gles ? HostDisplay::RenderAPI::OpenGLES : HostDisplay::RenderAPI::OpenGL;
}
void* OpenGLHostDisplay::GetHostRenderDevice() const
void* OpenGLHostDisplay::GetRenderDevice() const
{
return nullptr;
}
void* OpenGLHostDisplay::GetHostRenderContext() const
void* OpenGLHostDisplay::GetRenderContext() const
{
return m_gl_context;
}
void* OpenGLHostDisplay::GetRenderWindow() const
{
return m_window;
}
void OpenGLHostDisplay::ChangeRenderWindow(void* new_window)
{
Panic("Not implemented");
}
std::unique_ptr<HostDisplayTexture> OpenGLHostDisplay::CreateTexture(u32 width, u32 height, const void* data,
u32 data_stride, bool dynamic)
{

View File

@@ -15,8 +15,11 @@ public:
static std::unique_ptr<HostDisplay> Create(SDL_Window* window);
RenderAPI GetRenderAPI() const override;
void* GetHostRenderDevice() const override;
void* GetHostRenderContext() const override;
void* GetRenderDevice() const override;
void* GetRenderContext() const override;
void* GetRenderWindow() const override;
void ChangeRenderWindow(void* new_window) override;
std::unique_ptr<HostDisplayTexture> CreateTexture(u32 width, u32 height, const void* data, u32 data_stride,
bool dynamic) override;