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) {}
117 void _createSwapChain();
118 virtual HRESULT _createSwapChainImpl(
IDXGIDeviceN* pDXGIDevice) = 0;
119 void _resizeSwapChainBuffers(
unsigned width,
unsigned 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);
154 void _finishSwitchingFullscreen();
156 virtual HRESULT _createSwapChainImpl(
IDXGIDeviceN* pDXGIDevice);
165 #if OGRE_PLATFORM == OGRE_PLATFORM_WINRT 176 Windows::UI::Core::CoreWindow^
getCoreWindow()
const {
return mCoreWindow.Get(); }
184 virtual HRESULT _createSwapChainImpl(
IDXGIDeviceN* pDXGIDevice);
190 #if (OGRE_PLATFORM == OGRE_PLATFORM_WINRT) && (OGRE_WINRT_TARGET_TYPE == DESKTOP_APP) 201 virtual void resize(
unsigned int width,
unsigned int height);
205 virtual bool isVisible()
const {
return mImageSourceNative != NULL; }
207 Windows::UI::Xaml::Media::ImageBrush^
getImageBrush()
const {
return mBrush; }
214 Windows::UI::Xaml::Media::ImageBrush^
mBrush;
218 #endif // (OGRE_PLATFORM == OGRE_PLATFORM_WINRT) && (OGRE_WINRT_TARGET_TYPE == DESKTOP_APP) ~D3D11RenderWindowImageSource()
Windows::UI::Xaml::Media::Imaging::SurfaceImageSource mImageSource
IDXGIFactoryN * mpDXGIFactory
virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height)
Alter fullscreen mode options.
ID3D11RenderTargetView * mRenderTargetView
IDXGISwapChainN * mpSwapChain
void _destroySizeDependedD3DResources()
ID3D11Texture2D * mpBackBuffer
void _updateViewportsDimensions()
virtual void setActive(bool state)
Used to set the active state of the render target.
Windows::UI::Core::CoreWindow getCoreWindow() const
unsigned int mVSyncInterval
IDXGISwapChain IDXGISwapChainN
IDXGIDeviceN * _queryDxgiDevice()
virtual void setHidden(bool hidden)
Hide (or show) the window.
bool isClosed() const
Indicates whether the window has been closed by the user.
virtual bool isVisible(void) const
Indicates whether the window is visible (not minimized or obscured)
DXGI_SAMPLE_DESC mFSAAType
DXGI_SWAP_CHAIN_DESC_N mSwapChainDesc
virtual void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer)
Overridden - see RenderTarget.
void reposition(int left, int top)
Reposition the window.
HWND getWindowHandle() const
ISurfaceImageSourceNative * mImageSourceNative
void resize(unsigned int width, unsigned int height)
Alter the size of the window.
bool _getSwitchingFullscreen() const
Are we in the middle of switching between fullscreen and windowed.
IDXGIDevice1 IDXGIDeviceN
virtual void update(bool swapBuffers=true)
Tells the target to update it's contents.
virtual void destroy(void)
Destroys the window.
DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC_N
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
virtual 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.
Platform::Agile< Windows::UI::Core::CoreWindow > mCoreWindow
virtual void create(const String &name, unsigned width, unsigned height, bool fullScreen, const NameValuePairList *miscParams)
IDXGIFactory1 IDXGIFactoryN
virtual void swapBuffers()
Swaps the frame buffers to display the next frame.
DXGI_SWAP_CHAIN_DESC_N * getPresentationParameters(void)
Get the presentation parameters used with this window.
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
Manages the target rendering window.
~D3D11RenderWindowSwapChainBased()
Windows::UI::Xaml::Media::ImageBrush getImageBrush() const
D3D11RenderWindowBase(D3D11Device &device, IDXGIFactoryN *pDXGIFactory)
Windows::UI::Xaml::Media::ImageBrush mBrush
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
bool requiresTextureFlipping() const
ID3D11DepthStencilView * mDepthStencilView
void _createSizeDependedD3DResources()
bool _checkMultiSampleQuality(UINT SampleCount, UINT *outQuality, DXGI_FORMAT format)
~D3D11RenderWindowCoreWindow()
virtual void windowMovedOrResized()
Notify that the window has been resized.
bool isHidden() const
Indicates whether the window was set to hidden (not displayed)
bool mSwitchingFullscreen