diff --git a/RenderSystems/Metal/include/OgreMetalDepthBuffer.h b/RenderSystems/Metal/include/OgreMetalDepthBuffer.h index 0586fa851fc..e9e57707e72 100644 --- a/RenderSystems/Metal/include/OgreMetalDepthBuffer.h +++ b/RenderSystems/Metal/include/OgreMetalDepthBuffer.h @@ -53,7 +53,7 @@ namespace Ogre virtual ~MetalDepthBuffer(); /// @copydoc DepthBuffer::isCompatible - virtual bool isCompatible( RenderTarget *renderTarget) const; + bool isCompatible( RenderTarget *renderTarget) const override; MetalDevice* getOwnerDevice(void) const { return mDevice; } diff --git a/RenderSystems/Metal/include/OgreMetalHardwareBufferManager.h b/RenderSystems/Metal/include/OgreMetalHardwareBufferManager.h index 420f6e5deff..590c2bffab0 100644 --- a/RenderSystems/Metal/include/OgreMetalHardwareBufferManager.h +++ b/RenderSystems/Metal/include/OgreMetalHardwareBufferManager.h @@ -47,13 +47,13 @@ namespace Ogre { void _notifyDeviceStalled(void); /// Creates a vertex buffer - virtual HardwareVertexBufferSharedPtr createVertexBuffer( size_t vertexSize, size_t numVerts, + HardwareVertexBufferSharedPtr createVertexBuffer( size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage, - bool useShadowBuffer = false ); + bool useShadowBuffer = false ) override; /// Create an index buffer - virtual HardwareIndexBufferSharedPtr createIndexBuffer( + HardwareIndexBufferSharedPtr createIndexBuffer( HardwareIndexBuffer::IndexType itype, size_t numIndexes, - HardwareBuffer::Usage usage, bool useShadowBuffer = false ); + HardwareBuffer::Usage usage, bool useShadowBuffer = false ) override; }; } diff --git a/RenderSystems/Metal/include/OgreMetalHardwarePixelBuffer.h b/RenderSystems/Metal/include/OgreMetalHardwarePixelBuffer.h index 33527faf0c4..fe4fda233a6 100644 --- a/RenderSystems/Metal/include/OgreMetalHardwarePixelBuffer.h +++ b/RenderSystems/Metal/include/OgreMetalHardwarePixelBuffer.h @@ -39,10 +39,10 @@ namespace Ogre { { protected: /// Lock a box - PixelBox lockImpl(const Box &lockBox, LockOptions options); + PixelBox lockImpl(const Box &lockBox, LockOptions options) override; /// Unlock a box - void unlockImpl(void); + void unlockImpl(void) override; // Internal buffer; either on-card or in system memory, freed/allocated on demand // depending on buffer usage @@ -68,10 +68,10 @@ namespace Ogre { HardwareBuffer::Usage usage ); /// @copydoc HardwarePixelBuffer::blitFromMemory - void blitFromMemory(const PixelBox &src, const Box &dstBox); + void blitFromMemory(const PixelBox &src, const Box &dstBox) override; /// @copydoc HardwarePixelBuffer::blitToMemory - void blitToMemory(const Box &srcBox, const PixelBox &dst); + void blitToMemory(const Box &srcBox, const PixelBox &dst) override; virtual ~MetalHardwarePixelBuffer(); @@ -94,16 +94,16 @@ namespace Ogre { bool writeGamma, uint fsaa ); virtual ~MetalTextureBuffer(); - virtual void bindToFramebuffer(uint32 attachment, size_t zoffset); + void bindToFramebuffer(uint32 attachment, size_t zoffset) override; /// Upload a box of pixels to this buffer on the card - virtual void upload(const PixelBox &data, const Box &dest); + void upload(const PixelBox &data, const Box &dest) override; /// Download a box of pixels from the card - virtual void download(const PixelBox &data); + void download(const PixelBox &data) override; /// Hardware implementation of blitFromMemory - virtual void blitFromMemory(const PixelBox &src_orig, const Box &dstBox); + void blitFromMemory(const PixelBox &src_orig, const Box &dstBox) override; /// Lock a box // PixelBox lockImpl(const Box &lockBox, LockOptions options) { return PixelBox(); } @@ -113,7 +113,7 @@ namespace Ogre { /// @copydoc HardwarePixelBuffer::blit void blit( const HardwarePixelBufferSharedPtr &src, - const Box &srcBox, const Box &dstBox ); + const Box &srcBox, const Box &dstBox ) override; // Blitting implementation void blitFromTexture( MetalTextureBuffer *src, const Box &srcBox, const Box &dstBox ); diff --git a/RenderSystems/Metal/include/OgreMetalMultiRenderTarget.h b/RenderSystems/Metal/include/OgreMetalMultiRenderTarget.h index a3cd746ce14..90f717541a7 100644 --- a/RenderSystems/Metal/include/OgreMetalMultiRenderTarget.h +++ b/RenderSystems/Metal/include/OgreMetalMultiRenderTarget.h @@ -45,12 +45,12 @@ namespace Ogre virtual ~MetalMultiRenderTarget(); // MultiRenderTarget overloads. - virtual void bindSurfaceImpl( size_t attachment, RenderTexture *target ); - virtual void unbindSurfaceImpl( size_t attachment ); + void bindSurfaceImpl( size_t attachment, RenderTexture *target ) override; + void unbindSurfaceImpl( size_t attachment ) override; // RenderTarget overloads. - virtual bool requiresTextureFlipping() const { return false; } - virtual void getCustomAttribute( const String& name, void *pData ); + bool requiresTextureFlipping() const override { return false; } + void getCustomAttribute( const String& name, void *pData ) override; }; } diff --git a/RenderSystems/Metal/include/OgreMetalPlugin.h b/RenderSystems/Metal/include/OgreMetalPlugin.h index f59509b77be..b793e0dcd88 100644 --- a/RenderSystems/Metal/include/OgreMetalPlugin.h +++ b/RenderSystems/Metal/include/OgreMetalPlugin.h @@ -42,19 +42,19 @@ namespace Ogre /// @copydoc Plugin::getName - const String& getName() const; + const String& getName() const override; /// @copydoc Plugin::install - void install(); + void install() override; /// @copydoc Plugin::initialise - void initialise(); + void initialise() override; /// @copydoc Plugin::shutdown - void shutdown(); + void shutdown() override; /// @copydoc Plugin::uninstall - void uninstall(); + void uninstall() override; protected: MetalRenderSystem* mRenderSystem; }; diff --git a/RenderSystems/Metal/include/OgreMetalProgram.h b/RenderSystems/Metal/include/OgreMetalProgram.h index e53450a528a..82ad1c6cb70 100644 --- a/RenderSystems/Metal/include/OgreMetalProgram.h +++ b/RenderSystems/Metal/include/OgreMetalProgram.h @@ -60,8 +60,8 @@ namespace Ogre class CmdShaderReflectionPairHint : public ParamCommand { public: - String doGet(const void* target) const; - void doSet(void* target, const String& val); + String doGet(const void* target) const override; + void doSet(void* target, const String& val) override; }; MetalProgram( ResourceManager* creator, const String& name, ResourceHandle handle, @@ -82,9 +82,9 @@ namespace Ogre const String& getShaderReflectionPairHint(void) const { return mShaderReflectionPairHint; } /// Overridden from GpuProgram - const String& getLanguage(void) const; + const String& getLanguage(void) const override; /// Overridden from GpuProgram - GpuProgramParametersSharedPtr createParameters(void); + GpuProgramParametersSharedPtr createParameters(void) override; /// Retrieve the Metal function object id getMetalFunction(void) const { return mFunction; } @@ -106,13 +106,13 @@ namespace Ogre /** Internal load implementation, must be implemented by subclasses. */ - void loadFromSource(void); + void loadFromSource(void) override; /// noop - void createLowLevelImpl(void) {} + void createLowLevelImpl(void) override {} /// shortcut as we there is no low-level separation here - GpuProgram* _getBindingDelegate(void) { return this; } + GpuProgram* _getBindingDelegate(void) override { return this; } /// Internal unload implementation, must be implemented by subclasses - void unloadHighLevelImpl(void); + void unloadHighLevelImpl(void) override; /// Populate the passed parameters with name->index map, must be overridden void buildConstantDefinitions(void) override; diff --git a/RenderSystems/Metal/include/OgreMetalProgramFactory.h b/RenderSystems/Metal/include/OgreMetalProgramFactory.h index 6c41732e434..6873f4862b9 100644 --- a/RenderSystems/Metal/include/OgreMetalProgramFactory.h +++ b/RenderSystems/Metal/include/OgreMetalProgramFactory.h @@ -48,11 +48,11 @@ namespace Ogre MetalProgramFactory( MetalDevice *device ); virtual ~MetalProgramFactory(void); /// Get the name of the language this factory creates programs for - const String& getLanguage(void) const; + const String& getLanguage(void) const override; /// Create an instance of MetalProgram GpuProgram* create(ResourceManager* creator, const String& name, ResourceHandle handle, - const String& group, bool isManual, ManualResourceLoader* loader); + const String& group, bool isManual, ManualResourceLoader* loader) override; }; } diff --git a/RenderSystems/Metal/include/OgreMetalRenderSystem.h b/RenderSystems/Metal/include/OgreMetalRenderSystem.h index e244c148553..e2e97d70794 100644 --- a/RenderSystems/Metal/include/OgreMetalRenderSystem.h +++ b/RenderSystems/Metal/include/OgreMetalRenderSystem.h @@ -90,31 +90,31 @@ namespace Ogre std::unique_ptr mAutoParamsBuffer; public: const GpuProgramParametersPtr& getFixedFunctionParams(TrackVertexColourType tracking, - FogMode fog); - void applyFixedFunctionParams(const GpuProgramParametersPtr& params, uint16 mask); + FogMode fog) override; + void applyFixedFunctionParams(const GpuProgramParametersPtr& params, uint16 mask) override; MetalRenderSystem(); virtual ~MetalRenderSystem(); - virtual void shutdown(void); + void shutdown(void) override; - virtual const String& getName(void) const; - virtual void setConfigOption(const String &name, const String &value) {} + const String& getName(void) const override; + void setConfigOption(const String &name, const String &value) override {} - virtual HardwareOcclusionQuery* createHardwareOcclusionQuery(void); + HardwareOcclusionQuery* createHardwareOcclusionQuery(void) override; - virtual RenderSystemCapabilities* createRenderSystemCapabilities(void) const; + RenderSystemCapabilities* createRenderSystemCapabilities(void) const override; - virtual RenderWindow* _createRenderWindow( const String &name, + RenderWindow* _createRenderWindow( const String &name, unsigned int width, unsigned int height, bool fullScreen, - const NameValuePairList *miscParams = 0); + const NameValuePairList *miscParams = 0) override; - virtual MultiRenderTarget* createMultiRenderTarget(const String & name); + MultiRenderTarget* createMultiRenderTarget(const String & name) override; - virtual void _setTexture(size_t unit, bool enabled, const TexturePtr& texPtr); + void _setTexture(size_t unit, bool enabled, const TexturePtr& texPtr) override; - virtual DepthBuffer* _createDepthBufferFor( RenderTarget *renderTarget); + DepthBuffer* _createDepthBufferFor( RenderTarget *renderTarget) override; void setStencilState(const StencilState& state) override; @@ -122,51 +122,51 @@ namespace Ogre virtual void _waitForTailFrameToFinish(void); virtual bool _willTailFrameStall(void); - virtual void _beginFrame(void); - virtual void _endFrame(void); + void _beginFrame(void) override; + void _endFrame(void) override; - void setScissorTest(bool enabled, const Rect& rect); + void setScissorTest(bool enabled, const Rect& rect) override; - virtual void _setViewport(Viewport *vp); + void _setViewport(Viewport *vp) override; - void setColourBlendState(const ColourBlendState& state); + void setColourBlendState(const ColourBlendState& state) override; - void _setSampler( size_t texUnit, Sampler& s); - void _setDepthClamp(bool enable); - void _setDepthBufferParams(bool depthTest = true, bool depthWrite = true, CompareFunction depthFunction = CMPF_LESS_EQUAL); + void _setSampler( size_t texUnit, Sampler& s) override; + void _setDepthClamp(bool enable) override; + void _setDepthBufferParams(bool depthTest = true, bool depthWrite = true, CompareFunction depthFunction = CMPF_LESS_EQUAL) override; - void _setCullingMode(CullingMode mode); - void _setDepthBias(float constantBias, float slopeScaleBias = 0.0f); + void _setCullingMode(CullingMode mode) override; + void _setDepthBias(float constantBias, float slopeScaleBias = 0.0f) override; - virtual void _convertProjectionMatrix( const Matrix4& matrix, Matrix4& dest, - bool forGpuProgram = false); - void _setPolygonMode(PolygonMode level); - void _setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverage); - virtual void _render( const RenderOperation &op ); + void _convertProjectionMatrix( const Matrix4& matrix, Matrix4& dest, + bool forGpuProgram = false) override; + void _setPolygonMode(PolygonMode level) override; + void _setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverage) override; + void _render( const RenderOperation &op ) override; - void bindGpuProgram(GpuProgram* prg); - virtual void bindGpuProgramParameters(GpuProgramType gptype, - const GpuProgramParametersPtr& params, uint16 variabilityMask); - virtual void clearFrameBuffer(unsigned int buffers, + void bindGpuProgram(GpuProgram* prg) override; + void bindGpuProgramParameters(GpuProgramType gptype, + const GpuProgramParametersPtr& params, uint16 variabilityMask) override; + void clearFrameBuffer(unsigned int buffers, const ColourValue& colour = ColourValue::Black, - float depth = 1.0f, unsigned short stencil = 0); + float depth = 1.0f, unsigned short stencil = 0) override; - virtual Real getMinimumDepthInputValue(void); - virtual Real getMaximumDepthInputValue(void); + Real getMinimumDepthInputValue(void) override; + Real getMaximumDepthInputValue(void) override; - virtual void _setRenderTarget(RenderTarget *target); + void _setRenderTarget(RenderTarget *target) override; - virtual void beginProfileEvent( const String &eventName ); - virtual void endProfileEvent( void ); - virtual void markProfileEvent( const String &event ); + void beginProfileEvent( const String &eventName ) override; + void endProfileEvent( void ) override; + void markProfileEvent( const String &event ) override; virtual void initGPUProfiling(void); virtual void deinitGPUProfiling(void); virtual void beginGPUSampleProfile( const String &name, uint32 *hashCache ); virtual void endGPUSampleProfile( const String &name ); - virtual void initialiseFromRenderSystemCapabilities( RenderSystemCapabilities* caps, - RenderTarget* primary ); + void initialiseFromRenderSystemCapabilities( RenderSystemCapabilities* caps, + RenderTarget* primary ) override; MetalDevice* getActiveDevice(void) { return mActiveDevice; } diff --git a/RenderSystems/Metal/include/OgreMetalRenderTexture.h b/RenderSystems/Metal/include/OgreMetalRenderTexture.h index 5ccbee78edb..b0180ccf062 100644 --- a/RenderSystems/Metal/include/OgreMetalRenderTexture.h +++ b/RenderSystems/Metal/include/OgreMetalRenderTexture.h @@ -48,11 +48,11 @@ namespace Ogre uint32 fsaa, uint32 mip, bool hwGamma ); virtual ~MetalRenderTexture(); - virtual void swapBuffers(void); + void swapBuffers(void) override; // RenderTarget overloads. - virtual bool requiresTextureFlipping() const { return false; } - virtual void getCustomAttribute( const String& name, void* pData ); + bool requiresTextureFlipping() const override { return false; } + void getCustomAttribute( const String& name, void* pData ) override; }; } diff --git a/RenderSystems/Metal/include/OgreMetalRenderWindow.h b/RenderSystems/Metal/include/OgreMetalRenderWindow.h index 03f6a3a9d09..91e4117e656 100644 --- a/RenderSystems/Metal/include/OgreMetalRenderWindow.h +++ b/RenderSystems/Metal/include/OgreMetalRenderWindow.h @@ -57,23 +57,23 @@ namespace Ogre MetalRenderWindow( MetalDevice *ownerDevice, MetalRenderSystem *renderSystem ); virtual ~MetalRenderWindow(); - virtual void swapBuffers(void); - virtual void windowMovedOrResized(void); + void swapBuffers(void) override; + void windowMovedOrResized(void) override; - virtual bool nextDrawable(void); + bool nextDrawable(void) override; - virtual void create( const String& name, unsigned int width, unsigned int height, - bool fullScreen, const NameValuePairList *miscParams ); - virtual void destroy(void); + void create( const String& name, unsigned int width, unsigned int height, + bool fullScreen, const NameValuePairList *miscParams ) override; + void destroy(void) override; - virtual void resize( unsigned int width, unsigned int height ); - virtual void reposition( int left, int top ); + void resize( unsigned int width, unsigned int height ) override; + void reposition( int left, int top ) override; // RenderTarget overloads. - virtual void copyContentsToMemory(const Box& src, const PixelBox &dst, FrameBuffer buffer) {} - virtual bool requiresTextureFlipping() const { return false; } + void copyContentsToMemory(const Box& src, const PixelBox &dst, FrameBuffer buffer) override {} + bool requiresTextureFlipping() const override { return false; } - virtual void getCustomAttribute( const String& name, void* pData ); + void getCustomAttribute( const String& name, void* pData ) override; PixelFormat suggestPixelFormat() const override { return mFormat; } diff --git a/RenderSystems/Metal/include/OgreMetalTexture.h b/RenderSystems/Metal/include/OgreMetalTexture.h index c91250cd569..10e82455bf9 100644 --- a/RenderSystems/Metal/include/OgreMetalTexture.h +++ b/RenderSystems/Metal/include/OgreMetalTexture.h @@ -51,8 +51,8 @@ namespace Ogre void createMetalTexResource(void); void createSurfaceList(void); - virtual void createInternalResourcesImpl(void); - virtual void freeInternalResourcesImpl(void); + void createInternalResourcesImpl(void) override; + void freeInternalResourcesImpl(void) override; public: MetalTexture( ResourceManager* creator, const String& name, ResourceHandle handle, diff --git a/RenderSystems/Metal/include/OgreMetalTextureManager.h b/RenderSystems/Metal/include/OgreMetalTextureManager.h index 3bc858e35e1..ab7a083cdd0 100644 --- a/RenderSystems/Metal/include/OgreMetalTextureManager.h +++ b/RenderSystems/Metal/include/OgreMetalTextureManager.h @@ -51,17 +51,17 @@ namespace Ogre MetalDevice *mDevice; /// @copydoc ResourceManager::createImpl - virtual Resource* createImpl(const String& name, ResourceHandle handle, + Resource* createImpl(const String& name, ResourceHandle handle, const String& group, bool isManual, ManualResourceLoader* loader, - const NameValuePairList* createParams); + const NameValuePairList* createParams) override; - SamplerPtr _createSamplerImpl(); + SamplerPtr _createSamplerImpl() override; public: MetalTextureManager( MetalDevice *device ); virtual ~MetalTextureManager(); /// @copydoc TextureManager::getNativeFormat - virtual PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage); + PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage) override; }; }