mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
Correções em Adapter
This commit is contained in:
parent
64497afdf3
commit
6e10a3a669
@ -4,8 +4,17 @@
|
|||||||
#include "xna/xna-dx.hpp"
|
#include "xna/xna-dx.hpp"
|
||||||
|
|
||||||
namespace xna {
|
namespace xna {
|
||||||
|
static String getDescription(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static Uint getDeviceId(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static String getDeviceName(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static intptr_t getMonitorHandle(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static Uint getRevision(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static Uint getRevision(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static Uint getSubSystemId(comptr<IDXGIAdapter1> const& adapter);
|
||||||
|
static Uint getVendorId(comptr<IDXGIAdapter1> const& adapter);
|
||||||
static size_t getDisplayModesCount(IDXGIAdapter* adapter);
|
static size_t getDisplayModesCount(IDXGIAdapter* adapter);
|
||||||
static uptr<DisplayModeCollection> createDisplayModeCollection(std::vector<DXGI_MODE_DESC> const& source);
|
static uptr<DisplayModeCollection> createDisplayModeCollection(std::vector<DXGI_MODE_DESC> const& source);
|
||||||
|
static void setCurrentDisplayMode(GraphicsAdapter& adapter, SurfaceFormat surfaceFormat, Uint width, Uint height, sptr<DisplayMode>& currentDisplayMode);
|
||||||
|
|
||||||
GraphicsAdapter::GraphicsAdapter() {
|
GraphicsAdapter::GraphicsAdapter() {
|
||||||
impl = unew<PlatformImplementation>();
|
impl = unew<PlatformImplementation>();
|
||||||
@ -21,10 +30,18 @@ namespace xna {
|
|||||||
|
|
||||||
if (pFactory->EnumAdapters1(0, pAdapter.GetAddressOf()) != DXGI_ERROR_NOT_FOUND) {
|
if (pFactory->EnumAdapters1(0, pAdapter.GetAddressOf()) != DXGI_ERROR_NOT_FOUND) {
|
||||||
auto adp = unew<GraphicsAdapter>();
|
auto adp = unew<GraphicsAdapter>();
|
||||||
|
|
||||||
adp->impl->_index = 0;
|
|
||||||
adp->impl->dxAdapter = pAdapter;
|
adp->impl->dxAdapter = pAdapter;
|
||||||
adp->impl->dxFactory = pFactory;
|
adp->impl->dxFactory = pFactory;
|
||||||
|
|
||||||
|
adp->description = getDescription(pAdapter);
|
||||||
|
adp->deviceId = getDeviceId(pAdapter);
|
||||||
|
adp->deviceName = getDeviceName(pAdapter);
|
||||||
|
adp->isDefault = true;
|
||||||
|
adp->monitorHandle = getMonitorHandle(pAdapter);
|
||||||
|
adp->revision = getRevision(pAdapter);
|
||||||
|
adp->subSystemId = getSubSystemId(pAdapter);
|
||||||
|
adp->vendorId = getVendorId(pAdapter);
|
||||||
|
|
||||||
return adp;
|
return adp;
|
||||||
}
|
}
|
||||||
@ -43,90 +60,21 @@ namespace xna {
|
|||||||
for (UINT count = 0; pFactory->EnumAdapters1(count, pAdapter.GetAddressOf()) != DXGI_ERROR_NOT_FOUND; ++count) {
|
for (UINT count = 0; pFactory->EnumAdapters1(count, pAdapter.GetAddressOf()) != DXGI_ERROR_NOT_FOUND; ++count) {
|
||||||
auto adp = unew<GraphicsAdapter>();
|
auto adp = unew<GraphicsAdapter>();
|
||||||
|
|
||||||
adp->impl->_index = count;
|
|
||||||
adp->impl->dxAdapter = pAdapter;
|
adp->impl->dxAdapter = pAdapter;
|
||||||
adp->impl->dxFactory = pFactory;
|
adp->impl->dxFactory = pFactory;
|
||||||
|
|
||||||
|
adp->description = getDescription(pAdapter);
|
||||||
|
adp->deviceId = getDeviceId(pAdapter);
|
||||||
|
adp->deviceName = getDeviceName(pAdapter);
|
||||||
|
adp->isDefault = count == 0;
|
||||||
|
adp->monitorHandle = getMonitorHandle(pAdapter);
|
||||||
|
adp->revision = getRevision(pAdapter);
|
||||||
|
adp->subSystemId = getSubSystemId(pAdapter);
|
||||||
|
adp->vendorId = getVendorId(pAdapter);
|
||||||
|
|
||||||
adapters.push_back(std::move(adp));
|
adapters.push_back(std::move(adp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String GraphicsAdapter::Description() const {
|
|
||||||
if (!impl->dxAdapter) return String();
|
|
||||||
|
|
||||||
DXGI_ADAPTER_DESC1 desc;
|
|
||||||
impl->dxAdapter->GetDesc1(&desc);
|
|
||||||
String description = XnaHelper::ToString(desc.Description);
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
Uint GraphicsAdapter::DeviceId() const {
|
|
||||||
if (!impl->dxAdapter) return 0;
|
|
||||||
|
|
||||||
DXGI_ADAPTER_DESC1 desc;
|
|
||||||
impl->dxAdapter->GetDesc1(&desc);
|
|
||||||
|
|
||||||
return static_cast<Uint>(desc.DeviceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
String GraphicsAdapter::DeviceName() const {
|
|
||||||
if (!impl->dxAdapter) return String();
|
|
||||||
|
|
||||||
comptr<IDXGIOutput> pOutput = nullptr;
|
|
||||||
|
|
||||||
if (impl->dxAdapter->EnumOutputs(0, pOutput.GetAddressOf()) != DXGI_ERROR_NOT_FOUND) {
|
|
||||||
DXGI_OUTPUT_DESC outputDesc{};
|
|
||||||
pOutput->GetDesc(&outputDesc);
|
|
||||||
|
|
||||||
String deviceName = XnaHelper::ToString(outputDesc.DeviceName);
|
|
||||||
|
|
||||||
return deviceName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return String();
|
|
||||||
}
|
|
||||||
|
|
||||||
intptr_t GraphicsAdapter::MonitorHandle() const {
|
|
||||||
if (!impl->dxAdapter) return 0;
|
|
||||||
|
|
||||||
comptr<IDXGIOutput> pOutput = nullptr;
|
|
||||||
|
|
||||||
if (impl->dxAdapter->EnumOutputs(0, pOutput.GetAddressOf()) != DXGI_ERROR_NOT_FOUND) {
|
|
||||||
DXGI_OUTPUT_DESC outputDesc;
|
|
||||||
pOutput->GetDesc(&outputDesc);
|
|
||||||
|
|
||||||
return reinterpret_cast<intptr_t>(outputDesc.Monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Uint GraphicsAdapter::Revision() const {
|
|
||||||
if (!impl->dxAdapter) return 0;
|
|
||||||
|
|
||||||
DXGI_ADAPTER_DESC1 desc;
|
|
||||||
impl->dxAdapter->GetDesc1(&desc);
|
|
||||||
|
|
||||||
return static_cast<Uint>(desc.Revision);
|
|
||||||
}
|
|
||||||
|
|
||||||
Uint GraphicsAdapter::SubSystemId() const {
|
|
||||||
if (!impl->dxAdapter) return 0;
|
|
||||||
|
|
||||||
DXGI_ADAPTER_DESC1 desc;
|
|
||||||
impl->dxAdapter->GetDesc1(&desc);
|
|
||||||
|
|
||||||
return static_cast<Uint>(desc.SubSysId);
|
|
||||||
}
|
|
||||||
|
|
||||||
Uint GraphicsAdapter::VendorId() const {
|
|
||||||
if (!impl->dxAdapter) return 0;
|
|
||||||
|
|
||||||
DXGI_ADAPTER_DESC1 desc;
|
|
||||||
impl->dxAdapter->GetDesc1(&desc);
|
|
||||||
|
|
||||||
return static_cast<Uint>(desc.VendorId);
|
|
||||||
}
|
|
||||||
|
|
||||||
uptr<DisplayModeCollection> GraphicsAdapter::SupportedDisplayModes() const {
|
uptr<DisplayModeCollection> GraphicsAdapter::SupportedDisplayModes() const {
|
||||||
if (!impl->dxAdapter) return nullptr;
|
if (!impl->dxAdapter) return nullptr;
|
||||||
@ -191,27 +139,16 @@ namespace xna {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sptr<DisplayMode> GraphicsAdapter::CurrentDisplayMode() {
|
sptr<DisplayMode> GraphicsAdapter::CurrentDisplayMode() {
|
||||||
if (!impl->_currentDisplayMode) {
|
if (!currentDisplayMode) {
|
||||||
CurrentDisplayMode(SurfaceFormat::Color, GraphicsDeviceManager::DefaultBackBufferWidth, GraphicsDeviceManager::DefaultBackBufferHeight);
|
setCurrentDisplayMode(*this,
|
||||||
|
SurfaceFormat::Color,
|
||||||
|
GraphicsDeviceManager::DefaultBackBufferWidth,
|
||||||
|
GraphicsDeviceManager::DefaultBackBufferHeight,
|
||||||
|
currentDisplayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return impl->_currentDisplayMode;
|
return currentDisplayMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsAdapter::CurrentDisplayMode(SurfaceFormat surfaceFormat, Uint width, Uint height) {
|
|
||||||
const auto modes = SupportedDisplayModes(surfaceFormat);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < modes->DisplayModes.size(); ++i) {
|
|
||||||
auto& m = modes->DisplayModes[i];
|
|
||||||
|
|
||||||
if (m->Format == surfaceFormat && m->Width == width && m->Height == height) {
|
|
||||||
impl->_currentDisplayMode = m;
|
|
||||||
}
|
|
||||||
else if(i + 1 == modes->DisplayModes.size()) {
|
|
||||||
impl->_currentDisplayMode = m;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GraphicsAdapter::PlatformImplementation::GetOutput(UINT slot, IDXGIOutput*& output) const {
|
bool GraphicsAdapter::PlatformImplementation::GetOutput(UINT slot, IDXGIOutput*& output) const {
|
||||||
if (!dxAdapter) return false;
|
if (!dxAdapter) return false;
|
||||||
@ -224,7 +161,22 @@ namespace xna {
|
|||||||
|
|
||||||
//INTERNAL FUNCTIONS
|
//INTERNAL FUNCTIONS
|
||||||
|
|
||||||
static size_t getDisplayModesCount(IDXGIAdapter* adapter) {
|
void setCurrentDisplayMode(GraphicsAdapter& adapter, SurfaceFormat surfaceFormat, Uint width, Uint height, sptr<DisplayMode>& currentDisplayMode) {
|
||||||
|
const auto modes = adapter.SupportedDisplayModes(surfaceFormat);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < modes->DisplayModes.size(); ++i) {
|
||||||
|
auto& m = modes->DisplayModes[i];
|
||||||
|
|
||||||
|
if (m->Format == surfaceFormat && m->Width == width && m->Height == height) {
|
||||||
|
currentDisplayMode = m;
|
||||||
|
}
|
||||||
|
else if (i + 1 == modes->DisplayModes.size()) {
|
||||||
|
currentDisplayMode = m;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t getDisplayModesCount(IDXGIAdapter* adapter) {
|
||||||
comptr<IDXGIOutput> pOutput = nullptr;
|
comptr<IDXGIOutput> pOutput = nullptr;
|
||||||
size_t numModes = 0;
|
size_t numModes = 0;
|
||||||
|
|
||||||
@ -243,7 +195,7 @@ namespace xna {
|
|||||||
return numModes;
|
return numModes;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uptr<DisplayModeCollection> createDisplayModeCollection(std::vector<DXGI_MODE_DESC> const& source) {
|
uptr<DisplayModeCollection> createDisplayModeCollection(std::vector<DXGI_MODE_DESC> const& source) {
|
||||||
auto collection = unew<DisplayModeCollection>();
|
auto collection = unew<DisplayModeCollection>();
|
||||||
DisplayMode currentDisplayMode;
|
DisplayMode currentDisplayMode;
|
||||||
std::vector<sptr<DisplayMode>> displayList;
|
std::vector<sptr<DisplayMode>> displayList;
|
||||||
@ -274,4 +226,67 @@ namespace xna {
|
|||||||
|
|
||||||
return collection;
|
return collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getDescription(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
DXGI_ADAPTER_DESC1 desc;
|
||||||
|
adapter->GetDesc1(&desc);
|
||||||
|
const auto description = XnaHelper::ToString(desc.Description);
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint getDeviceId(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
DXGI_ADAPTER_DESC1 desc;
|
||||||
|
adapter->GetDesc1(&desc);
|
||||||
|
|
||||||
|
return static_cast<Uint>(desc.DeviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
String getDeviceName(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
comptr<IDXGIOutput> pOutput = nullptr;
|
||||||
|
|
||||||
|
if (adapter->EnumOutputs(0, pOutput.GetAddressOf()) != DXGI_ERROR_NOT_FOUND) {
|
||||||
|
DXGI_OUTPUT_DESC outputDesc{};
|
||||||
|
pOutput->GetDesc(&outputDesc);
|
||||||
|
|
||||||
|
String deviceName = XnaHelper::ToString(outputDesc.DeviceName);
|
||||||
|
|
||||||
|
return deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return String();
|
||||||
|
}
|
||||||
|
|
||||||
|
intptr_t getMonitorHandle(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
comptr<IDXGIOutput> pOutput = nullptr;
|
||||||
|
|
||||||
|
if (adapter->EnumOutputs(0, pOutput.GetAddressOf()) != DXGI_ERROR_NOT_FOUND) {
|
||||||
|
DXGI_OUTPUT_DESC outputDesc;
|
||||||
|
pOutput->GetDesc(&outputDesc);
|
||||||
|
|
||||||
|
return reinterpret_cast<intptr_t>(outputDesc.Monitor);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint getRevision(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
DXGI_ADAPTER_DESC1 desc;
|
||||||
|
adapter->GetDesc1(&desc);
|
||||||
|
|
||||||
|
return static_cast<Uint>(desc.Revision);
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint getSubSystemId(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
DXGI_ADAPTER_DESC1 desc;
|
||||||
|
adapter->GetDesc1(&desc);
|
||||||
|
|
||||||
|
return static_cast<Uint>(desc.SubSysId);
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint getVendorId(comptr<IDXGIAdapter1> const& adapter) {
|
||||||
|
DXGI_ADAPTER_DESC1 desc;
|
||||||
|
adapter->GetDesc1(&desc);
|
||||||
|
|
||||||
|
return static_cast<Uint>(desc.VendorId);
|
||||||
|
}
|
||||||
}
|
}
|
@ -77,11 +77,7 @@ namespace xna {
|
|||||||
|
|
||||||
GraphicsDevice::GraphicsDevice() {
|
GraphicsDevice::GraphicsDevice() {
|
||||||
impl = unew<PlatformImplementation>();
|
impl = unew<PlatformImplementation>();
|
||||||
impl->_adapter = GraphicsAdapter::DefaultAdapter();
|
impl->_adapter = GraphicsAdapter::DefaultAdapter();
|
||||||
impl->_adapter->CurrentDisplayMode(
|
|
||||||
SurfaceFormat::Color,
|
|
||||||
GraphicsDeviceManager::DefaultBackBufferWidth,
|
|
||||||
GraphicsDeviceManager::DefaultBackBufferHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GraphicsDevice::GraphicsDevice(GraphicsDeviceInformation const& info) {
|
GraphicsDevice::GraphicsDevice(GraphicsDeviceInformation const& info) {
|
||||||
@ -89,11 +85,7 @@ namespace xna {
|
|||||||
|
|
||||||
impl->_adapter = info.Adapter;
|
impl->_adapter = info.Adapter;
|
||||||
impl->_gameWindow = info.Window;
|
impl->_gameWindow = info.Window;
|
||||||
impl->_presentationParameters = info.Parameters;
|
impl->_presentationParameters = info.Parameters;
|
||||||
impl->_adapter->CurrentDisplayMode(
|
|
||||||
impl->_presentationParameters->BackBufferFormat,
|
|
||||||
impl->_presentationParameters->BackBufferWidth,
|
|
||||||
impl->_presentationParameters->BackBufferHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GraphicsDevice::Initialize() {
|
bool GraphicsDevice::Initialize() {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define XNA_GRAPHICS_ADAPTER_HPP
|
#define XNA_GRAPHICS_ADAPTER_HPP
|
||||||
|
|
||||||
#include "../default.hpp"
|
#include "../default.hpp"
|
||||||
|
#include "displaymode.hpp"
|
||||||
|
|
||||||
namespace xna {
|
namespace xna {
|
||||||
//Provides methods to retrieve and manipulate graphics adapters.
|
//Provides methods to retrieve and manipulate graphics adapters.
|
||||||
@ -9,38 +10,88 @@ namespace xna {
|
|||||||
public:
|
public:
|
||||||
GraphicsAdapter();
|
GraphicsAdapter();
|
||||||
|
|
||||||
//Retrieves a string used for presentation to the user.
|
//Collection of available adapters on the system.
|
||||||
String Description() const;
|
static void Adapters(std::vector<uptr<GraphicsAdapter>>& adapters);
|
||||||
//Retrieves a value that is used to help identify a particular chip set.
|
|
||||||
Uint DeviceId() const;
|
|
||||||
//Retrieves a string that contains the device name.
|
|
||||||
String DeviceName() const;
|
|
||||||
//Determines if this instance of GraphicsAdapter is the default adapter.
|
|
||||||
bool IsDefaultAdapter() const;
|
|
||||||
//Retrieves the handle of the monitor
|
|
||||||
intptr_t MonitorHandle() const;
|
|
||||||
//Retrieves a value used to help identify the revision level of a particular chip set.
|
|
||||||
Uint Revision() const;
|
|
||||||
//Retrieves a value used to identify the subsystem.
|
|
||||||
Uint SubSystemId() const;
|
|
||||||
//Retrieves a value used to identify the manufacturer.
|
|
||||||
Uint VendorId() const;
|
|
||||||
|
|
||||||
|
//Gets the current display mode.
|
||||||
|
sptr<DisplayMode> CurrentDisplayMode();
|
||||||
|
|
||||||
|
//Gets the default adapter.
|
||||||
|
static uptr<GraphicsAdapter> DefaultAdapter();
|
||||||
|
|
||||||
|
//Retrieves a string used for presentation to the user.
|
||||||
|
constexpr String Description() const { return description; }
|
||||||
|
|
||||||
|
//Retrieves a value that is used to help identify a particular chip set.
|
||||||
|
constexpr Uint DeviceId() const { return deviceId; }
|
||||||
|
|
||||||
|
//Retrieves a string that contains the device name.
|
||||||
|
constexpr String DeviceName() const { return deviceName; }
|
||||||
|
|
||||||
|
//Determines if this instance of GraphicsAdapter is the default adapter.
|
||||||
|
constexpr bool IsDefaultAdapter() const { return isDefault; }
|
||||||
|
|
||||||
|
//Determines if the graphics adapter is in widescreen mode.
|
||||||
|
constexpr bool IsWideScreen() const { return false; }
|
||||||
|
|
||||||
|
//Retrieves the handle of the monitor
|
||||||
|
constexpr intptr_t MonitorHandle() const { return monitorHandle; }
|
||||||
|
|
||||||
|
//Retrieves a value used to help identify the revision level of a particular chip set.
|
||||||
|
constexpr Uint Revision() const { return revision; }
|
||||||
|
|
||||||
|
//Retrieves a value used to identify the subsystem.
|
||||||
|
constexpr Uint SubSystemId() const { return subSystemId; }
|
||||||
|
|
||||||
//Returns a collection of supported display modes for the current adapter.
|
//Returns a collection of supported display modes for the current adapter.
|
||||||
uptr<DisplayModeCollection> SupportedDisplayModes() const;
|
uptr<DisplayModeCollection> SupportedDisplayModes() const;
|
||||||
//Returns a collection of supported display modes for the current adapter.
|
//Returns a collection of supported display modes for the current adapter.
|
||||||
uptr<DisplayModeCollection> SupportedDisplayModes(SurfaceFormat surfaceFormat) const;
|
uptr<DisplayModeCollection> SupportedDisplayModes(SurfaceFormat surfaceFormat) const;
|
||||||
|
|
||||||
//Gets the current display mode.
|
|
||||||
sptr<DisplayMode> CurrentDisplayMode();
|
|
||||||
//Gets the current display mode.
|
|
||||||
void CurrentDisplayMode(SurfaceFormat surfaceFormat, Uint width, Uint height);
|
|
||||||
|
|
||||||
//Gets the default adapter.
|
//Retrieves a value used to identify the manufacturer.
|
||||||
static uptr<GraphicsAdapter> DefaultAdapter();
|
constexpr Uint VendorId() const { return vendorId; }
|
||||||
|
|
||||||
//Collection of available adapters on the system.
|
//Tests to see if the adapter supports the requested profile.
|
||||||
static void Adapters(std::vector<uptr<GraphicsAdapter>>& adapters);
|
bool IsProfileSupported(GraphicsProfile graphicsProfile) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Queries the adapter for support for the requested back buffer format.
|
||||||
|
bool QueryBackBufferFormat(
|
||||||
|
GraphicsProfile graphicsProfile,
|
||||||
|
SurfaceFormat format,
|
||||||
|
DepthFormat depthFormat,
|
||||||
|
Int multiSampleCount,
|
||||||
|
SurfaceFormat& selectedFormat,
|
||||||
|
DepthFormat& selectedDepthFormat,
|
||||||
|
Int& selectedMultiSampleCount
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Queries the adapter for support for the requested render target format.
|
||||||
|
bool QueryRenderTargetFormat(
|
||||||
|
GraphicsProfile graphicsProfile,
|
||||||
|
SurfaceFormat format,
|
||||||
|
DepthFormat depthFormat,
|
||||||
|
Int multiSampleCount,
|
||||||
|
SurfaceFormat& selectedFormat,
|
||||||
|
DepthFormat& selectedDepthFormat,
|
||||||
|
int& selectedMultiSampleCount
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
String description;
|
||||||
|
Uint deviceId{0};
|
||||||
|
String deviceName;
|
||||||
|
bool isDefault{ false };
|
||||||
|
intptr_t monitorHandle{ 0 };
|
||||||
|
Uint revision{ 0 };
|
||||||
|
Uint subSystemId{ 0 };
|
||||||
|
Uint vendorId{ 0 };
|
||||||
|
sptr<DisplayMode> currentDisplayMode{ nullptr };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct PlatformImplementation;
|
struct PlatformImplementation;
|
||||||
|
@ -591,15 +591,10 @@ namespace xna {
|
|||||||
|
|
||||||
struct GraphicsAdapter::PlatformImplementation {
|
struct GraphicsAdapter::PlatformImplementation {
|
||||||
comptr<IDXGIAdapter1> dxAdapter = nullptr;
|
comptr<IDXGIAdapter1> dxAdapter = nullptr;
|
||||||
comptr<IDXGIFactory1> dxFactory = nullptr;
|
comptr<IDXGIFactory1> dxFactory = nullptr;
|
||||||
|
|
||||||
private:
|
|
||||||
friend class GraphicsAdapter;
|
|
||||||
Uint _index{ 0 };
|
|
||||||
sptr<DisplayMode> _currentDisplayMode = nullptr;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool GetOutput(UINT slot, IDXGIOutput*& output) const;
|
bool GetOutput(UINT slot, IDXGIOutput*& output) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BlendRenderTarget {
|
struct BlendRenderTarget {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user