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

@ -22,10 +22,6 @@
#ifndef _MISCSHDRDAT_H_
#define _MISCSHDRDAT_H_
#ifndef _PLATFORM_H_
#include "platform/platform.h"
#endif
//**************************************************************************
// This file is an attempt to keep certain classes from having to know about
// the ShaderGen class
@ -45,6 +41,7 @@ enum RegisterType
RT_COLOR,
RT_TEXCOORD,
RT_VPOS,
RT_SVPOSITION
};
enum Components
@ -52,7 +49,7 @@ enum Components
C_VERT_STRUCT = 0,
C_CONNECTOR,
C_VERT_MAIN,
C_PIX_MAIN,
C_PIX_MAIN
};
#endif // _MISCSHDRDAT_H_

View file

@ -209,7 +209,7 @@ bool ProcessedShaderMaterial::init( const FeatureSet &features,
if ( mFeatures.hasFeature( MFT_UseInstancing ) )
{
mInstancingState = new InstancingState();
mInstancingState->setFormat( &_getRPD( 0 )->shader->mInstancingFormat, mVertexFormat );
mInstancingState->setFormat( _getRPD( 0 )->shader->getInstancingFormat(), mVertexFormat );
}
return true;
}

View file

@ -167,6 +167,8 @@ protected:
mInstFormat = instFormat;
mDeclFormat.copy( *vertexFormat );
mDeclFormat.append( *mInstFormat, 1 );
// Let the declaration know we have instancing.
mDeclFormat.enableInstancing();
mDeclFormat.getDecl();
delete [] mBuffer;

View file

@ -236,6 +236,7 @@ GFXShader* ShaderData::_createShader( const Vector<GFXShaderMacro> &macros )
{
case Direct3D9_360:
case Direct3D9:
case Direct3D11:
{
success = shader->init( mDXVertexShaderName,
mDXPixelShaderName,