1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-14 09:23:53 +01:00
dxvk/src/d3d11/d3d11_device_child.h
Philip Rebohle c5c43fb2a4
[d3d11] Allow choosing type wrapper for D3D11DeviceChild base class
Allows subclasses to replace ComObject with something else.
2019-10-14 01:44:27 +02:00

44 lines
945 B
C++

#pragma once
#include "d3d11_include.h"
#include "../util/com/com_private_data.h"
namespace dxvk {
template<typename Base, template<class> class Wrapper = ComObject>
class D3D11DeviceChild : public Wrapper<Base> {
public:
HRESULT STDMETHODCALLTYPE GetPrivateData(
REFGUID guid,
UINT *pDataSize,
void *pData) final {
return m_privateData.getData(
guid, pDataSize, pData);
}
HRESULT STDMETHODCALLTYPE SetPrivateData(
REFGUID guid,
UINT DataSize,
const void *pData) final {
return m_privateData.setData(
guid, DataSize, pData);
}
HRESULT STDMETHODCALLTYPE SetPrivateDataInterface(
REFGUID guid,
const IUnknown *pUnknown) final {
return m_privateData.setInterface(
guid, pUnknown);
}
private:
ComPrivateData m_privateData;
};
}