|
// Mogre.Wpf.Interop.h
#pragma once
using namespace System;
using namespace Mogre;
namespace MogreWpf
{
namespace Interop
{
public ref class D3D9RenderSystem
{
public:
static bool IsDeviceLost(RenderWindow^ renderWindow)
{
Ogre::D3D9RenderWindow *rw = dynamic_cast<Ogre::D3D9RenderWindow *>(renderWindow->NativePtr);
if (!rw)
throw gcnew ArgumentException("Not a D3D9RenderWindow", "renderWindow");
return !SUCCEEDED(rw->getD3DDevice()->TestCooperativeLevel());
}
/*
static void RestoreDevice(RenderSystem^ renderSystem)
{
Ogre::D3D9RenderSystem *rs = dynamic_cast<Ogre::D3D9RenderSystem *>(renderSystem->NativePtr);
if (!rs)
throw gcnew ArgumentException("Not a D3D9RenderSystem", "renderSystem");
//rs->restoreLostDevice();
}
*/
};
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.