CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/libretro/LibretroD3D11Context.h
Views: 1401
1
#pragma once
2
3
#define HAVE_D3D11
4
#include "libretro/libretro_d3d.h"
5
#include "libretro/LibretroGraphicsContext.h"
6
7
class LibretroD3D11Context : public LibretroHWRenderContext {
8
public:
9
LibretroD3D11Context() : LibretroHWRenderContext(RETRO_HW_CONTEXT_DIRECT3D, 11) {}
10
bool Init() override;
11
12
void SwapBuffers() override;
13
void GotBackbuffer() override;
14
void LostBackbuffer() override;
15
void CreateDrawContext() override;
16
void DestroyDrawContext() override;
17
18
GPUCore GetGPUCore() override { return GPUCORE_DIRECTX11; }
19
const char *Ident() override { return "DirectX 11"; }
20
21
private:
22
retro_hw_render_interface_d3d11 *d3d11_ = nullptr;
23
ID3D11Texture2D *texture_ = nullptr;
24
ID3D11RenderTargetView *RTView_ = nullptr;
25
ID3D11ShaderResourceView *SRView_ = nullptr;
26
DXGI_FORMAT format_ = DXGI_FORMAT_R8G8B8A8_UNORM;
27
};
28
29