mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
Direct3D11 Engine/source changes
This commit is contained in:
parent
3a9b50f702
commit
41e5caf22b
81 changed files with 1291 additions and 617 deletions
|
|
@ -826,6 +826,7 @@ GFXVertexBuffer * GFXD3D9Device::allocVertexBuffer( U32 numVerts,
|
|||
|
||||
switch(bufferType)
|
||||
{
|
||||
case GFXBufferTypeImmutable:
|
||||
case GFXBufferTypeStatic:
|
||||
pool = isD3D9Ex() ? D3DPOOL_DEFAULT : D3DPOOL_MANAGED;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1307,10 +1307,15 @@ void GFXD3D9Shader::_buildSamplerShaderConstantHandles( Vector<GFXShaderConstDes
|
|||
|
||||
void GFXD3D9Shader::_buildInstancingShaderConstantHandles()
|
||||
{
|
||||
// If we have no instancing than just return
|
||||
if (!mInstancingFormat)
|
||||
return;
|
||||
|
||||
U32 offset = 0;
|
||||
for ( U32 i=0; i < mInstancingFormat.getElementCount(); i++ )
|
||||
|
||||
for ( U32 i=0; i < mInstancingFormat->getElementCount(); i++ )
|
||||
{
|
||||
const GFXVertexElement &element = mInstancingFormat.getElement( i );
|
||||
const GFXVertexElement &element = mInstancingFormat->getElement( i );
|
||||
|
||||
String constName = String::ToString( "$%s", element.getSemantic().c_str() );
|
||||
|
||||
|
|
@ -1347,9 +1352,9 @@ void GFXD3D9Shader::_buildInstancingShaderConstantHandles()
|
|||
|
||||
// If this is a matrix we will have 2 or 3 more of these
|
||||
// semantics with the same name after it.
|
||||
for ( ; i < mInstancingFormat.getElementCount(); i++ )
|
||||
for ( ; i < mInstancingFormat->getElementCount(); i++ )
|
||||
{
|
||||
const GFXVertexElement &nextElement = mInstancingFormat.getElement( i );
|
||||
const GFXVertexElement &nextElement = mInstancingFormat->getElement( i );
|
||||
if ( nextElement.getSemantic() != element.getSemantic() )
|
||||
{
|
||||
i--;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ void GFXD3D9VertexBuffer::lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr)
|
|||
|
||||
switch( mBufferType )
|
||||
{
|
||||
case GFXBufferTypeImmutable:
|
||||
case GFXBufferTypeStatic:
|
||||
break;
|
||||
|
||||
|
|
@ -203,7 +204,7 @@ void GFXD3D9VertexBuffer::zombify()
|
|||
{
|
||||
AssertFatal(lockedVertexStart == 0 && lockedVertexEnd == 0, "GFXD3D9VertexBuffer::zombify - Cannot zombify a locked buffer!");
|
||||
// Static buffers are managed by D3D9 so we don't deal with them.
|
||||
if(mBufferType == GFXBufferTypeDynamic)
|
||||
if(mBufferType == GFXBufferTypeDynamic || mBufferType == GFXBufferTypeImmutable)
|
||||
{
|
||||
SAFE_RELEASE(vb);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,7 +302,6 @@ void GFXD3D9EnumTranslate::init()
|
|||
GFXD3D9PrimType[GFXLineStrip] = D3DPT_LINESTRIP;
|
||||
GFXD3D9PrimType[GFXTriangleList] = D3DPT_TRIANGLELIST;
|
||||
GFXD3D9PrimType[GFXTriangleStrip] = D3DPT_TRIANGLESTRIP;
|
||||
GFXD3D9PrimType[GFXTriangleFan] = D3DPT_TRIANGLEFAN;
|
||||
VALIDATE_LOOKUPTABLE( GFXD3D9PrimType, GFXPT );
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ void GFXPCD3D9Device::init( const GFXVideoMode &mode, PlatformWindow *window /*
|
|||
mCardProfiler = new GFXD3D9CardProfiler(mAdapterIndex);
|
||||
mCardProfiler->init();
|
||||
|
||||
gScreenShot = new ScreenShotD3D;
|
||||
gScreenShot = new ScreenShotD3D9;
|
||||
|
||||
// Set the video capture frame grabber.
|
||||
mVideoFrameGrabber = new VideoFrameGrabberD3D9();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <d3dx9tex.h>
|
||||
|
||||
|
||||
GBitmap* ScreenShotD3D::_captureBackBuffer()
|
||||
GBitmap* ScreenShotD3D9::_captureBackBuffer()
|
||||
{
|
||||
#ifdef TORQUE_OS_XENON
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef _SCREENSHOTD3D_H_
|
||||
#define _SCREENSHOTD3D_H_
|
||||
#ifndef _SCREENSHOTD3D9_H_
|
||||
#define _SCREENSHOTD3D9_H_
|
||||
|
||||
#include "gfx/screenshot.h"
|
||||
|
||||
//**************************************************************************
|
||||
// D3D implementation of screenshot
|
||||
//**************************************************************************
|
||||
class ScreenShotD3D : public ScreenShot
|
||||
class ScreenShotD3D9 : public ScreenShot
|
||||
{
|
||||
protected:
|
||||
|
||||
|
|
@ -36,4 +36,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif // _SCREENSHOTD3D_H_
|
||||
#endif // _SCREENSHOTD3D9_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue