mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Cleanup.
This commit is contained in:
parent
1f696d2f7f
commit
584a32038f
4 changed files with 36 additions and 36 deletions
|
@ -94,7 +94,7 @@ static const uint16_t s_cubeIndices[36] =
|
||||||
|
|
||||||
8, 10, 9,
|
8, 10, 9,
|
||||||
9, 10, 11,
|
9, 10, 11,
|
||||||
12, 13, 14,
|
12, 13, 14,
|
||||||
13, 15, 14,
|
13, 15, 14,
|
||||||
|
|
||||||
16, 18, 17,
|
16, 18, 17,
|
||||||
|
|
|
@ -96,8 +96,8 @@ namespace bgfx
|
||||||
|
|
||||||
namespace bgfx
|
namespace bgfx
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
void winrtSetWindow(IUnknown* _window);
|
void winrtSetWindow(IUnknown* _window);
|
||||||
|
|
||||||
} // namespace bgfx
|
} // namespace bgfx
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# ifndef BGFX_CONFIG_RENDERER_DIRECT3D11
|
# ifndef BGFX_CONFIG_RENDERER_DIRECT3D11
|
||||||
# define BGFX_CONFIG_RENDERER_DIRECT3D11 (0 \
|
# define BGFX_CONFIG_RENDERER_DIRECT3D11 (0 \
|
||||||
|| (BX_PLATFORM_WINDOWS && BX_PLATFORM_WINDOWS >= 0x0601 /*_WIN32_WINNT_WIN7*/) \
|
|| (BX_PLATFORM_WINDOWS && BX_PLATFORM_WINDOWS >= 0x0601 /*_WIN32_WINNT_WIN7*/) \
|
||||||
|| BX_PLATFORM_WINRT \
|
|| BX_PLATFORM_WINRT \
|
||||||
? 1 : 0)
|
? 1 : 0)
|
||||||
# endif // BGFX_CONFIG_RENDERER_DIRECT3D11
|
# endif // BGFX_CONFIG_RENDERER_DIRECT3D11
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
|| BX_PLATFORM_RPI \
|
|| BX_PLATFORM_RPI \
|
||||||
|| BX_PLATFORM_WINDOWS \
|
|| BX_PLATFORM_WINDOWS \
|
||||||
|| BX_PLATFORM_XBOX360 \
|
|| BX_PLATFORM_XBOX360 \
|
||||||
|| BX_PLATFORM_WINRT \
|
|| BX_PLATFORM_WINRT \
|
||||||
? 1 : 0) )
|
? 1 : 0) )
|
||||||
#endif // BGFX_CONFIG_MULTITHREADED
|
#endif // BGFX_CONFIG_MULTITHREADED
|
||||||
|
|
||||||
|
|
|
@ -607,7 +607,7 @@ RENDERDOC_IMPORT
|
||||||
|
|
||||||
IDXGIFactory* factory;
|
IDXGIFactory* factory;
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
// WinRT requires the IDXGIFactory2 interface, which isn't supported on older platforms
|
// WinRT requires the IDXGIFactory2 interface, which isn't supported on older platforms
|
||||||
hr = CreateDXGIFactory1(__uuidof(IDXGIFactory2), (void**)&factory);
|
hr = CreateDXGIFactory1(__uuidof(IDXGIFactory2), (void**)&factory);
|
||||||
BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Unable to create DXGI factory.");
|
BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Unable to create DXGI factory.");
|
||||||
#else
|
#else
|
||||||
|
@ -1332,7 +1332,7 @@ RENDERDOC_IMPORT
|
||||||
{
|
{
|
||||||
bool resize = (m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK);
|
bool resize = (m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK);
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
resize = false; // can't use ResizeBuffers on Windows Phone
|
resize = false; // can't use ResizeBuffers on Windows Phone
|
||||||
#endif
|
#endif
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
|
|
||||||
|
@ -1342,7 +1342,7 @@ RENDERDOC_IMPORT
|
||||||
m_resolution = _resolution;
|
m_resolution = _resolution;
|
||||||
m_resolution.m_flags = flags;
|
m_resolution.m_flags = flags;
|
||||||
|
|
||||||
setBufferSize(_resolution.m_width, _resolution.m_height);
|
setBufferSize(_resolution.m_width, _resolution.m_height);
|
||||||
|
|
||||||
preReset();
|
preReset();
|
||||||
|
|
||||||
|
@ -1363,11 +1363,11 @@ RENDERDOC_IMPORT
|
||||||
DX_RELEASE(m_swapChain, 0);
|
DX_RELEASE(m_swapChain, 0);
|
||||||
|
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
hr = m_factory->CreateSwapChainForCoreWindow(m_device
|
hr = m_factory->CreateSwapChainForCoreWindow(m_device
|
||||||
, g_bgfxCoreWindow
|
, g_bgfxCoreWindow
|
||||||
, &m_scd
|
, &m_scd
|
||||||
, NULL
|
, NULL
|
||||||
, &m_swapChain
|
, &m_swapChain
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
|
@ -1800,43 +1800,43 @@ RENDERDOC_IMPORT
|
||||||
return sampler;
|
return sampler;
|
||||||
}
|
}
|
||||||
|
|
||||||
DXGI_FORMAT getBufferFormat()
|
DXGI_FORMAT getBufferFormat()
|
||||||
{
|
{
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
return m_scd.Format;
|
return m_scd.Format;
|
||||||
#else
|
#else
|
||||||
return m_scd.BufferDesc.Format;
|
return m_scd.BufferDesc.Format;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getBufferWidth()
|
uint32_t getBufferWidth()
|
||||||
{
|
{
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
return m_scd.Width;
|
return m_scd.Width;
|
||||||
#else
|
#else
|
||||||
return m_scd.BufferDesc.Width;
|
return m_scd.BufferDesc.Width;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getBufferHeight()
|
uint32_t getBufferHeight()
|
||||||
{
|
{
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
return m_scd.Height;
|
return m_scd.Height;
|
||||||
#else
|
#else
|
||||||
return m_scd.BufferDesc.Height;
|
return m_scd.BufferDesc.Height;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void setBufferSize(uint32_t _width, uint32_t _height)
|
void setBufferSize(uint32_t _width, uint32_t _height)
|
||||||
{
|
{
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
m_scd.Width = _width;
|
m_scd.Width = _width;
|
||||||
m_scd.Height = _height;
|
m_scd.Height = _height;
|
||||||
#else
|
#else
|
||||||
m_scd.BufferDesc.Width = _width;
|
m_scd.BufferDesc.Width = _width;
|
||||||
m_scd.BufferDesc.Height = _height;
|
m_scd.BufferDesc.Height = _height;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void commitTextureStage()
|
void commitTextureStage()
|
||||||
{
|
{
|
||||||
|
@ -2238,11 +2238,11 @@ RENDERDOC_IMPORT
|
||||||
IDXGIAdapter* m_adapter;
|
IDXGIAdapter* m_adapter;
|
||||||
DXGI_ADAPTER_DESC m_adapterDesc;
|
DXGI_ADAPTER_DESC m_adapterDesc;
|
||||||
#if BX_PLATFORM_WINRT
|
#if BX_PLATFORM_WINRT
|
||||||
IDXGIFactory2* m_factory;
|
IDXGIFactory2* m_factory;
|
||||||
IDXGISwapChain1* m_swapChain;
|
IDXGISwapChain1* m_swapChain;
|
||||||
#else
|
#else
|
||||||
IDXGIFactory* m_factory;
|
IDXGIFactory* m_factory;
|
||||||
IDXGISwapChain* m_swapChain;
|
IDXGISwapChain* m_swapChain;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint16_t m_lost;
|
uint16_t m_lost;
|
||||||
|
|
Loading…
Reference in a new issue