mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
Corrige DisplayMode
This commit is contained in:
parent
f429fcd0ab
commit
cf3d8f1b21
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Add source to this project's executable.
|
# Add source to this project's executable.
|
||||||
add_executable (xna WIN32 "xna.cpp" "xna.h" "platform/window-dx.cpp" "platform/device-dx.cpp" "platform/adapter-dx.cpp" "platform/swapchain-dx.cpp" "platform/rendertarget-dx.cpp" "platform/texture-dx.cpp" "platform/blendstate-dx.cpp" "platform/game-dx.cpp" "platform/clock-dx.cpp" "csharp/stream.cpp" "platform/gdevicemanager-dx.cpp" "platform/vertexinput-dx.cpp" "platform/shader-dx.cpp" "platform/rasterizerstate-dx.cpp" "platform/vertexbuffer-dx.cpp" "platform/indexbuffer-dx.cpp" "common/matrix.cpp" "platform/constbuffer-dx.cpp" "platform/databuffer-dx.cpp" "platform/samplerstate-dx.cpp" "platform/spritebatch-dx.cpp" "platform/spritefont-dx.cpp" "platform/depthstencilstate-dx.cpp" "platform/keyboard-dx.cpp" "platform/mouse-dx.cpp" "platform/gamepad-dx.cpp" "common/vectors.cpp" "platform/soundeffect-dx.cpp")
|
add_executable (xna WIN32 "xna.cpp" "xna.h" "platform/window-dx.cpp" "platform/device-dx.cpp" "platform/adapter-dx.cpp" "platform/swapchain-dx.cpp" "platform/rendertarget-dx.cpp" "platform/texture-dx.cpp" "platform/blendstate-dx.cpp" "platform/game-dx.cpp" "platform/clock-dx.cpp" "csharp/stream.cpp" "platform/gdevicemanager-dx.cpp" "platform/vertexinput-dx.cpp" "platform/shader-dx.cpp" "platform/rasterizerstate-dx.cpp" "platform/vertexbuffer-dx.cpp" "platform/indexbuffer-dx.cpp" "common/matrix.cpp" "platform/constbuffer-dx.cpp" "platform/databuffer-dx.cpp" "platform/samplerstate-dx.cpp" "platform/spritebatch-dx.cpp" "platform/spritefont-dx.cpp" "platform/depthstencilstate-dx.cpp" "platform/keyboard-dx.cpp" "platform/mouse-dx.cpp" "platform/gamepad-dx.cpp" "common/vectors.cpp" "platform/soundeffect-dx.cpp" "platform/displaymode-dx.cpp")
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||||
set_property(TARGET xna PROPERTY CXX_STANDARD 20)
|
set_property(TARGET xna PROPERTY CXX_STANDARD 20)
|
||||||
|
@ -145,6 +145,19 @@ namespace xna {
|
|||||||
Portrait = 4,
|
Portrait = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class DisplayModeScanlineOrder {
|
||||||
|
Unspecified = 0,
|
||||||
|
Progressive = 1,
|
||||||
|
UpperFieldFirst = 2,
|
||||||
|
LowerFieldFirst = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class DisplayModeScaling {
|
||||||
|
Unspecified = 0,
|
||||||
|
Centered = 1,
|
||||||
|
Stretched = 2
|
||||||
|
};
|
||||||
|
|
||||||
enum class FillMode
|
enum class FillMode
|
||||||
{
|
{
|
||||||
Solid,
|
Solid,
|
||||||
@ -421,6 +434,7 @@ namespace xna {
|
|||||||
HalfVector2 = 17,
|
HalfVector2 = 17,
|
||||||
HalfVector4 = 18,
|
HalfVector4 = 18,
|
||||||
HdrBlendable = 19,
|
HdrBlendable = 19,
|
||||||
|
Unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class TextureAddressMode {
|
enum class TextureAddressMode {
|
||||||
|
@ -98,6 +98,7 @@ namespace xna {
|
|||||||
using PDepthStencilState = std::shared_ptr<DepthStencilState>;
|
using PDepthStencilState = std::shared_ptr<DepthStencilState>;
|
||||||
class DisplayMode;
|
class DisplayMode;
|
||||||
using PDisplayMode = std::shared_ptr<DisplayMode>;
|
using PDisplayMode = std::shared_ptr<DisplayMode>;
|
||||||
|
using UDisplayMode = std::unique_ptr<DisplayMode>;
|
||||||
class DisplayModeCollection;
|
class DisplayModeCollection;
|
||||||
using PDisplayModeCollection = std::shared_ptr<DisplayModeCollection>;
|
using PDisplayModeCollection = std::shared_ptr<DisplayModeCollection>;
|
||||||
using UDisplayModeCollection = std::unique_ptr<DisplayModeCollection>;
|
using UDisplayModeCollection = std::unique_ptr<DisplayModeCollection>;
|
||||||
|
@ -20,10 +20,11 @@ namespace xna {
|
|||||||
virtual Uint SubSystemId() const = 0;
|
virtual Uint SubSystemId() const = 0;
|
||||||
virtual Uint VendorId() const = 0;
|
virtual Uint VendorId() const = 0;
|
||||||
virtual UDisplayModeCollection SupportedDisplayModes() const = 0;
|
virtual UDisplayModeCollection SupportedDisplayModes() const = 0;
|
||||||
|
virtual UDisplayMode CurrentDisplayMode() const = 0;
|
||||||
|
|
||||||
static UGraphicsAdapter DefaultAdapter();
|
static UGraphicsAdapter DefaultAdapter();
|
||||||
static void GetAllAdapters(std::vector<PGraphicsAdapter>& adapters);
|
static void Adapters(std::vector<PGraphicsAdapter>& adapters);
|
||||||
static void GetAllAdapters(std::vector<UGraphicsAdapter>& adapters);
|
static void Adapters(std::vector<UGraphicsAdapter>& adapters);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,93 +1,27 @@
|
|||||||
#ifndef XNA_GRAPHICS_DISPLAYMODE_HPP
|
#ifndef XNA_GRAPHICS_DISPLAYMODE_HPP
|
||||||
#define XNA_GRAPHICS_DISPLAYMODE_HPP
|
#define XNA_GRAPHICS_DISPLAYMODE_HPP
|
||||||
|
|
||||||
#include "../enums.hpp"
|
#include "../default.hpp"
|
||||||
#include "../types.hpp"
|
|
||||||
#include "../forward.hpp"
|
|
||||||
|
|
||||||
namespace xna {
|
namespace xna {
|
||||||
class DisplayMode {
|
struct DisplayModeDescription;
|
||||||
|
|
||||||
|
class IDisplayMode {
|
||||||
public:
|
public:
|
||||||
constexpr DisplayMode() = default;
|
virtual ~IDisplayMode() {}
|
||||||
|
virtual float AspectRatio() const = 0;
|
||||||
constexpr DisplayMode(Int width, Int height, SurfaceFormat format)
|
virtual Int Width() const = 0;
|
||||||
: _width(width), _height(height), _format(format) {}
|
virtual Int Height() const = 0;
|
||||||
|
virtual SurfaceFormat Format() const = 0;
|
||||||
constexpr float AspectRatio() const noexcept {
|
virtual std::vector<DisplayModeDescription> Descriptions() const = 0;
|
||||||
if (_height == 0 || _width == 0)
|
};
|
||||||
return 0;
|
|
||||||
|
|
||||||
return static_cast<float>(_width) / static_cast<float>(_height);
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr Int Width() const {
|
|
||||||
return _width;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr Int Height() const {
|
|
||||||
return _height;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr SurfaceFormat Format() const {
|
|
||||||
return _format;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
class IDisplayModeCollection {
|
||||||
public:
|
public:
|
||||||
Int _width{ 0 };
|
virtual ~IDisplayModeCollection() {}
|
||||||
Int _height{ 0 };
|
virtual std::vector<PDisplayMode> At(SurfaceFormat format) const = 0;
|
||||||
SurfaceFormat _format{ SurfaceFormat::Color };
|
virtual void At(SurfaceFormat format, std::vector<PDisplayMode>& modes) const = 0;
|
||||||
};
|
virtual size_t SurfaceCount(SurfaceFormat format) const = 0;
|
||||||
|
|
||||||
class DisplayModeCollection {
|
|
||||||
public:
|
|
||||||
constexpr DisplayModeCollection() = default;
|
|
||||||
|
|
||||||
DisplayModeCollection(size_t count) : _displayModes(count){}
|
|
||||||
|
|
||||||
DisplayModeCollection(std::vector<DisplayMode> const& displayModes) :
|
|
||||||
_displayModes(displayModes) {}
|
|
||||||
|
|
||||||
std::vector<DisplayMode> At(SurfaceFormat format) const {
|
|
||||||
std::vector<DisplayMode> modes;
|
|
||||||
At(format, modes);
|
|
||||||
return modes;
|
|
||||||
}
|
|
||||||
|
|
||||||
void At(SurfaceFormat format, std::vector<DisplayMode>& modes) const {
|
|
||||||
size_t counter = 0;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < _displayModes.size(); ++i) {
|
|
||||||
const auto& displayMode = _displayModes[i];
|
|
||||||
|
|
||||||
if (displayMode.Format() == format)
|
|
||||||
{
|
|
||||||
modes.push_back(displayMode);
|
|
||||||
++counter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!modes.empty())
|
|
||||||
modes.resize(counter);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t SurfaceCount(SurfaceFormat format) const {
|
|
||||||
size_t counter = 0;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < _displayModes.size(); ++i) {
|
|
||||||
if (_displayModes[i].Format() == format) {
|
|
||||||
++counter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<DisplayMode> operator[](SurfaceFormat format) const {
|
|
||||||
return At(format);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
std::vector<DisplayMode> _displayModes;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace xna {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IGraphicsAdapter::GetAllAdapters(std::vector<PGraphicsAdapter>& adapters){
|
void IGraphicsAdapter::Adapters(std::vector<PGraphicsAdapter>& adapters){
|
||||||
IDXGIFactory1* pFactory = nullptr;
|
IDXGIFactory1* pFactory = nullptr;
|
||||||
|
|
||||||
if FAILED(CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&pFactory))
|
if FAILED(CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&pFactory))
|
||||||
@ -48,7 +48,7 @@ namespace xna {
|
|||||||
pFactory = nullptr;
|
pFactory = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IGraphicsAdapter::GetAllAdapters(std::vector<UGraphicsAdapter>& adapters) {
|
void IGraphicsAdapter::Adapters(std::vector<UGraphicsAdapter>& adapters) {
|
||||||
IDXGIFactory1* pFactory = nullptr;
|
IDXGIFactory1* pFactory = nullptr;
|
||||||
|
|
||||||
if FAILED(CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&pFactory))
|
if FAILED(CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&pFactory))
|
||||||
@ -180,18 +180,50 @@ namespace xna {
|
|||||||
|
|
||||||
pOutput->Release();
|
pOutput->Release();
|
||||||
|
|
||||||
auto collection = uNew<DisplayModeCollection>(totalModes);
|
auto collection = uNew<DisplayModeCollection>();
|
||||||
|
DisplayMode currentDisplayMode{};
|
||||||
|
std::vector<PDisplayMode> displayList;
|
||||||
|
PDisplayMode pDisplay = nullptr;
|
||||||
|
size_t displayCount = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < totalModes; ++i) {
|
for (size_t i = 0; i < totalModes; ++i) {
|
||||||
const auto& modedesc = buffer[i];
|
auto& modedesc = buffer[i];
|
||||||
const auto surface = GraphicsAdapter::ToSurface(modedesc.Format);
|
|
||||||
|
|
||||||
collection->_displayModes[i] = DisplayMode(modedesc.Width, modedesc.Height, surface);
|
DisplayModeDescription description;
|
||||||
}
|
description._refreshRate = modedesc.RefreshRate;
|
||||||
|
description._scaling = static_cast<DisplayModeScaling>(modedesc.Scaling);
|
||||||
|
description._scanlineOrdering = static_cast<DisplayModeScanlineOrder>(modedesc.ScanlineOrdering);
|
||||||
|
|
||||||
|
if (pDisplay && pDisplay->_width == modedesc.Width && pDisplay->_height == modedesc.Height && pDisplay->_format == GraphicsAdapter::ToSurface(modedesc.Format)) {
|
||||||
|
pDisplay->_descriptions.push_back(description);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pDisplay = New<DisplayMode>();
|
||||||
|
pDisplay->_width = modedesc.Width;
|
||||||
|
pDisplay->_height = modedesc.Height;
|
||||||
|
pDisplay->_format = GraphicsAdapter::ToSurface(modedesc.Format);
|
||||||
|
pDisplay->_descriptions.push_back(description);
|
||||||
|
displayList.push_back(pDisplay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
collection->_displayModes = displayList;
|
||||||
|
|
||||||
return std::move(collection);
|
return std::move(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UDisplayMode GraphicsAdapter::CurrentDisplayMode() const {
|
||||||
|
if (!_adapter) return nullptr;
|
||||||
|
IDXGIOutput* pOutput = nullptr;
|
||||||
|
|
||||||
|
if (_adapter->EnumOutputs(0, &pOutput) != DXGI_ERROR_NOT_FOUND) {
|
||||||
|
pOutput->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
#define XNA_PLATFORM_ADAPTER_DX_HPP
|
#define XNA_PLATFORM_ADAPTER_DX_HPP
|
||||||
|
|
||||||
#include "../graphics/adapter.hpp"
|
#include "../graphics/adapter.hpp"
|
||||||
|
#include "displaymode-dx.hpp"
|
||||||
#include "dxheaders.hpp"
|
#include "dxheaders.hpp"
|
||||||
|
|
||||||
namespace xna {
|
namespace xna {
|
||||||
@ -27,6 +28,7 @@ namespace xna {
|
|||||||
virtual Uint VendorId() const override;
|
virtual Uint VendorId() const override;
|
||||||
virtual UDisplayModeCollection SupportedDisplayModes() const override;
|
virtual UDisplayModeCollection SupportedDisplayModes() const override;
|
||||||
virtual constexpr bool IsDefaultAdapter() const { return _index == 0; }
|
virtual constexpr bool IsDefaultAdapter() const { return _index == 0; }
|
||||||
|
virtual UDisplayMode CurrentDisplayMode() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IDXGIAdapter1* _adapter{ nullptr };
|
IDXGIAdapter1* _adapter{ nullptr };
|
||||||
@ -123,7 +125,7 @@ namespace xna {
|
|||||||
case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
||||||
return SurfaceFormat::HalfVector4;
|
return SurfaceFormat::HalfVector4;
|
||||||
default:
|
default:
|
||||||
return SurfaceFormat::Color;
|
return SurfaceFormat::Unknown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
|
|
||||||
#include "../graphics/device.hpp"
|
#include "../graphics/device.hpp"
|
||||||
#include "../graphics/presentparams.hpp"
|
#include "../graphics/presentparams.hpp"
|
||||||
|
#include "adapter-dx.hpp"
|
||||||
|
#include "gdeviceinfo-dx.hpp"
|
||||||
|
#include "../common/color.hpp"
|
||||||
|
#include "window-dx.hpp"
|
||||||
|
#include "../graphics/viewport.hpp"
|
||||||
|
#include "swapchain-dx.hpp"
|
||||||
#include "dxgi.h"
|
#include "dxgi.h"
|
||||||
#include "d3d11.h"
|
#include "d3d11.h"
|
||||||
|
|
||||||
|
1
framework/platform/displaymode-dx.cpp
Normal file
1
framework/platform/displaymode-dx.cpp
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "displaymode-dx.hpp"
|
135
framework/platform/displaymode-dx.hpp
Normal file
135
framework/platform/displaymode-dx.hpp
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
#ifndef XNA_PLATFORM_DISPLAYMODE_DX_HPP
|
||||||
|
#define XNA_PLATFORM_DISPLAYMODE_DX_HPP
|
||||||
|
|
||||||
|
#include "../graphics/displaymode.hpp"
|
||||||
|
#include "dxheaders.hpp"
|
||||||
|
|
||||||
|
namespace xna {
|
||||||
|
struct DisplayModeRefreshRate {
|
||||||
|
constexpr DisplayModeRefreshRate() = default;
|
||||||
|
|
||||||
|
constexpr DisplayModeRefreshRate(DXGI_RATIONAL const& dxrational) {
|
||||||
|
Numerator = dxrational.Numerator;
|
||||||
|
Denominator = dxrational.Denominator;
|
||||||
|
}
|
||||||
|
constexpr DisplayModeRefreshRate(Uint numerator, Uint denominator)
|
||||||
|
: Numerator(numerator), Denominator(denominator){}
|
||||||
|
|
||||||
|
Uint Numerator{ 0 };
|
||||||
|
Uint Denominator{ 0 };
|
||||||
|
|
||||||
|
constexpr bool operator==(const DisplayModeRefreshRate& other) const
|
||||||
|
{
|
||||||
|
return Numerator == other.Numerator && Denominator == other.Denominator;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DisplayModeDescription {
|
||||||
|
DisplayModeScanlineOrder _scanlineOrdering{ DisplayModeScanlineOrder::Unspecified };
|
||||||
|
DisplayModeScaling _scaling{ DisplayModeScaling::Unspecified };
|
||||||
|
DisplayModeRefreshRate _refreshRate{};
|
||||||
|
|
||||||
|
constexpr bool operator==(const DisplayModeDescription& other) const
|
||||||
|
{
|
||||||
|
return _scanlineOrdering == other._scanlineOrdering && _scaling == other._scaling && _refreshRate == other._refreshRate;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class DisplayMode : public IDisplayMode {
|
||||||
|
public:
|
||||||
|
constexpr DisplayMode() = default;
|
||||||
|
|
||||||
|
constexpr DisplayMode(Int width, Int height, SurfaceFormat format)
|
||||||
|
: _width(width), _height(height), _format(format) {}
|
||||||
|
|
||||||
|
virtual constexpr float AspectRatio() const noexcept override {
|
||||||
|
if (_height == 0 || _width == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return static_cast<float>(_width) / static_cast<float>(_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual constexpr Int Width() const override {
|
||||||
|
return _width;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual constexpr Int Height() const override {
|
||||||
|
return _height;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual constexpr SurfaceFormat Format() const override {
|
||||||
|
return _format;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual constexpr std::vector<DisplayModeDescription> Descriptions() const {
|
||||||
|
return _descriptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
Int _width{ 0 };
|
||||||
|
Int _height{ 0 };
|
||||||
|
SurfaceFormat _format{ SurfaceFormat::Color };
|
||||||
|
std::vector<DisplayModeDescription> _descriptions;
|
||||||
|
|
||||||
|
constexpr bool operator==(const DisplayMode& other) const {
|
||||||
|
return _width == other._width
|
||||||
|
&& _height == other._height
|
||||||
|
&& _format == other._format
|
||||||
|
&& _descriptions == other._descriptions;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class DisplayModeCollection : public IDisplayModeCollection {
|
||||||
|
public:
|
||||||
|
constexpr DisplayModeCollection() = default;
|
||||||
|
|
||||||
|
DisplayModeCollection(size_t count) : _displayModes(count) {}
|
||||||
|
|
||||||
|
DisplayModeCollection(std::vector<PDisplayMode> const& displayModes) :
|
||||||
|
_displayModes(displayModes) {}
|
||||||
|
|
||||||
|
std::vector<PDisplayMode> At(SurfaceFormat format) const {
|
||||||
|
std::vector<PDisplayMode> modes;
|
||||||
|
At(format, modes);
|
||||||
|
return modes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void At(SurfaceFormat format, std::vector<PDisplayMode>& modes) const {
|
||||||
|
size_t counter = 0;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < _displayModes.size(); ++i) {
|
||||||
|
const auto& displayMode = _displayModes[i];
|
||||||
|
|
||||||
|
if (displayMode->Format() == format)
|
||||||
|
{
|
||||||
|
modes.push_back(displayMode);
|
||||||
|
++counter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!modes.empty())
|
||||||
|
modes.resize(counter);
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t SurfaceCount(SurfaceFormat format) const {
|
||||||
|
size_t counter = 0;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < _displayModes.size(); ++i) {
|
||||||
|
if (_displayModes[i]->Format() == format) {
|
||||||
|
++counter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<PDisplayMode> operator[](SurfaceFormat format) const {
|
||||||
|
return At(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
std::vector<PDisplayMode> _displayModes;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,5 +1,7 @@
|
|||||||
#include "dxgi.h"
|
#include "dxgi.h"
|
||||||
#include "d3d11.h"
|
#include "d3d11.h"
|
||||||
|
#include <d3d11_1.h>
|
||||||
|
#include <d3d11_2.h>
|
||||||
#include <d3dcompiler.h>
|
#include <d3dcompiler.h>
|
||||||
#include <DirectXMath.h>
|
#include <DirectXMath.h>
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
|
@ -20,7 +20,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Initialize() override {
|
void Initialize() override {
|
||||||
graphics->Initialize();
|
graphics->Initialize();
|
||||||
|
const auto modes= _graphicsDevice->Adapter()->SupportedDisplayModes();
|
||||||
|
|
||||||
Game::Initialize();
|
Game::Initialize();
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,6 @@
|
|||||||
#include "platform/mouse-dx.hpp"
|
#include "platform/mouse-dx.hpp"
|
||||||
#include "platform/gamepad-dx.hpp"
|
#include "platform/gamepad-dx.hpp"
|
||||||
#include "platform/audioengine-dx.hpp"
|
#include "platform/audioengine-dx.hpp"
|
||||||
|
#include "platform/adapter-dx.hpp"
|
||||||
|
|
||||||
// TODO: Reference additional headers your program requires here.
|
// TODO: Reference additional headers your program requires here.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user