mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 00:05:40 +00:00
rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
This commit is contained in:
parent
efbe5e90f5
commit
2b295fb7f0
454 changed files with 4162 additions and 4156 deletions
|
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue