1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 16:08:50 +01:00
dxvk/src/d3d11/d3d11_present.h

65 lines
1.4 KiB
C
Raw Normal View History

#pragma once
2017-12-12 12:50:52 +01:00
#include "../dxgi/dxgi_device.h"
#include "../dxgi/dxgi_interfaces.h"
2017-12-12 12:50:52 +01:00
#include "d3d11_include.h"
2017-12-19 16:01:50 +01:00
#include "d3d11_texture.h"
2017-12-12 12:50:52 +01:00
namespace dxvk {
class D3D11Device;
2017-12-19 16:01:50 +01:00
class D3D11PresentBackBuffer : public ComObject<IDXGIPresentBackBuffer> {
public:
D3D11PresentBackBuffer(D3D11Texture2D* pTexture)
: m_texture(pTexture) { }
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;
Rc<DxvkImage> GetDXVKImage() final;
public:
Com<D3D11Texture2D> m_texture;
};
class D3D11PresentDevice : public ComObject<IDXGIPresentDevicePrivate> {
public:
D3D11PresentDevice();
~D3D11PresentDevice();
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;
2017-12-19 16:01:50 +01:00
HRESULT STDMETHODCALLTYPE CreateSwapChainBackBuffer(
const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,
2017-12-19 16:01:50 +01:00
IDXGIPresentBackBuffer** ppInterface) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE FlushRenderingCommands() final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDevice(
REFGUID riid,
void** ppvDevice) final;
void SetDeviceLayer(D3D11Device* pDevice) {
m_device = pDevice;
}
private:
D3D11Device* m_device = nullptr;
};
}