mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Merge pull request #1234 from marauder2k9-torque/virtuals-override
Virtuals override
This commit is contained in:
commit
05a083ca6f
710 changed files with 6353 additions and 6324 deletions
|
|
@ -33,14 +33,14 @@ private:
|
|||
public:
|
||||
GFXD3D11CardProfiler();
|
||||
~GFXD3D11CardProfiler();
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
const String &getRendererString() const { static String sRS("Direct3D11"); return sRS; }
|
||||
const String &getRendererString() const override { static String sRS("Direct3D11"); return sRS; }
|
||||
|
||||
void setupCardCapabilities();
|
||||
bool _queryCardCap(const String &query, U32 &foundResult);
|
||||
bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips);
|
||||
void setupCardCapabilities() override;
|
||||
bool _queryCardCap(const String &query, U32 &foundResult) override;
|
||||
bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,21 +34,21 @@ const U32 MaxMipMaps = 13; //todo this needs a proper static value somewhere to
|
|||
class GFXD3D11Cubemap : public GFXCubemap
|
||||
{
|
||||
public:
|
||||
virtual void initStatic( GFXTexHandle *faces );
|
||||
virtual void initStatic( DDSFile *dds );
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0);
|
||||
virtual void setToTexUnit( U32 tuNum );
|
||||
virtual U32 getSize() const { return mTexSize; }
|
||||
virtual GFXFormat getFormat() const { return mFaceFormat; }
|
||||
void initStatic( GFXTexHandle *faces ) override;
|
||||
void initStatic( DDSFile *dds ) override;
|
||||
void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0) override;
|
||||
void setToTexUnit( U32 tuNum ) override;
|
||||
U32 getSize() const override { return mTexSize; }
|
||||
GFXFormat getFormat() const override { return mFaceFormat; }
|
||||
|
||||
GFXD3D11Cubemap();
|
||||
virtual ~GFXD3D11Cubemap();
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
virtual bool isInitialized() { return mTexture ? true : false; }
|
||||
bool isInitialized() override { return mTexture ? true : false; }
|
||||
|
||||
// Get functions
|
||||
ID3D11ShaderResourceView* getSRView();
|
||||
|
|
@ -83,18 +83,18 @@ class GFXD3D11CubemapArray : public GFXCubemapArray
|
|||
public:
|
||||
GFXD3D11CubemapArray();
|
||||
virtual ~GFXD3D11CubemapArray();
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount);
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format);
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot);
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap);
|
||||
virtual void setToTexUnit(U32 tuNum);
|
||||
void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount) override;
|
||||
void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format) override;
|
||||
void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot) override;
|
||||
void copyTo(GFXCubemapArray *pDstCubemap) override;
|
||||
void setToTexUnit(U32 tuNum) override;
|
||||
|
||||
ID3D11ShaderResourceView* getSRView() { return mSRView; }
|
||||
ID3D11Texture2D* get2DTex() { return mTexture; }
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
private:
|
||||
friend class GFXD3D11TextureTarget;
|
||||
|
|
|
|||
|
|
@ -63,17 +63,17 @@ private:
|
|||
friend class OculusVRHMDDevice;
|
||||
friend class D3D11OculusTexture;
|
||||
|
||||
virtual GFXFormat selectSupportedFormat(GFXTextureProfile *profile,
|
||||
const Vector<GFXFormat> &formats, bool texture, bool mustblend, bool mustfilter);
|
||||
GFXFormat selectSupportedFormat(GFXTextureProfile *profile,
|
||||
const Vector<GFXFormat> &formats, bool texture, bool mustblend, bool mustfilter) override;
|
||||
|
||||
virtual void enumerateVideoModes();
|
||||
void enumerateVideoModes() override;
|
||||
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window);
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true);
|
||||
GFXWindowTarget *allocWindowTarget(PlatformWindow *window) override;
|
||||
GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true) override;
|
||||
|
||||
virtual void enterDebugEvent(ColorI color, const char *name);
|
||||
virtual void leaveDebugEvent();
|
||||
virtual void setDebugMarker(ColorI color, const char *name);
|
||||
void enterDebugEvent(ColorI color, const char *name) override;
|
||||
void leaveDebugEvent() override;
|
||||
void setDebugMarker(ColorI color, const char *name) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ protected:
|
|||
ID3D11InputLayout *decl;
|
||||
};
|
||||
|
||||
virtual void initStates() { };
|
||||
void initStates() override { };
|
||||
|
||||
static GFXAdapter::CreateDeviceInstanceDelegate mCreateDeviceInstance;
|
||||
|
||||
|
|
@ -167,33 +167,33 @@ protected:
|
|||
// {
|
||||
|
||||
///
|
||||
virtual void setTextureInternal(U32 textureUnit, const GFXTextureObject* texture);
|
||||
void setTextureInternal(U32 textureUnit, const GFXTextureObject* texture) override;
|
||||
|
||||
/// Called by GFXDevice to create a device specific stateblock
|
||||
virtual GFXStateBlockRef createStateBlockInternal(const GFXStateBlockDesc& desc);
|
||||
GFXStateBlockRef createStateBlockInternal(const GFXStateBlockDesc& desc) override;
|
||||
/// Called by GFXDevice to actually set a stateblock.
|
||||
virtual void setStateBlockInternal(GFXStateBlock* block, bool force);
|
||||
void setStateBlockInternal(GFXStateBlock* block, bool force) override;
|
||||
|
||||
/// Track the last const buffer we've used. Used to notify new constant buffers that
|
||||
/// they should send all of their constants up
|
||||
StrongRefPtr<GFXD3D11ShaderConstBuffer> mCurrentConstBuffer;
|
||||
/// Called by base GFXDevice to actually set a const buffer
|
||||
virtual void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer);
|
||||
void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer) override;
|
||||
|
||||
// }
|
||||
|
||||
// Index buffer management
|
||||
// {
|
||||
virtual void _setPrimitiveBuffer( GFXPrimitiveBuffer *buffer );
|
||||
virtual void drawIndexedPrimitive( GFXPrimitiveType primType,
|
||||
void drawIndexedPrimitive( GFXPrimitiveType primType,
|
||||
U32 startVertex,
|
||||
U32 minIndex,
|
||||
U32 numVerts,
|
||||
U32 startIndex,
|
||||
U32 primitiveCount );
|
||||
U32 primitiveCount ) override;
|
||||
// }
|
||||
|
||||
virtual GFXShader* createShader();
|
||||
GFXShader* createShader() override;
|
||||
|
||||
/// Device helper function
|
||||
virtual DXGI_SWAP_CHAIN_DESC setupPresentParams( const GFXVideoMode &mode, const HWND &hwnd );
|
||||
|
|
@ -220,41 +220,41 @@ public:
|
|||
|
||||
// Activate/deactivate
|
||||
// {
|
||||
virtual void init( const GFXVideoMode &mode, PlatformWindow *window = NULL );
|
||||
void init( const GFXVideoMode &mode, PlatformWindow *window = NULL ) override;
|
||||
|
||||
virtual void preDestroy() { GFXDevice::preDestroy(); if(mTextureManager) mTextureManager->kill(); }
|
||||
void preDestroy() override { GFXDevice::preDestroy(); if(mTextureManager) mTextureManager->kill(); }
|
||||
|
||||
GFXAdapterType getAdapterType(){ return Direct3D11; }
|
||||
GFXAdapterType getAdapterType() override{ return Direct3D11; }
|
||||
|
||||
U32 getAdaterIndex() const { return mAdapterIndex; }
|
||||
|
||||
virtual GFXCubemap *createCubemap();
|
||||
virtual GFXCubemapArray *createCubemapArray();
|
||||
virtual GFXTextureArray* createTextureArray();
|
||||
GFXCubemap *createCubemap() override;
|
||||
GFXCubemapArray *createCubemapArray() override;
|
||||
GFXTextureArray* createTextureArray() override;
|
||||
|
||||
virtual F32 getPixelShaderVersion() const { return mPixVersion; }
|
||||
virtual void setPixelShaderVersion( F32 version ){ mPixVersion = version;}
|
||||
F32 getPixelShaderVersion() const override { return mPixVersion; }
|
||||
void setPixelShaderVersion( F32 version ) override{ mPixVersion = version;}
|
||||
|
||||
virtual void setShader(GFXShader *shader, bool force = false);
|
||||
virtual U32 getNumSamplers() const { return 16; }
|
||||
virtual U32 getNumRenderTargets() const { return 8; }
|
||||
void setShader(GFXShader *shader, bool force = false) override;
|
||||
U32 getNumSamplers() const override { return 16; }
|
||||
U32 getNumRenderTargets() const override { return 8; }
|
||||
// }
|
||||
|
||||
// Copy methods
|
||||
// {
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face);
|
||||
void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) override;
|
||||
// }
|
||||
|
||||
// Misc rendering control
|
||||
// {
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil );
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color);
|
||||
void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil ) override;
|
||||
void clearColorAttachment(const U32 attachment, const LinearColorF& color) override;
|
||||
|
||||
virtual bool beginSceneInternal();
|
||||
virtual void endSceneInternal();
|
||||
bool beginSceneInternal() override;
|
||||
void endSceneInternal() override;
|
||||
|
||||
virtual void setClipRect( const RectI &rect );
|
||||
virtual const RectI& getClipRect() const { return mClipRect; }
|
||||
void setClipRect( const RectI &rect ) override;
|
||||
const RectI& getClipRect() const override { return mClipRect; }
|
||||
|
||||
// }
|
||||
|
||||
|
|
@ -262,37 +262,37 @@ public:
|
|||
|
||||
/// @name Render Targets
|
||||
/// @{
|
||||
virtual void _updateRenderTargets();
|
||||
void _updateRenderTargets() override;
|
||||
/// @}
|
||||
|
||||
// Vertex/Index buffer management
|
||||
// {
|
||||
virtual GFXVertexBuffer* allocVertexBuffer( U32 numVerts,
|
||||
GFXVertexBuffer* allocVertexBuffer( U32 numVerts,
|
||||
const GFXVertexFormat *vertexFormat,
|
||||
U32 vertSize,
|
||||
GFXBufferType bufferType,
|
||||
void* data = NULL);
|
||||
void* data = NULL) override;
|
||||
|
||||
virtual GFXPrimitiveBuffer *allocPrimitiveBuffer( U32 numIndices,
|
||||
GFXPrimitiveBuffer *allocPrimitiveBuffer( U32 numIndices,
|
||||
U32 numPrimitives,
|
||||
GFXBufferType bufferType,
|
||||
void* data = NULL);
|
||||
void* data = NULL) override;
|
||||
|
||||
virtual GFXVertexDecl* allocVertexDecl( const GFXVertexFormat *vertexFormat );
|
||||
virtual void setVertexDecl( const GFXVertexDecl *decl );
|
||||
GFXVertexDecl* allocVertexDecl( const GFXVertexFormat *vertexFormat ) override;
|
||||
void setVertexDecl( const GFXVertexDecl *decl ) override;
|
||||
|
||||
virtual void setVertexStream( U32 stream, GFXVertexBuffer *buffer );
|
||||
virtual void setVertexStreamFrequency( U32 stream, U32 frequency );
|
||||
void setVertexStream( U32 stream, GFXVertexBuffer *buffer ) override;
|
||||
void setVertexStreamFrequency( U32 stream, U32 frequency ) override;
|
||||
// }
|
||||
|
||||
virtual U32 getMaxDynamicVerts() { return GFX_MAX_DYNAMIC_VERTS; }
|
||||
virtual U32 getMaxDynamicIndices() { return GFX_MAX_DYNAMIC_INDICES; }
|
||||
U32 getMaxDynamicVerts() override { return GFX_MAX_DYNAMIC_VERTS; }
|
||||
U32 getMaxDynamicIndices() override { return GFX_MAX_DYNAMIC_INDICES; }
|
||||
|
||||
inline U32 primCountToIndexCount(GFXPrimitiveType primType, U32 primitiveCount);
|
||||
|
||||
// Rendering
|
||||
// {
|
||||
virtual void drawPrimitive( GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount );
|
||||
void drawPrimitive( GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount ) override;
|
||||
// }
|
||||
|
||||
ID3D11DeviceContext* getDeviceContext(){ return mD3DDeviceContext; }
|
||||
|
|
@ -304,14 +304,14 @@ public:
|
|||
void beginReset();
|
||||
void endReset(GFXD3D11WindowTarget* windowTarget);
|
||||
|
||||
virtual void setupGenericShaders( GenericShaderType type = GSColor );
|
||||
void setupGenericShaders( GenericShaderType type = GSColor ) override;
|
||||
|
||||
inline virtual F32 getFillConventionOffset() const { return 0.0f; }
|
||||
virtual void doParanoidStateCheck() {};
|
||||
inline F32 getFillConventionOffset() const override { return 0.0f; }
|
||||
void doParanoidStateCheck() override {};
|
||||
|
||||
GFXFence *createFence();
|
||||
GFXFence *createFence() override;
|
||||
|
||||
GFXOcclusionQuery* createOcclusionQuery();
|
||||
GFXOcclusionQuery* createOcclusionQuery() override;
|
||||
|
||||
// Default multisample parameters
|
||||
DXGI_SAMPLE_DESC getMultisampleType() const { return mMultisampleDesc; }
|
||||
|
|
@ -327,7 +327,7 @@ public:
|
|||
// grab the sampler map
|
||||
const SamplerMap &getSamplersMap() const { return mSamplersMap; }
|
||||
SamplerMap &getSamplersMap(){ return mSamplersMap; }
|
||||
const char* interpretDebugResult(long result);
|
||||
const char* interpretDebugResult(long result) override;
|
||||
|
||||
// grab device buffer.
|
||||
ID3D11Buffer* getDeviceBuffer(const GFXShaderConstDesc desc);
|
||||
|
|
|
|||
|
|
@ -45,14 +45,14 @@ public:
|
|||
GFXD3D11OcclusionQuery(GFXDevice *device);
|
||||
virtual ~GFXD3D11OcclusionQuery();
|
||||
|
||||
virtual bool begin();
|
||||
virtual void end();
|
||||
virtual OcclusionQueryStatus getStatus(bool block, U32 *data = NULL);
|
||||
bool begin() override;
|
||||
void end() override;
|
||||
OcclusionQueryStatus getStatus(bool block, U32 *data = NULL) override;
|
||||
|
||||
// GFXResource
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
virtual const String describeSelf() const;
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -51,14 +51,14 @@ public:
|
|||
|
||||
virtual ~GFXD3D11PrimitiveBuffer();
|
||||
|
||||
virtual void lock(U32 indexStart, U32 indexEnd, void **indexPtr);
|
||||
virtual void unlock();
|
||||
void lock(U32 indexStart, U32 indexEnd, void **indexPtr) override;
|
||||
void unlock() override;
|
||||
|
||||
virtual void prepare();
|
||||
void prepare() override;
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
};
|
||||
|
||||
inline GFXD3D11PrimitiveBuffer::GFXD3D11PrimitiveBuffer( GFXDevice *device,
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@ public:
|
|||
GFXD3D11QueryFence( GFXDevice *device ) : GFXFence( device ), mQuery( NULL ) {};
|
||||
virtual ~GFXD3D11QueryFence();
|
||||
|
||||
virtual void issue();
|
||||
virtual FenceStatus getStatus() const;
|
||||
virtual void block();
|
||||
void issue() override;
|
||||
FenceStatus getStatus() const override;
|
||||
void block() override;
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
virtual const String describeSelf() const;
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -69,15 +69,15 @@ public:
|
|||
virtual ~GFXD3D11ShaderConstHandle();
|
||||
void addDesc(GFXShaderStage stage, const GFXShaderConstDesc& desc);
|
||||
const GFXShaderConstDesc getDesc(GFXShaderStage stage);
|
||||
const String& getName() const { return mDesc.name; }
|
||||
GFXShaderConstType getType() const { return mDesc.constType; }
|
||||
U32 getArraySize() const { return mDesc.arraySize; }
|
||||
const String& getName() const override { return mDesc.name; }
|
||||
GFXShaderConstType getType() const override { return mDesc.constType; }
|
||||
U32 getArraySize() const override { return mDesc.arraySize; }
|
||||
|
||||
U32 getSize() const { return mDesc.size; }
|
||||
void setValid(bool valid) { mValid = valid; }
|
||||
/// @warning This will always return the value assigned when the shader was
|
||||
/// initialized. If the value is later changed this method won't reflect that.
|
||||
S32 getSamplerRegister() const { return (!isSampler() || !mValid) ? -1 : mDesc.samplerReg; }
|
||||
S32 getSamplerRegister() const override { return (!isSampler() || !mValid) ? -1 : mDesc.samplerReg; }
|
||||
|
||||
// Returns true if this is a handle to a sampler register.
|
||||
bool isSampler() const
|
||||
|
|
@ -124,32 +124,32 @@ public:
|
|||
void onShaderReload(GFXD3D11Shader *shader);
|
||||
|
||||
// GFXShaderConstBuffer
|
||||
virtual GFXShader* getShader();
|
||||
virtual void set(GFXShaderConstHandle* handle, const F32 fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point2F& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point3F& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point4F& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const PlaneF& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const LinearColorF& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const S32 f);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point2I& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point3I& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point4I& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<F32>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point2F>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point3F>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point4F>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<S32>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point2I>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point3I>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point4I>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const MatrixF& mat, const GFXShaderConstType matType = GFXSCT_Float4x4);
|
||||
virtual void set(GFXShaderConstHandle* handle, const MatrixF* mat, const U32 arraySize, const GFXShaderConstType matrixType = GFXSCT_Float4x4);
|
||||
GFXShader* getShader() override;
|
||||
void set(GFXShaderConstHandle* handle, const F32 fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point2F& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point3F& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point4F& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const PlaneF& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const LinearColorF& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const S32 f) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point2I& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point3I& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point4I& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<F32>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point2F>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point3F>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point4F>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<S32>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point2I>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point3I>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point4I>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const MatrixF& mat, const GFXShaderConstType matType = GFXSCT_Float4x4) override;
|
||||
void set(GFXShaderConstHandle* handle, const MatrixF* mat, const U32 arraySize, const GFXShaderConstType matrixType = GFXSCT_Float4x4) override;
|
||||
|
||||
// GFXResource
|
||||
virtual const String describeSelf() const;
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
const String describeSelf() const override;
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
|
||||
protected:
|
||||
friend class GFXD3D11Shader;
|
||||
|
|
@ -182,19 +182,19 @@ public:
|
|||
virtual ~GFXD3D11Shader();
|
||||
|
||||
// GFXShader
|
||||
virtual GFXShaderConstBufferRef allocConstBuffer();
|
||||
virtual const Vector<GFXShaderConstDesc>& getShaderConstDesc() const;
|
||||
virtual GFXShaderConstHandle* getShaderConstHandle(const String& name);
|
||||
virtual GFXShaderConstHandle* findShaderConstHandle(const String& name);
|
||||
virtual U32 getAlignmentValue(const GFXShaderConstType constType) const;
|
||||
GFXShaderConstBufferRef allocConstBuffer() override;
|
||||
const Vector<GFXShaderConstDesc>& getShaderConstDesc() const override;
|
||||
GFXShaderConstHandle* getShaderConstHandle(const String& name) override;
|
||||
GFXShaderConstHandle* findShaderConstHandle(const String& name) override;
|
||||
U32 getAlignmentValue(const GFXShaderConstType constType) const override;
|
||||
|
||||
// GFXResource
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual bool _init();
|
||||
bool _init() override;
|
||||
|
||||
ID3D11VertexShader *mVertShader;
|
||||
ID3D11PixelShader *mPixShader;
|
||||
|
|
|
|||
|
|
@ -47,17 +47,17 @@ public:
|
|||
//
|
||||
|
||||
/// Returns the hash value of the desc that created this block
|
||||
virtual U32 getHashValue() const;
|
||||
U32 getHashValue() const override;
|
||||
|
||||
/// Returns a GFXStateBlockDesc that this block represents
|
||||
virtual const GFXStateBlockDesc& getDesc() const;
|
||||
const GFXStateBlockDesc& getDesc() const override;
|
||||
|
||||
//
|
||||
// GFXResource
|
||||
//
|
||||
virtual void zombify() { }
|
||||
void zombify() override { }
|
||||
/// When called the resource should restore all device sensitive information destroyed by zombify()
|
||||
virtual void resurrect() { }
|
||||
void resurrect() override { }
|
||||
private:
|
||||
|
||||
D3D11_BLEND_DESC mBlendDesc;
|
||||
|
|
|
|||
|
|
@ -55,20 +55,20 @@ public:
|
|||
~GFXD3D11TextureTarget();
|
||||
|
||||
// Public interface.
|
||||
virtual const Point2I getSize() { return mTargetSize; }
|
||||
virtual GFXFormat getFormat() { return mTargetFormat; }
|
||||
virtual void attachTexture(RenderSlot slot, GFXTextureObject *tex, U32 mipLevel=0, U32 zOffset = 0);
|
||||
virtual void attachTexture(RenderSlot slot, GFXCubemap *tex, U32 face, U32 mipLevel=0);
|
||||
virtual void resolve();
|
||||
const Point2I getSize() override { return mTargetSize; }
|
||||
GFXFormat getFormat() override { return mTargetFormat; }
|
||||
void attachTexture(RenderSlot slot, GFXTextureObject *tex, U32 mipLevel=0, U32 zOffset = 0) override;
|
||||
void attachTexture(RenderSlot slot, GFXCubemap *tex, U32 face, U32 mipLevel=0) override;
|
||||
void resolve() override;
|
||||
|
||||
/// Note we always copy the Color0 RenderSlot.
|
||||
virtual void resolveTo( GFXTextureObject *tex );
|
||||
void resolveTo( GFXTextureObject *tex ) override;
|
||||
|
||||
virtual void activate();
|
||||
virtual void deactivate();
|
||||
void activate() override;
|
||||
void deactivate() override;
|
||||
|
||||
void zombify();
|
||||
void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
};
|
||||
|
||||
class GFXD3D11WindowTarget : public GFXWindowTarget
|
||||
|
|
@ -87,7 +87,7 @@ class GFXD3D11WindowTarget : public GFXWindowTarget
|
|||
/// D3D presentation info.
|
||||
DXGI_SWAP_CHAIN_DESC mPresentationParams;
|
||||
/// Internal interface that notifies us we need to reset our video mode.
|
||||
void resetMode();
|
||||
void resetMode() override;
|
||||
|
||||
/// Is this a secondary window
|
||||
bool mSecondaryWindow;
|
||||
|
|
@ -97,21 +97,21 @@ public:
|
|||
GFXD3D11WindowTarget();
|
||||
~GFXD3D11WindowTarget();
|
||||
|
||||
virtual const Point2I getSize();
|
||||
virtual GFXFormat getFormat();
|
||||
virtual bool present();
|
||||
const Point2I getSize() override;
|
||||
GFXFormat getFormat() override;
|
||||
bool present() override;
|
||||
|
||||
void initPresentationParams();
|
||||
void createSwapChain();
|
||||
void createBuffersAndViews();
|
||||
void setBackBuffer();
|
||||
|
||||
virtual void activate();
|
||||
void activate() override;
|
||||
|
||||
void zombify();
|
||||
void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
virtual void resolveTo( GFXTextureObject *tex );
|
||||
void resolveTo( GFXTextureObject *tex ) override;
|
||||
|
||||
// These are all reference counted and must be released by whomever uses the get* function
|
||||
IDXGISwapChain* getSwapChain();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
~GFXD3D11TextureArray() { Release(); };
|
||||
|
||||
void init();
|
||||
void init() override;
|
||||
void setToTexUnit(U32 tuNum) override;
|
||||
|
||||
void createResourceView(DXGI_FORMAT format, U32 numMipLevels, U32 usageFlags);
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@ protected:
|
|||
U32 numMipLevels,
|
||||
bool forceMips = false,
|
||||
S32 antialiasLevel = 0,
|
||||
GFXTextureObject *inTex = NULL );
|
||||
GFXTextureObject *inTex = NULL ) override;
|
||||
|
||||
bool _loadTexture(GFXTextureObject *texture, DDSFile *dds);
|
||||
bool _loadTexture(GFXTextureObject *texture, GBitmap *bmp);
|
||||
bool _loadTexture(GFXTextureObject *texture, void *raw);
|
||||
bool _refreshTexture(GFXTextureObject *texture);
|
||||
bool _freeTexture(GFXTextureObject *texture, bool zombify = false);
|
||||
bool _loadTexture(GFXTextureObject *texture, DDSFile *dds) override;
|
||||
bool _loadTexture(GFXTextureObject *texture, GBitmap *bmp) override;
|
||||
bool _loadTexture(GFXTextureObject *texture, void *raw) override;
|
||||
bool _refreshTexture(GFXTextureObject *texture) override;
|
||||
bool _freeTexture(GFXTextureObject *texture, bool zombify = false) override;
|
||||
|
||||
private:
|
||||
U32 mCurTexSet[GFX_TEXTURE_STAGE_COUNT];
|
||||
|
|
|
|||
|
|
@ -70,19 +70,19 @@ public:
|
|||
|
||||
bool isManaged; //setting to true tells this texture not to be released from being zombify
|
||||
|
||||
virtual GFXLockedRect * lock(U32 mipLevel = 0, RectI *inRect = NULL);
|
||||
virtual void unlock(U32 mipLevel = 0 );
|
||||
GFXLockedRect * lock(U32 mipLevel = 0, RectI *inRect = NULL) override;
|
||||
void unlock(U32 mipLevel = 0 ) override;
|
||||
|
||||
virtual bool copyToBmp(GBitmap* bmp);
|
||||
bool copyToBmp(GBitmap* bmp) override;
|
||||
ID3D11Texture2D* getSurface() {return mD3DSurface;}
|
||||
ID3D11Texture2D** getSurfacePtr() {return &mD3DSurface;}
|
||||
|
||||
// GFXResource
|
||||
void zombify();
|
||||
void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
virtual void pureVirtualCrash() {};
|
||||
void pureVirtualCrash() override {};
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -49,13 +49,13 @@ public:
|
|||
GFXBufferType bufferType );
|
||||
virtual ~GFXD3D11VertexBuffer();
|
||||
|
||||
void lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr);
|
||||
void unlock();
|
||||
void prepare() {}
|
||||
void lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr) override;
|
||||
void unlock() override;
|
||||
void prepare() override {}
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class ScreenShotD3D11 : public ScreenShot
|
|||
{
|
||||
protected:
|
||||
|
||||
GBitmap* _captureBackBuffer();
|
||||
GBitmap* _captureBackBuffer() override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,17 +42,17 @@ private:
|
|||
public:
|
||||
|
||||
///
|
||||
virtual const String &getRendererString() const { static String sRS("GFX Null Device Renderer"); return sRS; }
|
||||
const String &getRendererString() const override { static String sRS("GFX Null Device Renderer"); return sRS; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual void setupCardCapabilities() { };
|
||||
void setupCardCapabilities() override { };
|
||||
|
||||
virtual bool _queryCardCap(const String &query, U32 &foundResult){ return false; }
|
||||
virtual bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips) { inOutAutogenMips = false; return false; }
|
||||
bool _queryCardCap(const String &query, U32 &foundResult) override{ return false; }
|
||||
bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips) override { inOutAutogenMips = false; return false; }
|
||||
|
||||
public:
|
||||
virtual void init()
|
||||
void init() override
|
||||
{
|
||||
mCardDescription = "GFX Null Device Card";
|
||||
mChipSet = "NULL Device";
|
||||
|
|
@ -68,14 +68,16 @@ public:
|
|||
GFXNullTextureObject(GFXDevice * aDevice, GFXTextureProfile *profile);
|
||||
~GFXNullTextureObject() { kill(); };
|
||||
|
||||
virtual void pureVirtualCrash() { };
|
||||
#ifdef TORQUE_DEBUG
|
||||
void pureVirtualCrash() override {}
|
||||
#endif
|
||||
|
||||
virtual GFXLockedRect * lock( U32 mipLevel = 0, RectI *inRect = NULL ) { return NULL; };
|
||||
virtual void unlock( U32 mipLevel = 0) {};
|
||||
virtual bool copyToBmp(GBitmap *) { return false; };
|
||||
GFXLockedRect * lock( U32 mipLevel = 0, RectI *inRect = NULL ) override { return NULL; };
|
||||
void unlock( U32 mipLevel = 0) override {};
|
||||
bool copyToBmp(GBitmap *) override { return false; };
|
||||
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
};
|
||||
|
||||
GFXNullTextureObject::GFXNullTextureObject(GFXDevice * aDevice, GFXTextureProfile *profile) :
|
||||
|
|
@ -88,13 +90,13 @@ 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; }
|
||||
GFXTextureObject* createTexture(GBitmap* bmp, const String& resourceName, GFXTextureProfile* profile, bool deleteBmp) override { return nullptr; } // _createNullTextureObject();}
|
||||
GFXTextureObject* createTexture(DDSFile* dds, GFXTextureProfile* profile, bool deleteDDS) override { return nullptr; }
|
||||
GFXTextureObject* createTexture(const Torque::Path& path, GFXTextureProfile* profile) override { return nullptr; }
|
||||
GFXTextureObject* createTexture(U32 width, U32 height, void* pixels, GFXFormat format, GFXTextureProfile* profile) override { return nullptr; }
|
||||
GFXTextureObject* createTexture(U32 width, U32 height, U32 depth, GFXFormat format, GFXTextureProfile* profile, U32 numMipLevels = 1) override { return nullptr; }
|
||||
GFXTextureObject* createTexture(U32 width, U32 height, GFXFormat format, GFXTextureProfile* profile, U32 numMipLevels, S32 antialiasLevel) override { return nullptr; }
|
||||
GFXTextureObject* createCompositeTexture(GBitmap* bmp[4], U32 inputKey[4], const String& resourceName, GFXTextureProfile* profile, bool deleteBmp) override { return nullptr; }
|
||||
protected:
|
||||
GFXTextureObject *_createTextureObject( U32 height,
|
||||
U32 width,
|
||||
|
|
@ -104,7 +106,7 @@ protected:
|
|||
U32 numMipLevels,
|
||||
bool forceMips = false,
|
||||
S32 antialiasLevel = 0,
|
||||
GFXTextureObject *inTex = NULL )
|
||||
GFXTextureObject *inTex = NULL ) override
|
||||
{
|
||||
GFXNullTextureObject *retTex;
|
||||
if ( inTex )
|
||||
|
|
@ -124,26 +126,26 @@ protected:
|
|||
};
|
||||
|
||||
/// Load a texture from a proper DDSFile instance.
|
||||
virtual bool _loadTexture(GFXTextureObject *texture, DDSFile *dds){ return true; };
|
||||
bool _loadTexture(GFXTextureObject *texture, DDSFile *dds) override{ return true; };
|
||||
|
||||
/// Load data into a texture from a GBitmap using the internal API.
|
||||
virtual bool _loadTexture(GFXTextureObject *texture, GBitmap *bmp){ return true; };
|
||||
bool _loadTexture(GFXTextureObject *texture, GBitmap *bmp) override{ return true; };
|
||||
|
||||
/// Load data into a texture from a raw buffer using the internal API.
|
||||
///
|
||||
/// Note that the size of the buffer is assumed from the parameters used
|
||||
/// for this GFXTextureObject's _createTexture call.
|
||||
virtual bool _loadTexture(GFXTextureObject *texture, void *raw){ return true; };
|
||||
bool _loadTexture(GFXTextureObject *texture, void *raw) override{ return true; };
|
||||
|
||||
/// Refresh a texture using the internal API.
|
||||
virtual bool _refreshTexture(GFXTextureObject *texture){ return true; };
|
||||
bool _refreshTexture(GFXTextureObject *texture) override{ return true; };
|
||||
|
||||
/// Free a texture (but do not delete the GFXTextureObject) using the internal
|
||||
/// API.
|
||||
///
|
||||
/// This is only called during zombification for textures which need it, so you
|
||||
/// don't need to do any internal safety checks.
|
||||
virtual bool _freeTexture(GFXTextureObject *texture, bool zombify=false) { return true; };
|
||||
bool _freeTexture(GFXTextureObject *texture, bool zombify=false) override { return true; };
|
||||
|
||||
virtual U32 _getTotalVideoMemory() { return 0; };
|
||||
virtual U32 _getFreeVideoMemory() { return 0; };
|
||||
|
|
@ -154,19 +156,19 @@ class GFXNullCubemap : public GFXCubemap
|
|||
friend class GFXDevice;
|
||||
private:
|
||||
// should only be called by GFXDevice
|
||||
virtual void setToTexUnit( U32 tuNum ) { };
|
||||
void setToTexUnit( U32 tuNum ) override { };
|
||||
|
||||
public:
|
||||
virtual void initStatic( GFXTexHandle *faces ) { };
|
||||
virtual void initStatic( DDSFile *dds ) { };
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0) { };
|
||||
virtual U32 getSize() const { return 0; }
|
||||
virtual GFXFormat getFormat() const { return GFXFormatR8G8B8A8; }
|
||||
void initStatic( GFXTexHandle *faces ) override { };
|
||||
void initStatic( DDSFile *dds ) override { };
|
||||
void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0) override { };
|
||||
U32 getSize() const override { return 0; }
|
||||
GFXFormat getFormat() const override { return GFXFormatR8G8B8A8; }
|
||||
|
||||
virtual ~GFXNullCubemap(){};
|
||||
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
};
|
||||
|
||||
class GFXNullCubemapArray : public GFXCubemapArray
|
||||
|
|
@ -174,16 +176,16 @@ class GFXNullCubemapArray : public GFXCubemapArray
|
|||
friend class GFXDevice;
|
||||
private:
|
||||
// should only be called by GFXDevice
|
||||
virtual void setToTexUnit(U32 tuNum) { };
|
||||
void setToTexUnit(U32 tuNum) override { };
|
||||
|
||||
public:
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount) { };
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format) { };
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot) { };
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap) { }
|
||||
void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount) override { };
|
||||
void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format) override { };
|
||||
void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot) override { };
|
||||
void copyTo(GFXCubemapArray *pDstCubemap) override { }
|
||||
virtual ~GFXNullCubemapArray() {};
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
};
|
||||
|
||||
class GFXNullTextureArray : public GFXTextureArray
|
||||
|
|
@ -209,12 +211,12 @@ public:
|
|||
U32 vertexSize,
|
||||
GFXBufferType bufferType ) :
|
||||
GFXVertexBuffer(device, numVerts, vertexFormat, vertexSize, bufferType) {tempBuf =NULL;};
|
||||
virtual void lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr);
|
||||
virtual void unlock();
|
||||
virtual void prepare();
|
||||
void lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr) override;
|
||||
void unlock() override;
|
||||
void prepare() override;
|
||||
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
};
|
||||
|
||||
void GFXNullVertexBuffer::lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr)
|
||||
|
|
@ -246,12 +248,12 @@ public:
|
|||
GFXBufferType bufferType ) :
|
||||
GFXPrimitiveBuffer(device, indexCount, primitiveCount, bufferType), temp( NULL ) {};
|
||||
|
||||
virtual void lock(U32 indexStart, U32 indexEnd, void **indexPtr); ///< locks this primitive buffer for writing into
|
||||
virtual void unlock(); ///< unlocks this primitive buffer.
|
||||
virtual void prepare() { }; ///< prepares this primitive buffer for use on the device it was allocated on
|
||||
void lock(U32 indexStart, U32 indexEnd, void **indexPtr) override; ///< locks this primitive buffer for writing into
|
||||
void unlock() override; ///< unlocks this primitive buffer.
|
||||
void prepare() override { }; ///< prepares this primitive buffer for use on the device it was allocated on
|
||||
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
};
|
||||
|
||||
void GFXNullPrimitiveBuffer::lock(U32 indexStart, U32 indexEnd, void **indexPtr)
|
||||
|
|
@ -273,17 +275,17 @@ class GFXNullStateBlock : public GFXStateBlock
|
|||
{
|
||||
public:
|
||||
/// Returns the hash value of the desc that created this block
|
||||
virtual U32 getHashValue() const { return 0; };
|
||||
U32 getHashValue() const override { return 0; };
|
||||
|
||||
/// Returns a GFXStateBlockDesc that this block represents
|
||||
virtual const GFXStateBlockDesc& getDesc() const { return mDefaultDesc; }
|
||||
const GFXStateBlockDesc& getDesc() const override { return mDefaultDesc; }
|
||||
|
||||
//
|
||||
// GFXResource
|
||||
//
|
||||
virtual void zombify() { }
|
||||
void zombify() override { }
|
||||
/// When called the resource should restore all device sensitive information destroyed by zombify()
|
||||
virtual void resurrect() { }
|
||||
void resurrect() override { }
|
||||
private:
|
||||
GFXStateBlockDesc mDefaultDesc;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,26 +34,26 @@
|
|||
class GFXNullWindowTarget : public GFXWindowTarget
|
||||
{
|
||||
public:
|
||||
virtual bool present()
|
||||
bool present() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual const Point2I getSize()
|
||||
const Point2I getSize() override
|
||||
{
|
||||
// Return something stupid.
|
||||
return Point2I(1,1);
|
||||
}
|
||||
|
||||
virtual GFXFormat getFormat() { return GFXFormatR8G8B8A8; }
|
||||
GFXFormat getFormat() override { return GFXFormatR8G8B8A8; }
|
||||
|
||||
virtual void resetMode()
|
||||
void resetMode() override
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void zombify() {};
|
||||
virtual void resurrect() {};
|
||||
void zombify() override {};
|
||||
void resurrect() override {};
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -67,21 +67,21 @@ public:
|
|||
|
||||
static void enumerateAdapters( Vector<GFXAdapter*> &adapterList );
|
||||
|
||||
void init( const GFXVideoMode &mode, PlatformWindow *window = NULL );
|
||||
void init( const GFXVideoMode &mode, PlatformWindow *window = NULL ) override;
|
||||
|
||||
virtual void activate() { };
|
||||
virtual void deactivate() { };
|
||||
virtual GFXAdapterType getAdapterType() { return NullDevice; };
|
||||
GFXAdapterType getAdapterType() override { return NullDevice; };
|
||||
|
||||
/// @name Debug Methods
|
||||
/// @{
|
||||
virtual void enterDebugEvent(ColorI color, const char *name) { };
|
||||
virtual void leaveDebugEvent() { };
|
||||
virtual void setDebugMarker(ColorI color, const char *name) { };
|
||||
void enterDebugEvent(ColorI color, const char *name) override { };
|
||||
void leaveDebugEvent() override { };
|
||||
void setDebugMarker(ColorI color, const char *name) override { };
|
||||
/// @}
|
||||
|
||||
/// Enumerates the supported video modes of the device
|
||||
virtual void enumerateVideoModes() { };
|
||||
void enumerateVideoModes() override { };
|
||||
|
||||
/// Sets the video mode for the device
|
||||
virtual void setVideoMode( const GFXVideoMode &mode ) { };
|
||||
|
|
@ -89,15 +89,15 @@ protected:
|
|||
static GFXAdapter::CreateDeviceInstanceDelegate mCreateDeviceInstance;
|
||||
|
||||
/// Called by GFXDevice to create a device specific stateblock
|
||||
virtual GFXStateBlockRef createStateBlockInternal(const GFXStateBlockDesc& desc);
|
||||
GFXStateBlockRef createStateBlockInternal(const GFXStateBlockDesc& desc) override;
|
||||
/// Called by GFXDevice to actually set a stateblock.
|
||||
virtual void setStateBlockInternal(GFXStateBlock* block, bool force) { };
|
||||
void setStateBlockInternal(GFXStateBlock* block, bool force) override { };
|
||||
/// @}
|
||||
|
||||
/// Called by base GFXDevice to actually set a const buffer
|
||||
virtual void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer) { };
|
||||
void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer) override { };
|
||||
|
||||
virtual void setTextureInternal(U32 textureUnit, const GFXTextureObject*texture) { };
|
||||
void setTextureInternal(U32 textureUnit, const GFXTextureObject*texture) override { };
|
||||
|
||||
|
||||
/// @name State Initalization.
|
||||
|
|
@ -105,77 +105,77 @@ protected:
|
|||
|
||||
/// State initalization. This MUST BE CALLED in setVideoMode after the device
|
||||
/// is created.
|
||||
virtual void initStates() { };
|
||||
void initStates() override { };
|
||||
|
||||
virtual GFXVertexBuffer *allocVertexBuffer( U32 numVerts,
|
||||
GFXVertexBuffer *allocVertexBuffer( U32 numVerts,
|
||||
const GFXVertexFormat *vertexFormat,
|
||||
U32 vertSize,
|
||||
GFXBufferType bufferType,
|
||||
void* data = NULL );
|
||||
virtual GFXPrimitiveBuffer *allocPrimitiveBuffer( U32 numIndices,
|
||||
void* data = NULL ) override;
|
||||
GFXPrimitiveBuffer *allocPrimitiveBuffer( U32 numIndices,
|
||||
U32 numPrimitives,
|
||||
GFXBufferType bufferType,
|
||||
void* data = NULL );
|
||||
void* data = NULL ) override;
|
||||
|
||||
virtual GFXVertexDecl* allocVertexDecl( const GFXVertexFormat *vertexFormat ) { return NULL; }
|
||||
virtual void setVertexDecl( const GFXVertexDecl *decl ) { }
|
||||
virtual void setVertexStream( U32 stream, GFXVertexBuffer *buffer ) { }
|
||||
virtual void setVertexStreamFrequency( U32 stream, U32 frequency ) { }
|
||||
GFXVertexDecl* allocVertexDecl( const GFXVertexFormat *vertexFormat ) override { return NULL; }
|
||||
void setVertexDecl( const GFXVertexDecl *decl ) override { }
|
||||
void setVertexStream( U32 stream, GFXVertexBuffer *buffer ) override { }
|
||||
void setVertexStreamFrequency( U32 stream, U32 frequency ) override { }
|
||||
|
||||
public:
|
||||
virtual GFXCubemap * createCubemap();
|
||||
virtual GFXCubemapArray *createCubemapArray();
|
||||
virtual GFXTextureArray *createTextureArray();
|
||||
GFXCubemap * createCubemap() override;
|
||||
GFXCubemapArray *createCubemapArray() override;
|
||||
GFXTextureArray *createTextureArray() override;
|
||||
|
||||
virtual F32 getFillConventionOffset() const { return 0.0f; };
|
||||
F32 getFillConventionOffset() const override { return 0.0f; };
|
||||
|
||||
///@}
|
||||
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips=true){return NULL;};
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window)
|
||||
GFXTextureTarget *allocRenderToTextureTarget(bool genMips=true) override{return NULL;};
|
||||
GFXWindowTarget *allocWindowTarget(PlatformWindow *window) override
|
||||
{
|
||||
return new GFXNullWindowTarget();
|
||||
};
|
||||
|
||||
virtual void _updateRenderTargets(){};
|
||||
void _updateRenderTargets() override{};
|
||||
|
||||
virtual F32 getPixelShaderVersion() const { return 0.0f; };
|
||||
virtual void setPixelShaderVersion( F32 version ) { };
|
||||
virtual U32 getNumSamplers() const { return 0; };
|
||||
virtual U32 getNumRenderTargets() const { return 0; };
|
||||
F32 getPixelShaderVersion() const override { return 0.0f; };
|
||||
void setPixelShaderVersion( F32 version ) override { };
|
||||
U32 getNumSamplers() const override { return 0; };
|
||||
U32 getNumRenderTargets() const override { return 0; };
|
||||
|
||||
virtual GFXShader* createShader() { return NULL; };
|
||||
GFXShader* createShader() override { return NULL; };
|
||||
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) { };
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil ) { };
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color) { };
|
||||
virtual bool beginSceneInternal() { return true; };
|
||||
virtual void endSceneInternal() { };
|
||||
void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) override { };
|
||||
void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil ) override { };
|
||||
void clearColorAttachment(const U32 attachment, const LinearColorF& color) override { };
|
||||
bool beginSceneInternal() override { return true; };
|
||||
void endSceneInternal() override { };
|
||||
|
||||
virtual void drawPrimitive( GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount ) { };
|
||||
virtual void drawIndexedPrimitive( GFXPrimitiveType primType,
|
||||
void drawPrimitive( GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount ) override { };
|
||||
void drawIndexedPrimitive( GFXPrimitiveType primType,
|
||||
U32 startVertex,
|
||||
U32 minIndex,
|
||||
U32 numVerts,
|
||||
U32 startIndex,
|
||||
U32 primitiveCount ) { };
|
||||
U32 primitiveCount ) override { };
|
||||
|
||||
virtual void setClipRect( const RectI &rect ) { };
|
||||
virtual const RectI &getClipRect() const { return clip; };
|
||||
void setClipRect( const RectI &rect ) override { };
|
||||
const RectI &getClipRect() const override { return clip; };
|
||||
|
||||
virtual void preDestroy() { Parent::preDestroy(); };
|
||||
void preDestroy() override { Parent::preDestroy(); };
|
||||
|
||||
virtual U32 getMaxDynamicVerts() { return 16384; };
|
||||
virtual U32 getMaxDynamicIndices() { return 16384; };
|
||||
U32 getMaxDynamicVerts() override { return 16384; };
|
||||
U32 getMaxDynamicIndices() override { return 16384; };
|
||||
|
||||
virtual GFXFormat selectSupportedFormat( GFXTextureProfile *profile,
|
||||
GFXFormat selectSupportedFormat( GFXTextureProfile *profile,
|
||||
const Vector<GFXFormat> &formats,
|
||||
bool texture,
|
||||
bool mustblend,
|
||||
bool mustfilter ) { return GFXFormatR8G8B8A8; };
|
||||
bool mustfilter ) override { return GFXFormatR8G8B8A8; };
|
||||
|
||||
GFXFence *createFence() { return new GFXGeneralFence( this ); }
|
||||
GFXOcclusionQuery* createOcclusionQuery() { return NULL; }
|
||||
GFXFence *createFence() override { return new GFXGeneralFence( this ); }
|
||||
GFXOcclusionQuery* createOcclusionQuery() override { return NULL; }
|
||||
|
||||
private:
|
||||
typedef GFXDevice Parent;
|
||||
|
|
|
|||
|
|
@ -177,14 +177,14 @@ struct DDSFile
|
|||
static S32 smActiveCopies;
|
||||
|
||||
DDSFile():
|
||||
mBytesPerPixel(0),
|
||||
mHeight(0),
|
||||
mWidth(0),
|
||||
mDepth(0),
|
||||
mFormat(GFXFormat_FIRST),
|
||||
mFourCC(0),
|
||||
mPitchOrLinearSize(0),
|
||||
mMipMapCount(0),
|
||||
mPitchOrLinearSize(0)
|
||||
mFormat(GFXFormat_FIRST),
|
||||
mBytesPerPixel(0),
|
||||
mFourCC(0)
|
||||
{
|
||||
VECTOR_SET_ASSOCIATION( mSurfaces );
|
||||
smActiveCopies++;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace ImageUtil
|
|||
: pSrc(srcRGBA),pDst(dst), width(w), height(h), format(compressFormat),quality(compressQuality) {}
|
||||
|
||||
protected:
|
||||
virtual void execute()
|
||||
void execute() override
|
||||
{
|
||||
rawCompress(pSrc,pDst, width, height, format,quality);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public:
|
|||
|
||||
// GFXResource interface
|
||||
/// The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
|
||||
/// Get the number of mip maps
|
||||
const U32 getMipMapLevels() const { return mMipMapLevels; }
|
||||
|
|
@ -147,7 +147,7 @@ public:
|
|||
/// Returns the format
|
||||
const GFXFormat getFormat() const { return mFormat; }
|
||||
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
/// A reference counted handle to a cubemap array resource.
|
||||
|
|
|
|||
|
|
@ -91,15 +91,15 @@ public:
|
|||
|
||||
virtual ~GFXGeneralFence();
|
||||
|
||||
virtual void issue();
|
||||
virtual FenceStatus getStatus() const { return GFXFence::Unsupported; };
|
||||
virtual void block();
|
||||
void issue() override;
|
||||
FenceStatus getStatus() const override { return GFXFence::Unsupported; };
|
||||
void block() override;
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
/// The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
#endif // _GFXFENCE_H_
|
||||
|
|
@ -77,9 +77,9 @@ public:
|
|||
static String statusToString( OcclusionQueryStatus status );
|
||||
|
||||
// GFXResource
|
||||
virtual void zombify() = 0;
|
||||
virtual void resurrect() = 0;
|
||||
virtual const String describeSelf() const = 0;
|
||||
void zombify() override = 0;
|
||||
void resurrect() override = 0;
|
||||
const String describeSelf() const override = 0;
|
||||
};
|
||||
|
||||
/// Handle for GFXOcclusionQuery than store last valid state
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public: //protected:
|
|||
|
||||
// GFXResource interface
|
||||
/// The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
class GFXPrimitiveBufferHandle : public StrongRefPtr<GFXPrimitiveBuffer>
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ public:
|
|||
const String& getPixelShaderFile() const { return mPixelFile.getFullPath(); }
|
||||
|
||||
// GFXResource
|
||||
const String describeSelf() const { return mDescription; }
|
||||
const String describeSelf() const override { return mDescription; }
|
||||
|
||||
// Get instancing vertex format
|
||||
GFXVertexFormat *getInstancingFormat() { return mInstancingFormat; }
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public:
|
|||
virtual const GFXStateBlockDesc& getDesc() const = 0;
|
||||
|
||||
/// Default implementation for GFXResource::describeSelf
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
typedef StrongRefPtr<GFXStateBlock> GFXStateBlockRef;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
// GFXResourceInterface
|
||||
/// The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
|
||||
/// This is called to set the render target.
|
||||
virtual void activate() { }
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ public:
|
|||
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify() = 0;
|
||||
virtual void resurrect() = 0;
|
||||
void zombify() override = 0;
|
||||
void resurrect() override = 0;
|
||||
virtual void Release();
|
||||
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
|
||||
GFXFormat mFormat;
|
||||
bool mIsCompressed;
|
||||
|
|
|
|||
|
|
@ -200,10 +200,10 @@ public:
|
|||
|
||||
// GFXResource interface
|
||||
/// The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
|
||||
// StrongRefBase
|
||||
virtual void destroySelf();
|
||||
void destroySelf() override;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
virtual void prepare() = 0;
|
||||
|
||||
// GFXResource
|
||||
virtual const String describeSelf() const;
|
||||
const String describeSelf() const override;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ public:
|
|||
virtual ~GFXGLAppleFence();
|
||||
|
||||
// GFXFence interface
|
||||
virtual void issue();
|
||||
virtual FenceStatus getStatus() const;
|
||||
virtual void block();
|
||||
void issue() override;
|
||||
FenceStatus getStatus() const override;
|
||||
void block() override;
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
virtual const String describeSelf() const;
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
const String describeSelf() const override;
|
||||
|
||||
private:
|
||||
GLuint mHandle;
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@
|
|||
class GFXGLCardProfiler : public GFXCardProfiler
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
virtual const String& getRendererString() const { return mRendererString; }
|
||||
virtual void setupCardCapabilities();
|
||||
virtual bool _queryCardCap(const String& query, U32& foundResult);
|
||||
virtual bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips);
|
||||
const String& getRendererString() const override { return mRendererString; }
|
||||
void setupCardCapabilities() override;
|
||||
bool _queryCardCap(const String& query, U32& foundResult) override;
|
||||
bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips) override;
|
||||
|
||||
private:
|
||||
String mRendererString;
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ public:
|
|||
GFXGLCubemap();
|
||||
virtual ~GFXGLCubemap();
|
||||
|
||||
virtual void initStatic( GFXTexHandle *faces );
|
||||
virtual void initStatic( DDSFile *dds );
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0);
|
||||
virtual U32 getSize() const { return mWidth; }
|
||||
virtual GFXFormat getFormat() const { return mFaceFormat; }
|
||||
void initStatic( GFXTexHandle *faces ) override;
|
||||
void initStatic( DDSFile *dds ) override;
|
||||
void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0) override;
|
||||
U32 getSize() const override { return mWidth; }
|
||||
GFXFormat getFormat() const override { return mFaceFormat; }
|
||||
|
||||
virtual bool isInitialized() { return mCubemap != 0 ? true : false; }
|
||||
bool isInitialized() override { return mCubemap != 0 ? true : false; }
|
||||
|
||||
// Convenience methods for GFXGLTextureTarget
|
||||
U32 getWidth() { return mWidth; }
|
||||
|
|
@ -54,8 +54,8 @@ public:
|
|||
U32 getHandle() { return mCubemap; }
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
/// Called by texCB; this is to ensure that all textures have been resurrected before we attempt to res the cubemap.
|
||||
void tmResurrect();
|
||||
|
|
@ -90,7 +90,7 @@ protected:
|
|||
Resource<DDSFile> mDDSFile;
|
||||
|
||||
// should only be called by GFXDevice
|
||||
virtual void setToTexUnit( U32 tuNum ); ///< Binds the cubemap to the given texture unit
|
||||
void setToTexUnit( U32 tuNum ) override; ///< Binds the cubemap to the given texture unit
|
||||
virtual void bind(U32 textureUnit) const; ///< Notifies our owning device that we want to be set to the given texture unit (used for GL internal state tracking)
|
||||
void fillCubeTextures(GFXTexHandle* faces); ///< Copies the textures in faces into the cubemap
|
||||
|
||||
|
|
@ -102,15 +102,15 @@ public:
|
|||
GFXGLCubemapArray();
|
||||
virtual ~GFXGLCubemapArray();
|
||||
//virtual void initStatic(GFXCubemapHandle *cubemaps, const U32 cubemapCount);
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount);
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format);
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot);
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap);
|
||||
virtual void setToTexUnit(U32 tuNum);
|
||||
void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount) override;
|
||||
void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format) override;
|
||||
void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot) override;
|
||||
void copyTo(GFXCubemapArray *pDstCubemap) override;
|
||||
void setToTexUnit(U32 tuNum) override;
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
|
||||
protected:
|
||||
friend class GFXGLDevice;
|
||||
|
|
|
|||
|
|
@ -74,26 +74,26 @@ public:
|
|||
static void enumerateAdapters( Vector<GFXAdapter*> &adapterList );
|
||||
static GFXDevice *createInstance( U32 adapterIndex );
|
||||
|
||||
virtual void init( const GFXVideoMode &mode, PlatformWindow *window = NULL );
|
||||
void init( const GFXVideoMode &mode, PlatformWindow *window = NULL ) override;
|
||||
|
||||
virtual void activate() { }
|
||||
virtual void deactivate() { }
|
||||
virtual GFXAdapterType getAdapterType() { return OpenGL; }
|
||||
GFXAdapterType getAdapterType() override { return OpenGL; }
|
||||
|
||||
virtual void enterDebugEvent(ColorI color, const char *name);
|
||||
virtual void leaveDebugEvent();
|
||||
virtual void setDebugMarker(ColorI color, const char *name);
|
||||
void enterDebugEvent(ColorI color, const char *name) override;
|
||||
void leaveDebugEvent() override;
|
||||
void setDebugMarker(ColorI color, const char *name) override;
|
||||
|
||||
virtual void enumerateVideoModes();
|
||||
void enumerateVideoModes() override;
|
||||
|
||||
virtual U32 getTotalVideoMemory_GL_EXT();
|
||||
virtual U32 getTotalVideoMemory();
|
||||
|
||||
virtual GFXCubemap * createCubemap();
|
||||
virtual GFXCubemapArray *createCubemapArray();
|
||||
virtual GFXTextureArray *createTextureArray();
|
||||
GFXCubemap * createCubemap() override;
|
||||
GFXCubemapArray *createCubemapArray() override;
|
||||
GFXTextureArray *createTextureArray() override;
|
||||
|
||||
virtual F32 getFillConventionOffset() const { return 0.0f; }
|
||||
F32 getFillConventionOffset() const override { return 0.0f; }
|
||||
|
||||
|
||||
///@}
|
||||
|
|
@ -102,61 +102,61 @@ public:
|
|||
/// @{
|
||||
|
||||
///
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true);
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window);
|
||||
virtual void _updateRenderTargets();
|
||||
GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true) override;
|
||||
GFXWindowTarget *allocWindowTarget(PlatformWindow *window) override;
|
||||
void _updateRenderTargets() override;
|
||||
|
||||
///@}
|
||||
|
||||
/// @name Shader functions
|
||||
/// @{
|
||||
virtual F32 getPixelShaderVersion() const { return mPixelShaderVersion; }
|
||||
virtual void setPixelShaderVersion( F32 version ) { mPixelShaderVersion = version; }
|
||||
F32 getPixelShaderVersion() const override { return mPixelShaderVersion; }
|
||||
void setPixelShaderVersion( F32 version ) override { mPixelShaderVersion = version; }
|
||||
|
||||
virtual void setShader(GFXShader *shader, bool force = false);
|
||||
void setShader(GFXShader *shader, bool force = false) override;
|
||||
|
||||
/// @attention GL cannot check if the given format supports blending or filtering!
|
||||
virtual GFXFormat selectSupportedFormat(GFXTextureProfile *profile,
|
||||
const Vector<GFXFormat> &formats, bool texture, bool mustblend, bool mustfilter);
|
||||
GFXFormat selectSupportedFormat(GFXTextureProfile *profile,
|
||||
const Vector<GFXFormat> &formats, bool texture, bool mustblend, bool mustfilter) override;
|
||||
|
||||
/// Returns the number of texture samplers that can be used in a shader rendering pass
|
||||
virtual U32 getNumSamplers() const;
|
||||
U32 getNumSamplers() const override;
|
||||
|
||||
/// Returns the number of simultaneous render targets supported by the device.
|
||||
virtual U32 getNumRenderTargets() const;
|
||||
U32 getNumRenderTargets() const override;
|
||||
|
||||
virtual GFXShader* createShader();
|
||||
GFXShader* createShader() override;
|
||||
//TODO: implement me!
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face);
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil );
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color);
|
||||
virtual bool beginSceneInternal();
|
||||
virtual void endSceneInternal();
|
||||
void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) override;
|
||||
void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil ) override;
|
||||
void clearColorAttachment(const U32 attachment, const LinearColorF& color) override;
|
||||
bool beginSceneInternal() override;
|
||||
void endSceneInternal() override;
|
||||
|
||||
virtual void drawPrimitive( GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount );
|
||||
void drawPrimitive( GFXPrimitiveType primType, U32 vertexStart, U32 primitiveCount ) override;
|
||||
|
||||
virtual void drawIndexedPrimitive( GFXPrimitiveType primType,
|
||||
void drawIndexedPrimitive( GFXPrimitiveType primType,
|
||||
U32 startVertex,
|
||||
U32 minIndex,
|
||||
U32 numVerts,
|
||||
U32 startIndex,
|
||||
U32 primitiveCount );
|
||||
U32 primitiveCount ) override;
|
||||
|
||||
virtual void setClipRect( const RectI &rect );
|
||||
virtual const RectI &getClipRect() const { return mClip; }
|
||||
void setClipRect( const RectI &rect ) override;
|
||||
const RectI &getClipRect() const override { return mClip; }
|
||||
|
||||
virtual void preDestroy() { Parent::preDestroy(); }
|
||||
void preDestroy() override { Parent::preDestroy(); }
|
||||
|
||||
virtual U32 getMaxDynamicVerts() { return GFX_MAX_DYNAMIC_VERTS; }
|
||||
virtual U32 getMaxDynamicIndices() { return GFX_MAX_DYNAMIC_INDICES; }
|
||||
U32 getMaxDynamicVerts() override { return GFX_MAX_DYNAMIC_VERTS; }
|
||||
U32 getMaxDynamicIndices() override { return GFX_MAX_DYNAMIC_INDICES; }
|
||||
|
||||
GFXFence *createFence();
|
||||
GFXFence *createFence() override;
|
||||
|
||||
GFXOcclusionQuery* createOcclusionQuery();
|
||||
GFXOcclusionQuery* createOcclusionQuery() override;
|
||||
|
||||
GFXGLStateBlockRef getCurrentStateBlock() { return mCurrentGLStateBlock; }
|
||||
|
||||
virtual void setupGenericShaders( GenericShaderType type = GSColor );
|
||||
void setupGenericShaders( GenericShaderType type = GSColor ) override;
|
||||
|
||||
///
|
||||
bool supportsAnisotropic() const { return mCapabilities.anisotropicFiltering; }
|
||||
|
|
@ -169,17 +169,17 @@ public:
|
|||
const U32 getNumVertexStreams() const { return mNumVertexStream; }
|
||||
|
||||
bool glUseMap() const { return mUseGlMap; }
|
||||
const char* interpretDebugResult(long result) { return "Not Implemented"; };
|
||||
const char* interpretDebugResult(long result) override { return "Not Implemented"; };
|
||||
protected:
|
||||
/// Called by GFXDevice to create a device specific stateblock
|
||||
virtual GFXStateBlockRef createStateBlockInternal(const GFXStateBlockDesc& desc);
|
||||
GFXStateBlockRef createStateBlockInternal(const GFXStateBlockDesc& desc) override;
|
||||
/// Called by GFXDevice to actually set a stateblock.
|
||||
virtual void setStateBlockInternal(GFXStateBlock* block, bool force);
|
||||
void setStateBlockInternal(GFXStateBlock* block, bool force) override;
|
||||
|
||||
/// Called by base GFXDevice to actually set a const buffer
|
||||
virtual void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer);
|
||||
void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer) override;
|
||||
|
||||
virtual void setTextureInternal(U32 textureUnit, const GFXTextureObject*texture);
|
||||
void setTextureInternal(U32 textureUnit, const GFXTextureObject*texture) override;
|
||||
virtual void setCubemapInternal(U32 textureUnit, const GFXGLCubemap* texture);
|
||||
virtual void setCubemapArrayInternal(U32 textureUnit, const GFXGLCubemapArray* texture);
|
||||
virtual void setTextureArrayInternal(U32 textureUnit, const GFXGLTextureArray* texture);
|
||||
|
|
@ -189,24 +189,24 @@ protected:
|
|||
|
||||
/// State initalization. This MUST BE CALLED in setVideoMode after the device
|
||||
/// is created.
|
||||
virtual void initStates() { }
|
||||
void initStates() override { }
|
||||
|
||||
virtual GFXVertexBuffer *allocVertexBuffer( U32 numVerts,
|
||||
GFXVertexBuffer *allocVertexBuffer( U32 numVerts,
|
||||
const GFXVertexFormat *vertexFormat,
|
||||
U32 vertSize,
|
||||
GFXBufferType bufferType,
|
||||
void* data = NULL);
|
||||
virtual GFXPrimitiveBuffer *allocPrimitiveBuffer( U32 numIndices, U32 numPrimitives, GFXBufferType bufferType, void* data = NULL );
|
||||
void* data = NULL) override;
|
||||
GFXPrimitiveBuffer *allocPrimitiveBuffer( U32 numIndices, U32 numPrimitives, GFXBufferType bufferType, void* data = NULL ) override;
|
||||
|
||||
// NOTE: The GL device doesn't need a vertex declaration at
|
||||
// this time, but we need to return something to keep the system
|
||||
// from retrying to allocate one on every call.
|
||||
virtual GFXVertexDecl* allocVertexDecl( const GFXVertexFormat *vertexFormat );
|
||||
GFXVertexDecl* allocVertexDecl( const GFXVertexFormat *vertexFormat ) override;
|
||||
|
||||
virtual void setVertexDecl( const GFXVertexDecl *decl );
|
||||
void setVertexDecl( const GFXVertexDecl *decl ) override;
|
||||
|
||||
virtual void setVertexStream( U32 stream, GFXVertexBuffer *buffer );
|
||||
virtual void setVertexStreamFrequency( U32 stream, U32 frequency );
|
||||
void setVertexStream( U32 stream, GFXVertexBuffer *buffer ) override;
|
||||
void setVertexStreamFrequency( U32 stream, U32 frequency ) override;
|
||||
StrongRefPtr<GFXGLShaderConstBuffer> mCurrentConstBuffer;
|
||||
DeviceBufferMap mDeviceBufferMap;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ public:
|
|||
GFXGLOcclusionQuery( GFXDevice *device );
|
||||
virtual ~GFXGLOcclusionQuery();
|
||||
|
||||
virtual bool begin();
|
||||
virtual void end();
|
||||
virtual OcclusionQueryStatus getStatus( bool block, U32 *data = NULL );
|
||||
bool begin() override;
|
||||
void end() override;
|
||||
OcclusionQueryStatus getStatus( bool block, U32 *data = NULL ) override;
|
||||
|
||||
// GFXResource
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
virtual const String describeSelf() const;
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
const String describeSelf() const override;
|
||||
|
||||
private:
|
||||
U32 mQuery;
|
||||
|
|
|
|||
|
|
@ -33,16 +33,16 @@ public:
|
|||
GFXGLPrimitiveBuffer(GFXDevice *device, U32 indexCount, U32 primitiveCount, GFXBufferType bufferType);
|
||||
~GFXGLPrimitiveBuffer();
|
||||
|
||||
virtual void lock(U32 indexStart, U32 indexEnd, void **indexPtr); ///< only write lock are supported
|
||||
virtual void unlock(); ///<
|
||||
virtual void prepare(); ///< binds the buffer
|
||||
void lock(U32 indexStart, U32 indexEnd, void **indexPtr) override; ///< only write lock are supported
|
||||
void unlock() override; ///<
|
||||
void prepare() override; ///< binds the buffer
|
||||
virtual void finish(); ///< We're done with this buffer
|
||||
|
||||
virtual void* getBuffer(); ///< returns NULL
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
private:
|
||||
/// Handle to our GL buffer object
|
||||
|
|
|
|||
|
|
@ -69,15 +69,15 @@ public:
|
|||
|
||||
virtual ~GFXGLShaderConstHandle();
|
||||
const GFXShaderConstDesc getDesc();
|
||||
const String& getName() const { return mDesc.name; }
|
||||
GFXShaderConstType getType() const { return mDesc.constType; }
|
||||
U32 getArraySize() const { return mDesc.arraySize; }
|
||||
const String& getName() const override { return mDesc.name; }
|
||||
GFXShaderConstType getType() const override { return mDesc.constType; }
|
||||
U32 getArraySize() const override { return mDesc.arraySize; }
|
||||
|
||||
U32 getSize() const { return mDesc.size; }
|
||||
void setValid(bool valid) { mValid = valid; }
|
||||
/// @warning This will always return the value assigned when the shader was
|
||||
/// initialized. If the value is later changed this method won't reflect that.
|
||||
S32 getSamplerRegister() const { return (!isSampler() || !mValid) ? -1 : mDesc.samplerReg; }
|
||||
S32 getSamplerRegister() const override { return (!isSampler() || !mValid) ? -1 : mDesc.samplerReg; }
|
||||
|
||||
// Returns true if this is a handle to a sampler register.
|
||||
bool isSampler() const
|
||||
|
|
@ -117,32 +117,32 @@ public:
|
|||
void onShaderReload(GFXGLShader* shader);
|
||||
|
||||
// GFXShaderConstBuffer
|
||||
virtual GFXShader* getShader();
|
||||
virtual void set(GFXShaderConstHandle* handle, const F32 fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point2F& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point3F& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point4F& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const PlaneF& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const LinearColorF& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const S32 f);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point2I& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point3I& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const Point4I& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<F32>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point2F>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point3F>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point4F>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<S32>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point2I>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point3I>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const AlignedArray<Point4I>& fv);
|
||||
virtual void set(GFXShaderConstHandle* handle, const MatrixF& mat, const GFXShaderConstType matType = GFXSCT_Float4x4);
|
||||
virtual void set(GFXShaderConstHandle* handle, const MatrixF* mat, const U32 arraySize, const GFXShaderConstType matrixType = GFXSCT_Float4x4);
|
||||
GFXShader* getShader() override;
|
||||
void set(GFXShaderConstHandle* handle, const F32 fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point2F& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point3F& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point4F& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const PlaneF& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const LinearColorF& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const S32 f) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point2I& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point3I& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const Point4I& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<F32>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point2F>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point3F>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point4F>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<S32>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point2I>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point3I>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const AlignedArray<Point4I>& fv) override;
|
||||
void set(GFXShaderConstHandle* handle, const MatrixF& mat, const GFXShaderConstType matType = GFXSCT_Float4x4) override;
|
||||
void set(GFXShaderConstHandle* handle, const MatrixF* mat, const U32 arraySize, const GFXShaderConstType matrixType = GFXSCT_Float4x4) override;
|
||||
|
||||
// GFXResource
|
||||
virtual const String describeSelf() const;
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
const String describeSelf() const override;
|
||||
void zombify() override {}
|
||||
void resurrect() override {}
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -171,31 +171,31 @@ public:
|
|||
|
||||
/// @name GFXShader interface
|
||||
/// @{
|
||||
virtual GFXShaderConstHandle* getShaderConstHandle(const String& name);
|
||||
virtual GFXShaderConstHandle* findShaderConstHandle(const String& name);
|
||||
GFXShaderConstHandle* getShaderConstHandle(const String& name) override;
|
||||
GFXShaderConstHandle* findShaderConstHandle(const String& name) override;
|
||||
|
||||
/// Returns our list of shader constants, the material can get this and just set the constants it knows about
|
||||
virtual const Vector<GFXShaderConstDesc>& getShaderConstDesc() const;
|
||||
const Vector<GFXShaderConstDesc>& getShaderConstDesc() const override;
|
||||
|
||||
/// Returns the alignment value for constType
|
||||
virtual U32 getAlignmentValue(const GFXShaderConstType constType) const;
|
||||
U32 getAlignmentValue(const GFXShaderConstType constType) const override;
|
||||
|
||||
virtual GFXShaderConstBufferRef allocConstBuffer();
|
||||
GFXShaderConstBufferRef allocConstBuffer() override;
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name GFXResource interface
|
||||
/// @{
|
||||
virtual void zombify();
|
||||
virtual void resurrect() { reload(); }
|
||||
virtual const String describeSelf() const;
|
||||
void zombify() override;
|
||||
void resurrect() override { reload(); }
|
||||
const String describeSelf() const override;
|
||||
/// @}
|
||||
|
||||
/// Activates this shader in the GL context.
|
||||
void useProgram();
|
||||
|
||||
protected:
|
||||
virtual bool _init();
|
||||
bool _init() override;
|
||||
|
||||
bool initShader(const Torque::Path& file,
|
||||
GFXShaderStage stage,
|
||||
|
|
|
|||
|
|
@ -49,17 +49,17 @@ public:
|
|||
//
|
||||
|
||||
/// Returns the hash value of the desc that created this block
|
||||
virtual U32 getHashValue() const;
|
||||
U32 getHashValue() const override;
|
||||
|
||||
/// Returns a GFXStateBlockDesc that this block represents
|
||||
virtual const GFXStateBlockDesc& getDesc() const;
|
||||
const GFXStateBlockDesc& getDesc() const override;
|
||||
|
||||
//
|
||||
// GFXResource
|
||||
//
|
||||
virtual void zombify() { }
|
||||
void zombify() override { }
|
||||
/// When called the resource should restore all device sensitive information destroyed by zombify()
|
||||
virtual void resurrect() { }
|
||||
void resurrect() override { }
|
||||
private:
|
||||
GFXStateBlockDesc mDesc;
|
||||
U32 mCachedHashValue;
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ protected:
|
|||
U32 numMipLevels,
|
||||
bool forceMips = false,
|
||||
S32 antialiasLevel = 0,
|
||||
GFXTextureObject *inTex = NULL );
|
||||
bool _loadTexture(GFXTextureObject *texture, DDSFile *dds);
|
||||
bool _loadTexture(GFXTextureObject *texture, GBitmap *bmp);
|
||||
bool _loadTexture(GFXTextureObject *texture, void *raw);
|
||||
bool _refreshTexture(GFXTextureObject *texture);
|
||||
bool _freeTexture(GFXTextureObject *texture, bool zombify = false);
|
||||
GFXTextureObject *inTex = NULL ) override;
|
||||
bool _loadTexture(GFXTextureObject *texture, DDSFile *dds) override;
|
||||
bool _loadTexture(GFXTextureObject *texture, GBitmap *bmp) override;
|
||||
bool _loadTexture(GFXTextureObject *texture, void *raw) override;
|
||||
bool _refreshTexture(GFXTextureObject *texture) override;
|
||||
bool _freeTexture(GFXTextureObject *texture, bool zombify = false) override;
|
||||
|
||||
private:
|
||||
friend class GFXGLTextureObject;
|
||||
|
|
|
|||
|
|
@ -53,28 +53,28 @@ public:
|
|||
/// @note You are responsible for deleting the returned data! (Use delete[])
|
||||
U8* getTextureData( U32 mip = 0);
|
||||
|
||||
virtual F32 getMaxUCoord() const;
|
||||
virtual F32 getMaxVCoord() const;
|
||||
F32 getMaxUCoord() const override;
|
||||
F32 getMaxVCoord() const override;
|
||||
|
||||
void reloadFromCache(); ///< Reloads texture from zombie cache, used by GFXGLTextureManager to resurrect the texture.
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
virtual void pureVirtualCrash() {}
|
||||
void pureVirtualCrash() override {}
|
||||
#endif
|
||||
|
||||
/// Get/set data from texture (for dynamic textures and render targets)
|
||||
/// @attention DO NOT READ FROM THE RETURNED RECT! It is not guaranteed to work and may incur significant performance penalties.
|
||||
virtual GFXLockedRect* lock(U32 mipLevel = 0, RectI *inRect = NULL);
|
||||
virtual void unlock(U32 mipLevel = 0 );
|
||||
GFXLockedRect* lock(U32 mipLevel = 0, RectI *inRect = NULL) override;
|
||||
void unlock(U32 mipLevel = 0 ) override;
|
||||
|
||||
virtual bool copyToBmp(GBitmap *); ///< Not implemented
|
||||
bool copyToBmp(GBitmap *) override; ///< Not implemented
|
||||
|
||||
bool mIsNPoT2;
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
virtual const String describeSelf() const;
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
const String describeSelf() const override;
|
||||
|
||||
void initSamplerState(const GFXSamplerStateDesc &ssd);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,14 +69,14 @@ public:
|
|||
|
||||
virtual ~_GFXGLTextureTargetDesc() {}
|
||||
|
||||
virtual U32 getHandle() { return mTex->getHandle(); }
|
||||
virtual U32 getWidth() { return mTex->getWidth(); }
|
||||
virtual U32 getHeight() { return mTex->getHeight(); }
|
||||
virtual U32 getDepth() { return mTex->getDepth(); }
|
||||
virtual bool hasMips() { return mTex->mMipLevels != 1; }
|
||||
virtual GLenum getBinding() { return mTex->getBinding(); }
|
||||
virtual GFXFormat getFormat() { return mTex->getFormat(); }
|
||||
virtual bool isCompatible(const GFXGLTextureObject* tex)
|
||||
U32 getHandle() override { return mTex->getHandle(); }
|
||||
U32 getWidth() override { return mTex->getWidth(); }
|
||||
U32 getHeight() override { return mTex->getHeight(); }
|
||||
U32 getDepth() override { return mTex->getDepth(); }
|
||||
bool hasMips() override { return mTex->mMipLevels != 1; }
|
||||
GLenum getBinding() override { return mTex->getBinding(); }
|
||||
GFXFormat getFormat() override { return mTex->getFormat(); }
|
||||
bool isCompatible(const GFXGLTextureObject* tex) override
|
||||
{
|
||||
return mTex->getFormat() == tex->getFormat()
|
||||
&& mTex->getWidth() == tex->getWidth()
|
||||
|
|
@ -99,14 +99,14 @@ public:
|
|||
|
||||
virtual ~_GFXGLCubemapTargetDesc() {}
|
||||
|
||||
virtual U32 getHandle() { return mTex->getHandle(); }
|
||||
virtual U32 getWidth() { return mTex->getWidth(); }
|
||||
virtual U32 getHeight() { return mTex->getHeight(); }
|
||||
virtual U32 getDepth() { return 0; }
|
||||
virtual bool hasMips() { return mTex->getMipMapLevels() != 1; }
|
||||
virtual GLenum getBinding() { return GFXGLCubemap::getEnumForFaceNumber(mFace); }
|
||||
virtual GFXFormat getFormat() { return mTex->getFormat(); }
|
||||
virtual bool isCompatible(const GFXGLTextureObject* tex)
|
||||
U32 getHandle() override { return mTex->getHandle(); }
|
||||
U32 getWidth() override { return mTex->getWidth(); }
|
||||
U32 getHeight() override { return mTex->getHeight(); }
|
||||
U32 getDepth() override { return 0; }
|
||||
bool hasMips() override { return mTex->getMipMapLevels() != 1; }
|
||||
GLenum getBinding() override { return GFXGLCubemap::getEnumForFaceNumber(mFace); }
|
||||
GFXFormat getFormat() override { return mTex->getFormat(); }
|
||||
bool isCompatible(const GFXGLTextureObject* tex) override
|
||||
{
|
||||
return mTex->getFormat() == tex->getFormat()
|
||||
&& mTex->getWidth() == tex->getWidth()
|
||||
|
|
@ -141,9 +141,9 @@ public:
|
|||
_GFXGLTextureTargetFBOImpl(GFXGLTextureTarget* target);
|
||||
virtual ~_GFXGLTextureTargetFBOImpl();
|
||||
|
||||
virtual void applyState();
|
||||
virtual void makeActive();
|
||||
virtual void finish();
|
||||
void applyState() override;
|
||||
void makeActive() override;
|
||||
void finish() override;
|
||||
};
|
||||
|
||||
_GFXGLTextureTargetFBOImpl::_GFXGLTextureTargetFBOImpl(GFXGLTextureTarget* target)
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ public:
|
|||
GFXGLTextureTarget(bool genMips);
|
||||
virtual ~GFXGLTextureTarget();
|
||||
|
||||
virtual const Point2I getSize();
|
||||
virtual GFXFormat getFormat();
|
||||
virtual void attachTexture(RenderSlot slot, GFXTextureObject *tex, U32 mipLevel=0, U32 zOffset = 0);
|
||||
virtual void attachTexture(RenderSlot slot, GFXCubemap *tex, U32 face, U32 mipLevel=0);
|
||||
const Point2I getSize() override;
|
||||
GFXFormat getFormat() override;
|
||||
void attachTexture(RenderSlot slot, GFXTextureObject *tex, U32 mipLevel=0, U32 zOffset = 0) override;
|
||||
void attachTexture(RenderSlot slot, GFXCubemap *tex, U32 face, U32 mipLevel=0) override;
|
||||
virtual void clearAttachments();
|
||||
|
||||
/// Functions to query internal state
|
||||
|
|
@ -62,14 +62,14 @@ public:
|
|||
|
||||
/// @}
|
||||
|
||||
void deactivate();
|
||||
void zombify();
|
||||
void resurrect();
|
||||
virtual const String describeSelf() const;
|
||||
void deactivate() override;
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
const String describeSelf() const override;
|
||||
|
||||
virtual void resolve();
|
||||
void resolve() override;
|
||||
|
||||
virtual void resolveTo(GFXTextureObject* obj);
|
||||
void resolveTo(GFXTextureObject* obj) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ public:
|
|||
|
||||
~GFXGLVertexBuffer();
|
||||
|
||||
virtual void lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr); ///< Only write lock are supported.
|
||||
virtual void unlock(); ///<
|
||||
virtual void prepare(); ///< Do nothing. Use void prepare(U32 stream, U32 divisor).
|
||||
void lock(U32 vertexStart, U32 vertexEnd, void **vertexPtr) override; ///< Only write lock are supported.
|
||||
void unlock() override; ///<
|
||||
void prepare() override; ///< Do nothing. Use void prepare(U32 stream, U32 divisor).
|
||||
virtual void finish(); ///< Do nothing.
|
||||
|
||||
void prepare(U32 stream, U32 divisor);
|
||||
|
|
@ -52,8 +52,8 @@ public:
|
|||
GLvoid* getBuffer(); ///< returns NULL
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
void zombify() override;
|
||||
void resurrect() override;
|
||||
|
||||
private:
|
||||
friend class GFXGLDevice;
|
||||
|
|
|
|||
|
|
@ -32,22 +32,22 @@ public:
|
|||
GFXGLWindowTarget(PlatformWindow *win, GFXDevice *d);
|
||||
~GFXGLWindowTarget();
|
||||
|
||||
const Point2I getSize()
|
||||
const Point2I getSize() override
|
||||
{
|
||||
return mWindow->getClientExtent();
|
||||
}
|
||||
virtual GFXFormat getFormat()
|
||||
GFXFormat getFormat() override
|
||||
{
|
||||
// TODO: Fix me!
|
||||
return GFXFormatR8G8B8A8_SRGB;
|
||||
}
|
||||
void makeActive();
|
||||
virtual bool present();
|
||||
virtual void resetMode();
|
||||
virtual void zombify() { }
|
||||
virtual void resurrect() { }
|
||||
bool present() override;
|
||||
void resetMode() override;
|
||||
void zombify() override { }
|
||||
void resurrect() override { }
|
||||
|
||||
virtual void resolveTo(GFXTextureObject* obj);
|
||||
void resolveTo(GFXTextureObject* obj) override;
|
||||
|
||||
void _onAppSignal(WindowId wnd, S32 event);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class ScreenShotGL : public ScreenShot
|
|||
{
|
||||
protected:
|
||||
|
||||
GBitmap* _captureBackBuffer();
|
||||
GBitmap* _captureBackBuffer() override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
CubemapData();
|
||||
~CubemapData();
|
||||
|
||||
bool onAdd();
|
||||
bool onAdd() override;
|
||||
static void initPersistFields();
|
||||
|
||||
DECLARE_CONOBJECT(CubemapData);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
GFXStateBlockData();
|
||||
|
||||
// SimObject
|
||||
virtual bool onAdd();
|
||||
bool onAdd() override;
|
||||
static void initPersistFields();
|
||||
|
||||
// GFXStateBlockData
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class TheoraTexture : private IOutputStream< TheoraTextureFrame* >,
|
|||
TheoraTextureFrame* mFrame;
|
||||
|
||||
// WorkItem.
|
||||
virtual void execute();
|
||||
void execute() override;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -293,8 +293,8 @@ class TheoraTexture : private IOutputStream< TheoraTextureFrame* >,
|
|||
private:
|
||||
|
||||
// IPositionable.
|
||||
virtual U32 getPosition() const { return mCurrentTime; }
|
||||
virtual void setPosition( U32 pos ) {}
|
||||
U32 getPosition() const override { return mCurrentTime; }
|
||||
void setPosition( U32 pos ) override {}
|
||||
};
|
||||
|
||||
/// The Theora video file.
|
||||
|
|
@ -351,7 +351,7 @@ class TheoraTexture : private IOutputStream< TheoraTextureFrame* >,
|
|||
void _onTextureEvent( GFXTexCallbackCode code );
|
||||
|
||||
// IOutputStream.
|
||||
virtual void write( TheoraTextureFrame* const* frames, U32 num );
|
||||
void write( TheoraTextureFrame* const* frames, U32 num ) override;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -410,8 +410,8 @@ class TheoraTexture : private IOutputStream< TheoraTextureFrame* >,
|
|||
GFXTexHandle& getTexture() { return mCurrentFrame->mTexture; }
|
||||
|
||||
// IPositionable.
|
||||
virtual U32 getPosition() const { return _getTimeSource()->getPosition(); }
|
||||
virtual void setPosition( U32 pos ) {} // Not (yet?) implemented.
|
||||
U32 getPosition() const override { return _getTimeSource()->getPosition(); }
|
||||
void setPosition( U32 pos ) override {} // Not (yet?) implemented.
|
||||
};
|
||||
|
||||
#endif // TORQUE_OGGTHEORA
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ public:
|
|||
// SimObject.
|
||||
DECLARE_CONOBJECT( TheoraTextureObject );
|
||||
|
||||
virtual bool onAdd();
|
||||
virtual void onRemove();
|
||||
bool onAdd() override;
|
||||
void onRemove() override;
|
||||
|
||||
static void initPersistFields();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class VideoEncoderPNG : public VideoEncoder
|
|||
|
||||
public:
|
||||
/// Begins accepting frames for encoding
|
||||
bool begin()
|
||||
bool begin() override
|
||||
{
|
||||
mPath += "\\";
|
||||
mCurrentFrame = 0;
|
||||
|
|
@ -42,7 +42,7 @@ public:
|
|||
}
|
||||
|
||||
/// Pushes a new frame into the video stream
|
||||
bool pushFrame( GBitmap * bitmap )
|
||||
bool pushFrame( GBitmap * bitmap ) override
|
||||
{
|
||||
String framePath = mPath + String::ToString("%.6u.png", mCurrentFrame);
|
||||
|
||||
|
|
@ -56,12 +56,12 @@ public:
|
|||
}
|
||||
|
||||
/// Finishes the encoding and closes the video
|
||||
bool end()
|
||||
bool end() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void setResolution( Point2I* resolution )
|
||||
void setResolution( Point2I* resolution ) override
|
||||
{
|
||||
mResolution = *resolution;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ public:
|
|||
setStatus(false);
|
||||
}
|
||||
|
||||
virtual void run( void* arg )
|
||||
void run( void* arg ) override
|
||||
{
|
||||
_setName( "TheoraEncoderThread" );
|
||||
while (!checkForStop())
|
||||
|
|
@ -214,7 +214,7 @@ public:
|
|||
}
|
||||
|
||||
/// Begins accepting frames for encoding
|
||||
bool begin()
|
||||
bool begin() override
|
||||
{
|
||||
mPath += ".ogv";
|
||||
mCurrentFrame = 0;
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
}
|
||||
|
||||
/// Pushes a new frame into the video stream
|
||||
bool pushFrame( GBitmap * bitmap )
|
||||
bool pushFrame( GBitmap * bitmap ) override
|
||||
{
|
||||
|
||||
// Push the bitmap into the frame list
|
||||
|
|
@ -356,7 +356,7 @@ public:
|
|||
}
|
||||
|
||||
/// Finishes the encoding and closes the video
|
||||
bool end()
|
||||
bool end() override
|
||||
{
|
||||
//Let's wait the thread stop doing whatever it needs to do
|
||||
stop();
|
||||
|
|
@ -375,7 +375,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
void setResolution( Point2I* resolution )
|
||||
void setResolution( Point2I* resolution ) override
|
||||
{
|
||||
/* Theora has a divisible-by-sixteen restriction for the encoded frame size */
|
||||
/* scale the picture size up to the nearest /16 and calculate offsets */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue