mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 15:25:40 +00:00
Basic port of code
This commit is contained in:
parent
93a36f006f
commit
64b751a7c8
19 changed files with 613 additions and 374 deletions
|
|
@ -128,6 +128,9 @@ void GFXD3D11Device::enumerateAdapters(Vector<GFXAdapter*> &adapterList)
|
|||
DXGI_ADAPTER_DESC1 desc;
|
||||
EnumAdapter->GetDesc1(&desc);
|
||||
|
||||
// LUID identifies adapter for oculus rift
|
||||
dMemcpy(&toAdd->mLUID, &desc.AdapterLuid, sizeof(toAdd->mLUID));
|
||||
|
||||
size_t size=wcslen(desc.Description);
|
||||
char *str = new char[size+1];
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
class PlatformWindow;
|
||||
class GFXD3D11ShaderConstBuffer;
|
||||
class OculusVRHMDDevice;
|
||||
class D3D11OculusTexture;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -53,6 +55,8 @@ class GFXD3D11Device : public GFXDevice
|
|||
friend class GFXD3D11TextureObject;
|
||||
friend class GFXD3D11TextureTarget;
|
||||
friend class GFXD3D11WindowTarget;
|
||||
friend class OculusVRHMDDevice;
|
||||
friend class D3D11OculusTexture;
|
||||
|
||||
virtual GFXFormat selectSupportedFormat(GFXTextureProfile *profile,
|
||||
const Vector<GFXFormat> &formats, bool texture, bool mustblend, bool mustfilter);
|
||||
|
|
|
|||
|
|
@ -163,6 +163,13 @@ void GFXD3D11TextureTarget::attachTexture( RenderSlot slot, GFXTextureObject *te
|
|||
mTargetSize = Point2I(sd.Width, sd.Height);
|
||||
|
||||
S32 format = sd.Format;
|
||||
|
||||
if (format == DXGI_FORMAT_R8G8B8A8_TYPELESS || format == DXGI_FORMAT_B8G8R8A8_TYPELESS)
|
||||
{
|
||||
mTargetFormat = GFXFormatR8G8B8A8;
|
||||
return;
|
||||
}
|
||||
|
||||
GFXREVERSE_LOOKUP( GFXD3D11TextureFormat, GFXFormat, format );
|
||||
mTargetFormat = (GFXFormat)format;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,12 @@ GFXLockedRect *GFXD3D11TextureObject::lock(U32 mipLevel /*= 0*/, RectI *inRect /
|
|||
|
||||
D3D11_MAPPED_SUBRESOURCE mapInfo;
|
||||
|
||||
/*if (!mProfile->canModify())
|
||||
{
|
||||
AssertFatal(false, "Tried to modify external texture");
|
||||
return NULL;
|
||||
}*/
|
||||
|
||||
if( mProfile->isRenderTarget() )
|
||||
{
|
||||
//AssertFatal( 0, "GFXD3D11TextureObject::lock - Need to handle mapping render targets" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue