Files
o3de/Code/CryEngine/RenderDll/XRenderD3D9/DXGL/Interfaces/CCryDXGLGIAdapter.hpp
T
2021-03-08 14:30:57 -08:00

67 lines
2.0 KiB
C++

/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : Declaration of the DXGL wrapper for IDXGIAdapter
#ifndef __CRYDXGLGIADAPTER__
#define __CRYDXGLGIADAPTER__
#include "CCryDXGLGIObject.hpp"
namespace NCryOpenGL
{
struct SAdapter;
}
class CCryDXGLGIFactory;
class CCryDXGLGIOutput;
class CCryDXGLGIAdapter
: public CCryDXGLGIObject
{
public:
#if DXGL_FULL_EMULATION
DXGL_IMPLEMENT_INTERFACE(CCryDXGLGIAdapter, DXGIAdapter)
#endif //DXGL_FULL_EMULATION
DXGL_IMPLEMENT_INTERFACE(CCryDXGLGIAdapter, DXGIAdapter1)
CCryDXGLGIAdapter(CCryDXGLGIFactory* pFactory, NCryOpenGL::SAdapter* pGLAdapter);
virtual ~CCryDXGLGIAdapter();
bool Initialize();
D3D_FEATURE_LEVEL GetSupportedFeatureLevel();
NCryOpenGL::SAdapter* GetGLAdapter();
// IDXGIObject overrides
HRESULT GetParent(REFIID riid, void** ppParent);
// IDXGIAdapter implementation
HRESULT EnumOutputs(UINT Output, IDXGIOutput** ppOutput);
HRESULT GetDesc(DXGI_ADAPTER_DESC* pDesc);
HRESULT CheckInterfaceSupport(REFGUID InterfaceName, LARGE_INTEGER* pUMDVersion);
// IDXGIAdapter1 implementation
HRESULT GetDesc1(DXGI_ADAPTER_DESC1* pDesc);
protected:
std::vector<_smart_ptr<CCryDXGLGIOutput> > m_kOutputs;
_smart_ptr<CCryDXGLGIFactory> m_spFactory;
_smart_ptr<NCryOpenGL::SAdapter> m_spGLAdapter;
DXGI_ADAPTER_DESC m_kDesc;
DXGI_ADAPTER_DESC1 m_kDesc1;
D3D_FEATURE_LEVEL m_eSupportedFeatureLevel;
};
#endif //__CRYDXGLGIADAPTER__