29 #ifndef __D3D11RENDERWINDOW_H__
30 #define __D3D11RENDERWINDOW_H__
35 #if OGRE_PLATFORM == OGRE_PLATFORM_WINRT
36 #pragma warning( disable : 4451 ) // http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/314b5826-0a66-4307-abfe-87b8052c3c07/
39 # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP)
40 # include <windows.ui.xaml.media.dxinterop.h>
57 void resize(
unsigned int width,
unsigned int height) {}
127 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
141 void resize(
unsigned int width,
unsigned int height);
142 void setFullscreen(
bool fullScreen,
unsigned int width,
unsigned int height);
165 #if OGRE_PLATFORM == OGRE_PLATFORM_WINRT
190 #if (OGRE_PLATFORM == OGRE_PLATFORM_WINRT) && (OGRE_WINRT_TARGET_TYPE == DESKTOP_APP)
201 virtual void resize(
unsigned int width,
unsigned int height);
214 Windows::UI::Xaml::Media::ImageBrush^
mBrush;
218 #endif // (OGRE_PLATFORM == OGRE_PLATFORM_WINRT) && (OGRE_WINRT_TARGET_TYPE == DESKTOP_APP)
~D3D11RenderWindowImageSource()
virtual void swapBuffers()
Swaps the frame buffers to display the next frame.
bool isClosed() const
Indicates whether the window has been closed by the user.
Windows::UI::Xaml::Media::Imaging::SurfaceImageSource mImageSource
IDXGIFactoryN * mpDXGIFactory
ID3D11RenderTargetView * mRenderTargetView
virtual void destroy(void)
Destroys the window.
IDXGISwapChainN * mpSwapChain
void _destroySizeDependedD3DResources()
ID3D11Texture2D * mpBackBuffer
void _updateViewportsDimensions()
void resize(unsigned int width, unsigned int height)
Alter the size of the window.
unsigned int mVSyncInterval
virtual void create(const String &name, unsigned width, unsigned height, bool fullScreen, const NameValuePairList *miscParams)
IDXGISwapChain IDXGISwapChainN
IDXGIDeviceN * _queryDxgiDevice()
virtual void destroy(void)
Destroys the window.
DXGI_SAMPLE_DESC mFSAAType
Windows::UI::Xaml::Media::ImageBrush getImageBrush() const
virtual void update(bool swapBuffers=true)
Tells the target to update it's contents.
void windowMovedOrResized()
Notify that the window has been resized.
D3D11RenderWindowHwnd(D3D11Device &device, IDXGIFactoryN *pDXGIFactory)
DXGI_SWAP_CHAIN_DESC_N mSwapChainDesc
virtual HRESULT _createSwapChainImpl(IDXGIDeviceN *pDXGIDevice)
virtual void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer)
Overridden - see RenderTarget.
void _createSizeDependedD3DResources()
void reposition(int left, int top)
Reposition the window.
bool _getSwitchingFullscreen() const
Are we in the middle of switching between fullscreen and windowed.
ISurfaceImageSourceNative * mImageSourceNative
void resize(unsigned int width, unsigned int height)
Alter the size of the window.
void _resizeSwapChainBuffers(unsigned width, unsigned height)
virtual void create(const String &name, unsigned width, unsigned height, bool fullScreen, const NameValuePairList *miscParams)
D3D11RenderWindowCoreWindow(D3D11Device &device, IDXGIFactoryN *pDXGIFactory)
virtual void create(const String &name, unsigned width, unsigned height, bool fullScreen, const NameValuePairList *miscParams)
Windows::UI::Core::CoreWindow getCoreWindow() const
IDXGIDevice1 IDXGIDeviceN
virtual HRESULT _createSwapChainImpl(IDXGIDeviceN *pDXGIDevice)
virtual void destroy(void)
Destroys the window.
D3D11RenderWindowSwapChainBased(D3D11Device &device, IDXGIFactoryN *pDXGIFactory)
DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC_N
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
virtual void resize(unsigned int width, unsigned int height)
Alter the size of the window.
D3D11RenderWindowImageSource(D3D11Device &device, IDXGIFactoryN *pDXGIFactory)
void reposition(int left, int top)
Reposition the window.
virtual void destroy(void)
Destroys the window.
void getCustomAttribute(const String &name, void *pData)
Gets a custom (maybe platform-specific) attribute.
Platform::Agile< Windows::UI::Core::CoreWindow > mCoreWindow
virtual void create(const String &name, unsigned width, unsigned height, bool fullScreen, const NameValuePairList *miscParams)
void _createSizeDependedD3DResources()
virtual void getCustomAttribute(const String &name, void *pData)
Gets a custom (maybe platform-specific) attribute.
IDXGIFactory1 IDXGIFactoryN
void _finishSwitchingFullscreen()
Indicate that fullscreen / windowed switching has finished.
DXGI_SWAP_CHAIN_DESC_N * getPresentationParameters(void)
Get the presentation parameters used with this window.
bool isVisible() const
Indicates whether the window is visible (not minimized or obscured)
bool isHidden() const
Indicates whether the window was set to hidden (not displayed)
Manages the target rendering window.
~D3D11RenderWindowSwapChainBased()
virtual bool isVisible() const
Indicates whether the window is visible (not minimized or obscured)
virtual void destroy(void)
Destroys the window.
D3D11RenderWindowBase(D3D11Device &device, IDXGIFactoryN *pDXGIFactory)
Windows::UI::Xaml::Media::ImageBrush mBrush
void swapBuffers()
Swaps the frame buffers to display the next frame.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
virtual HRESULT _createSwapChainImpl(IDXGIDeviceN *pDXGIDevice)=0
bool isVisible() const
Indicates whether the window is visible (not minimized or obscured)
void getCustomAttribute(const String &name, void *pData)
Gets a custom (maybe platform-specific) attribute.
HWND getWindowHandle() const
void setFullscreen(bool fullScreen, unsigned int width, unsigned int height)
Alter fullscreen mode options.
ID3D11DepthStencilView * mDepthStencilView
void _createSizeDependedD3DResources()
bool _checkMultiSampleQuality(UINT SampleCount, UINT *outQuality, DXGI_FORMAT format)
~D3D11RenderWindowCoreWindow()
void setActive(bool state)
Used to set the active state of the render target.
void setHidden(bool hidden)
Hide (or show) the window.
bool requiresTextureFlipping() const
void windowMovedOrResized()
Notify that the window has been resized.
bool mSwitchingFullscreen