Direct3D11 Engine/source changes

This commit is contained in:
rextimmy 2016-03-20 21:52:11 +10:00
parent 3a9b50f702
commit 41e5caf22b
81 changed files with 1291 additions and 617 deletions

View file

@ -70,6 +70,7 @@ GFXVertexFormat::GFXVertexFormat()
mHasColor( false ),
mHasNormal( false ),
mHasTangent( false ),
mHasInstancing( false ),
mTexCoordCount( 0 ),
mSizeInBytes( 0 ),
mDecl( NULL )
@ -83,6 +84,7 @@ void GFXVertexFormat::copy( const GFXVertexFormat &format )
mHasNormal = format.mHasNormal;
mHasTangent = format.mHasTangent;
mHasColor = format.mHasColor;
mHasInstancing = format.mHasInstancing;
mTexCoordCount = format.mTexCoordCount;
mSizeInBytes = format.mSizeInBytes;
mDescription = format.mDescription;
@ -161,6 +163,14 @@ bool GFXVertexFormat::hasColor() const
return mHasColor;
}
bool GFXVertexFormat::hasInstancing() const
{
if (mDirty)
const_cast<GFXVertexFormat*>(this)->_updateDirty();
return mHasInstancing;
}
U32 GFXVertexFormat::getTexCoordCount() const
{
if ( mDirty )
@ -177,6 +187,11 @@ U32 GFXVertexFormat::getSizeInBytes() const
return mSizeInBytes;
}
void GFXVertexFormat::enableInstancing()
{
mHasInstancing = true;
}
void GFXVertexFormat::_updateDirty()
{
PROFILE_SCOPE( GFXVertexFormat_updateDirty );