mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Merge pull request #908 from Azaezel/alpha401/dediserverfixes
dedicated server cleanups
This commit is contained in:
commit
ea7ca63301
10 changed files with 53 additions and 25 deletions
|
|
@ -48,6 +48,8 @@
|
|||
|
||||
#include <string>
|
||||
#include "assetMacroHelpers.h"
|
||||
|
||||
#include "gfx/gfxDevice.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
class ImageAsset : public AssetBase
|
||||
{
|
||||
|
|
@ -250,7 +252,8 @@ public: \
|
|||
}\
|
||||
else if (!m##name)\
|
||||
{\
|
||||
Con::errorf("%s(%s)::_set%s() - Couldn't load image \"%s\"", macroText(className), getName(), macroText(name), _in);\
|
||||
if (GFX->getAdapterType() != NullDevice)\
|
||||
Con::errorf("%s(%s)::_set%s() - Couldn't load image \"%s\"", macroText(className), getName(), macroText(name), _in);\
|
||||
return false;\
|
||||
}\
|
||||
return true;\
|
||||
|
|
@ -392,7 +395,8 @@ public: \
|
|||
}\
|
||||
else if (!m##name[index])\
|
||||
{\
|
||||
Con::errorf("%s(%s)::_set%s(%i) - Couldn't load image \"%s\"", macroText(className), getName(), macroText(name), index, _in);\
|
||||
if (GFX->getAdapterType() != NullDevice)\
|
||||
Con::errorf("%s(%s)::_set%s(%i) - Couldn't load image \"%s\"", macroText(className), getName(), macroText(name), index, _in);\
|
||||
return false; \
|
||||
}\
|
||||
return true;\
|
||||
|
|
|
|||
|
|
@ -358,8 +358,9 @@ bool ShapeAsset::loadShape()
|
|||
mLoadedState = BadFileReference;
|
||||
return false; //if it failed to load, bail out
|
||||
}
|
||||
|
||||
mShape->setupBillboardDetails(mFilePath, mDiffuseImposterPath, mNormalImposterPath);
|
||||
// Construct billboards if not done already
|
||||
if (GFXDevice::devicePresent())
|
||||
mShape->setupBillboardDetails(mFilePath, mDiffuseImposterPath, mNormalImposterPath);
|
||||
|
||||
//If they exist, grab our imposters here and bind them to our shapeAsset
|
||||
|
||||
|
|
|
|||
|
|
@ -87,8 +87,16 @@ GFXNullTextureObject::GFXNullTextureObject(GFXDevice * aDevice, GFXTextureProfil
|
|||
|
||||
class GFXNullTextureManager : public GFXTextureManager
|
||||
{
|
||||
public:
|
||||
GFXTextureObject* createTexture(GBitmap* bmp, const String& resourceName, GFXTextureProfile* profile, bool deleteBmp) { return nullptr; } // _createNullTextureObject();}
|
||||
GFXTextureObject* createTexture(DDSFile* dds, GFXTextureProfile* profile, bool deleteDDS) { return nullptr; }
|
||||
GFXTextureObject* createTexture(const Torque::Path& path, GFXTextureProfile* profile) { return nullptr; }
|
||||
GFXTextureObject* createTexture(U32 width, U32 height, void* pixels, GFXFormat format, GFXTextureProfile* profile) { return nullptr; }
|
||||
GFXTextureObject* createTexture(U32 width, U32 height, U32 depth, GFXFormat format, GFXTextureProfile* profile, U32 numMipLevels = 1) { return nullptr; }
|
||||
GFXTextureObject* createTexture(U32 width, U32 height, GFXFormat format, GFXTextureProfile* profile, U32 numMipLevels, S32 antialiasLevel) { return nullptr; }
|
||||
GFXTextureObject* createCompositeTexture(GBitmap* bmp[4], U32 inputKey[4], const String& resourceName, GFXTextureProfile* profile, bool deleteBmp) { return nullptr; }
|
||||
protected:
|
||||
virtual GFXTextureObject *_createTextureObject( U32 height,
|
||||
GFXTextureObject *_createTextureObject( U32 height,
|
||||
U32 width,
|
||||
U32 depth,
|
||||
GFXFormat format,
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
MaterialFeatureData &fd,
|
||||
const FeatureSet &features )
|
||||
{
|
||||
if (GFX->getAdapterType() == NullDevice) return;
|
||||
PROFILE_SCOPE( ProcessedShaderMaterial_DetermineFeatures );
|
||||
|
||||
const F32 shaderVersion = GFX->getPixelShaderVersion();
|
||||
|
|
|
|||
|
|
@ -593,6 +593,7 @@ void ProcessedDeferredMaterial::_determineFeatures( U32 stageNum,
|
|||
MaterialFeatureData &fd,
|
||||
const FeatureSet &features )
|
||||
{
|
||||
if (GFX->getAdapterType() == NullDevice) return;
|
||||
Parent::_determineFeatures( stageNum, fd, features );
|
||||
if (fd.features.hasFeature(MFT_ForwardShading))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ SFXNullProvider::~SFXNullProvider()
|
|||
void SFXNullProvider::addDeviceDesc( const String& name, const String& desc )
|
||||
{
|
||||
SFXDeviceInfo* info = new SFXDeviceInfo;
|
||||
info->name = desc;
|
||||
info->internalName = desc;
|
||||
info->name = "Null Device";
|
||||
info->driver = name;
|
||||
info->hasHardware = false;
|
||||
info->maxBuffers = 8;
|
||||
|
|
@ -91,7 +92,7 @@ SFXDevice* SFXNullProvider::createDevice( const String& deviceName, bool useHard
|
|||
|
||||
// Do we find one to create?
|
||||
if ( info )
|
||||
return new SFXNullDevice( this, info->name, useHardware, maxBuffers );
|
||||
return new SFXNullDevice( this, info->internalName, useHardware, maxBuffers );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue