mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-26 01:53:47 +00:00
Improvements to openvr code
- Overlays are implemented (sans input for the moment) - Fixed a problem where the movemanager was using the wrong values for hmd rotation & position
This commit is contained in:
parent
185fde8ea4
commit
da6bcbeb2b
13 changed files with 380 additions and 32 deletions
|
|
@ -67,12 +67,6 @@ 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" );
|
||||
|
|
@ -186,8 +180,8 @@ bool GFXD3D11TextureObject::copyToBmp(GBitmap* bmp)
|
|||
// check format limitations
|
||||
// at the moment we only support RGBA for the source (other 4 byte formats should
|
||||
// be easy to add though)
|
||||
AssertFatal(mFormat == GFXFormatR8G8B8A8, "copyToBmp: invalid format");
|
||||
if (mFormat != GFXFormatR8G8B8A8)
|
||||
AssertFatal(mFormat == GFXFormatR8G8B8A8 || mFormat == GFXFormatR8G8B8A8_LINEAR_FORCE, "copyToBmp: invalid format");
|
||||
if (mFormat != GFXFormatR8G8B8A8 && mFormat != GFXFormatR8G8B8A8_LINEAR_FORCE)
|
||||
return false;
|
||||
|
||||
PROFILE_START(GFXD3D11TextureObject_copyToBmp);
|
||||
|
|
@ -203,7 +197,7 @@ bool GFXD3D11TextureObject::copyToBmp(GBitmap* bmp)
|
|||
const U32 sourceBytesPerPixel = 4;
|
||||
U32 destBytesPerPixel = 0;
|
||||
|
||||
if(bmp->getFormat() == GFXFormatR8G8B8A8)
|
||||
if (bmp->getFormat() == GFXFormatR8G8B8A8 || bmp->getFormat() == GFXFormatR8G8B8A8_LINEAR_FORCE)
|
||||
destBytesPerPixel = 4;
|
||||
else if(bmp->getFormat() == GFXFormatR8G8B8)
|
||||
destBytesPerPixel = 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue