diff --git a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLMonolithicProgram.h b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLMonolithicProgram.h index 33d2e87ca07..21510a2cb6f 100644 --- a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLMonolithicProgram.h +++ b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLMonolithicProgram.h @@ -46,11 +46,11 @@ namespace Ogre { the program object like GLSLSeparableProgram can. Hence the name 'monolithic'. */ - class _OgreGL3PlusExport GLSLMonolithicProgram : public GLSLProgram + class _OgreGL3PlusExport GLSLMonolithicProgram final : public GLSLProgram { protected: /// Compiles and links the vertex and fragment programs - void compileAndLink(); + void compileAndLink() override; /// Put a program in use void _useProgram(); @@ -69,27 +69,27 @@ namespace Ogre { /** Makes a program object active by making sure it is linked and then putting it in use. */ - void activate(); + void activate() override; /** Updates program object uniforms using data from GpuProgramParameters. normally called by GLSLShader::bindParameters() just before rendering occurs. */ - void updateUniforms(GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType); + void updateUniforms(GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType) override; /** Updates program object uniform blocks using data from GpuProgramParameters. normally called by GLSLShader::bindParameters() just before rendering occurs. */ - void updateUniformBlocks(GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType); + void updateUniformBlocks(GpuProgramParametersSharedPtr params, uint16 mask, GpuProgramType fromProgType) override; /** Updates program object uniforms using data from pass iteration GpuProgramParameters. normally called by GLSLShader::bindMultiPassParameters() just before multi pass rendering occurs. */ - void updatePassIterationUniforms(GpuProgramParametersSharedPtr params); + void updatePassIterationUniforms(GpuProgramParametersSharedPtr params) override; }; } diff --git a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShader.h b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShader.h index 2f0ad0800c8..e2440104a4b 100644 --- a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShader.h +++ b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShader.h @@ -58,51 +58,51 @@ namespace Ogre { command. All the modules to be attached are listed on the same line as the attach command separated by white space. */ - class _OgreGL3PlusExport GLSLShader : public HighLevelGpuProgram + class _OgreGL3PlusExport GLSLShader final : public HighLevelGpuProgram { public: /// Command object for attaching another GLSL Program - class CmdAttach : public ParamCommand + class CmdAttach final : public ParamCommand { public: - String doGet(const void* target) const; - void doSet(void* target, const String& shaderNames); + String doGet(const void* target) const override; + void doSet(void* target, const String& shaderNames) override; }; /// Command object for setting macro defines - class CmdPreprocessorDefines : public ParamCommand + class CmdPreprocessorDefines final : 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; }; /// Command object for setting the input operation type (geometry shader only) - class _OgreGL3PlusExport CmdInputOperationType : public ParamCommand + class _OgreGL3PlusExport CmdInputOperationType final : 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; }; /// Command object for setting the output operation type (geometry shader only) - class _OgreGL3PlusExport CmdOutputOperationType : public ParamCommand + class _OgreGL3PlusExport CmdOutputOperationType final : 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; }; /// Command object for setting the maximum output vertices (geometry shader only) - class _OgreGL3PlusExport CmdMaxOutputVertices : public ParamCommand + class _OgreGL3PlusExport CmdMaxOutputVertices final : 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; }; /// Command object for setting matrix packing in column-major order - class CmdColumnMajorMatrices : public ParamCommand + class CmdColumnMajorMatrices final : 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; }; /** Returns the operation type that this geometry program expects to receive as input @@ -154,9 +154,9 @@ namespace Ogre { String getShaderTypeLabel(GpuProgramType programType); /// Overridden - bool getPassTransformStates() const; - bool getPassSurfaceAndLightStates() const; - bool getPassFogStates() const; + bool getPassTransformStates() const override; + bool getPassSurfaceAndLightStates() const override; + bool getPassFogStates() const override; /** Attach another GLSL Shader to this one. */ void attachChildShader(const String& name); @@ -167,16 +167,16 @@ namespace Ogre { const String& getPreprocessorDefines() const { return mPreprocessorDefines; } /// Overridden from GpuProgram - const String& getLanguage() const; + const String& getLanguage() const override; /** Sets whether matrix packing in column-major order. */ void setColumnMajorMatrices(bool columnMajor) { mColumnMajorMatrices = columnMajor; } /** Gets whether matrix packed in column-major order. */ bool getColumnMajorMatrices() const { return mColumnMajorMatrices; } - virtual void setReplaceVersionMacro( bool bReplace ); + void setReplaceVersionMacro( bool bReplace ) override; /// Overridden from GpuProgram - GpuProgramParametersSharedPtr createParameters(); + GpuProgramParametersSharedPtr createParameters() override; /// Compile source into shader object bool compile( const bool checkErrors = false); @@ -206,13 +206,13 @@ namespace Ogre { void setLinked(GLint flag) { mLinked = flag; } /// @copydoc Resource::calculateSize - size_t calculateSize() const; + size_t calculateSize() const override; /// Get the OGRE assigned shader ID. GLuint getShaderID() const { return mShaderID; } /// Since GLSL has no assembly, use this shader for binding. - GpuProgram* _getBindingDelegate() { return this; } + GpuProgram* _getBindingDelegate() override { return this; } protected: static CmdPreprocessorDefines msCmdPreprocessorDefines; @@ -226,23 +226,23 @@ namespace Ogre { /** Internal load implementation, must be implemented by subclasses. */ - void loadFromSource(); + void loadFromSource() override; /** Internal method for creating a dummy low-level program for this high-level program. GLSL does not give access to the low level implementation of the shader so this method creates an object sub-classed from GL3PlusShader just to be compatible with GL3PlusRenderSystem. */ - void createLowLevelImpl(); + void createLowLevelImpl() override; /// Internal unload implementation, must be implemented by subclasses - void unloadHighLevelImpl(); + void unloadHighLevelImpl() override; /// Overridden from HighLevelGpuProgram - void unloadImpl(); + void unloadImpl() override; /// Populate the passed parameters with name->index map - void populateParameterNames(GpuProgramParametersSharedPtr params); + void populateParameterNames(GpuProgramParametersSharedPtr params) override; /// Populate the passed parameters with name->index map, must be overridden - void buildConstantDefinitions() const; + void buildConstantDefinitions() const override; /** Check the compile result for an error with default precision - and recompile if needed. some glsl compilers return an error default precision is set to types other @@ -252,7 +252,7 @@ namespace Ogre { */ void checkAndFixInvalidDefaultPrecisionError( String &message ); - virtual void setUniformBlockBinding( const char *blockName, uint32 bindingSlot ); + void setUniformBlockBinding( const char *blockName, uint32 bindingSlot ) override; // /// @copydoc Resource::loadImpl diff --git a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderFactory.h b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderFactory.h index 8758fbbda96..477d351f098 100644 --- a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderFactory.h +++ b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderFactory.h @@ -36,21 +36,21 @@ namespace Ogre { /** Factory class for GLSL shaders. */ - class _OgreGL3PlusExport GLSLShaderFactory : public HighLevelGpuProgramFactory + class _OgreGL3PlusExport GLSLShaderFactory final : public HighLevelGpuProgramFactory { protected: static String mLanguageName; public: GLSLShaderFactory(const GL3PlusSupport& support); - ~GLSLShaderFactory(); + ~GLSLShaderFactory() override; /// Get the name of the language this factory creates shaders for. - const String& getLanguage() const; + const String& getLanguage() const override; /// Create an instance of GLSLProgram. - HighLevelGpuProgram* create(ResourceManager* creator, - const String& name, ResourceHandle handle, - const String& group, bool isManual, ManualResourceLoader* loader); - void destroy(HighLevelGpuProgram* prog); + HighLevelGpuProgram *create( ResourceManager *creator, const String &name, ResourceHandle handle, + const String &group, bool isManual, + ManualResourceLoader *loader ) override; + void destroy( HighLevelGpuProgram *prog ) override; private: static GLSLMonolithicProgramManager* mMonolithicProgramManager; diff --git a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderManager.h b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderManager.h index 6401e7d41c9..53884b96500 100644 --- a/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderManager.h +++ b/RenderSystems/GL3Plus/include/GLSL/OgreGLSLShaderManager.h @@ -37,7 +37,7 @@ namespace Ogre { //TODO A brief description of what purpose this class serves in GL3+. // Seems to primarily serve the purpose of creating GpuProgram's based // on material script programs. Also handles cache creation. - class _OgreGL3PlusExport GLSLShaderManager : public GpuProgramManager + class _OgreGL3PlusExport GLSLShaderManager final : public GpuProgramManager { public: typedef GpuProgram* (*CreateGpuProgramCallback)(ResourceManager* creator, @@ -51,17 +51,18 @@ namespace Ogre { protected: /// @copydoc ResourceManager::createImpl - Resource* createImpl(const String& name, ResourceHandle handle, - const String& group, bool isManual, ManualResourceLoader* loader, - const NameValuePairList* params); + Resource *createImpl( const String &name, ResourceHandle handle, const String &group, + bool isManual, ManualResourceLoader *loader, + const NameValuePairList *params ) override; /// Specialised create method with specific parameters. - Resource* createImpl(const String& name, ResourceHandle handle, - const String& group, bool isManual, ManualResourceLoader* loader, - GpuProgramType gptype, const String& syntaxCode); + Resource *createImpl( const String &name, ResourceHandle handle, const String &group, + bool isManual, ManualResourceLoader *loader, GpuProgramType gptype, + const String &syntaxCode ) override; public: GLSLShaderManager(); - virtual ~GLSLShaderManager(); + ~GLSLShaderManager() override; + bool registerShaderFactory(const String& syntaxCode, CreateGpuProgramCallback createFn); bool unregisterShaderFactory(const String& syntaxCode); }; diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusAsyncTextureTicket.h b/RenderSystems/GL3Plus/include/OgreGL3PlusAsyncTextureTicket.h index 3194ff2dcea..6371fb48d91 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusAsyncTextureTicket.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusAsyncTextureTicket.h @@ -37,7 +37,7 @@ namespace Ogre { /** See AsyncTextureTicket */ - class _OgreGL3PlusExport GL3PlusAsyncTextureTicket : public AsyncTextureTicket + class _OgreGL3PlusExport GL3PlusAsyncTextureTicket final : public AsyncTextureTicket { protected: GLuint mVboName; @@ -53,13 +53,13 @@ namespace Ogre GLuint createBuffer( uint32 width, uint32 height, uint32 depthOrSlices ); - virtual TextureBox mapImpl( uint32 slice ); - virtual void unmapImpl(); + TextureBox mapImpl( uint32 slice ) override; + void unmapImpl() override; void waitForDownloadToFinish(); - virtual void downloadFromGpu( TextureGpu *textureSrc, uint8 mipLevel, - bool accurateTracking, TextureBox *srcBox=0 ); + void downloadFromGpu( TextureGpu *textureSrc, uint8 mipLevel, + bool accurateTracking, TextureBox *srcBox=0 ) override; public: GL3PlusAsyncTextureTicket( uint32 width, uint32 height, uint32 depthOrSlices, @@ -67,9 +67,9 @@ namespace Ogre PixelFormatGpu pixelFormatFamily, GL3PlusVaoManager *vaoManager, bool supportsGetTextureSubImage ); - virtual ~GL3PlusAsyncTextureTicket(); + ~GL3PlusAsyncTextureTicket() override; - virtual bool queryIsTransferDone(); + bool queryIsTransferDone() override; }; } diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusDefaultHardwareBufferManager.h b/RenderSystems/GL3Plus/include/OgreGL3PlusDefaultHardwareBufferManager.h index 0f2417479cb..b1c0d0f8a5c 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusDefaultHardwareBufferManager.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusDefaultHardwareBufferManager.h @@ -39,110 +39,110 @@ THE SOFTWARE. namespace Ogre { namespace v1 { /// Specialisation of HardwareVertexBuffer for emulation - class _OgreGL3PlusExport GL3PlusDefaultHardwareVertexBuffer : public HardwareVertexBuffer + class _OgreGL3PlusExport GL3PlusDefaultHardwareVertexBuffer final : public HardwareVertexBuffer { protected: unsigned char* mData; /// @copydoc HardwareBuffer::lock - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /// @copydoc HardwareBuffer::unlock - void unlockImpl(); + void unlockImpl() override; public: GL3PlusDefaultHardwareVertexBuffer(size_t vertexSize, size_t numVertices, HardwareBuffer::Usage usage); GL3PlusDefaultHardwareVertexBuffer(HardwareBufferManagerBase* mgr, size_t vertexSize, size_t numVertices, HardwareBuffer::Usage usage); - ~GL3PlusDefaultHardwareVertexBuffer(); + ~GL3PlusDefaultHardwareVertexBuffer() override; /// @copydoc HardwareBuffer::readData - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /// @copydoc HardwareBuffer::writeData void writeData(size_t offset, size_t length, const void* pSource, - bool discardWholeBuffer = false); + bool discardWholeBuffer = false) override; /** Override HardwareBuffer to turn off all shadowing. */ - void* lock(size_t offset, size_t length, LockOptions options); + void* lock(size_t offset, size_t length, LockOptions options) override; /** Override HardwareBuffer to turn off all shadowing. */ - void unlock(); + void unlock() override; void* getDataPtr(size_t offset) const { return (void*)(mData + offset); } }; /// Specialisation of HardwareIndexBuffer for emulation - class _OgreGL3PlusExport GL3PlusDefaultHardwareIndexBuffer : public HardwareIndexBuffer + class _OgreGL3PlusExport GL3PlusDefaultHardwareIndexBuffer final : public HardwareIndexBuffer { protected: unsigned char* mData; /// @copydoc HardwareBuffer::lock - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /// @copydoc HardwareBuffer::unlock - void unlockImpl(); + void unlockImpl() override; public: GL3PlusDefaultHardwareIndexBuffer(IndexType idxType, size_t numIndexes, HardwareBuffer::Usage usage); - ~GL3PlusDefaultHardwareIndexBuffer(); + ~GL3PlusDefaultHardwareIndexBuffer() override; /// @copydoc HardwareBuffer::readData - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /// @copydoc HardwareBuffer::writeData void writeData(size_t offset, size_t length, const void* pSource, - bool discardWholeBuffer = false); + bool discardWholeBuffer = false) override; /** Override HardwareBuffer to turn off all shadowing. */ - void* lock(size_t offset, size_t length, LockOptions options); + void* lock(size_t offset, size_t length, LockOptions options) override; /** Override HardwareBuffer to turn off all shadowing. */ - void unlock(); + void unlock() override; void* getDataPtr(size_t offset) const { return (void*)(mData + offset); } }; /// Specialisation of HardwareUniformBuffer for emulation - class _OgreGL3PlusExport GL3PlusDefaultHardwareUniformBuffer : public HardwareUniformBuffer + class _OgreGL3PlusExport GL3PlusDefaultHardwareUniformBuffer final : public HardwareUniformBuffer { protected: unsigned char* mData; /// @copydoc HardwareBuffer::lock - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /// @copydoc HardwareBuffer::unlock - void unlockImpl(); + void unlockImpl() override; public: GL3PlusDefaultHardwareUniformBuffer(size_t bufferSize, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name); GL3PlusDefaultHardwareUniformBuffer(HardwareBufferManagerBase* mgr, size_t bufferSize, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name); - ~GL3PlusDefaultHardwareUniformBuffer(); + ~GL3PlusDefaultHardwareUniformBuffer() override; /// @copydoc HardwareBuffer::readData - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /// @copydoc HardwareBuffer::writeData void writeData(size_t offset, size_t length, const void* pSource, - bool discardWholeBuffer = false); + bool discardWholeBuffer = false) override; /** Override HardwareBuffer to turn off all shadowing. */ - void* lock(size_t offset, size_t length, LockOptions options); + void* lock(size_t offset, size_t length, LockOptions options) override; /** Override HardwareBuffer to turn off all shadowing. */ - void unlock(); + void unlock() override; void* getDataPtr(size_t offset) const { return (void*)(mData + offset); } }; /// Specialisation of HardwareCounterBuffer for emulation - class _OgreGL3PlusExport GL3PlusDefaultHardwareCounterBuffer : public HardwareCounterBuffer + class _OgreGL3PlusExport GL3PlusDefaultHardwareCounterBuffer final : public HardwareCounterBuffer { protected: unsigned char* mData; /// @copydoc HardwareBuffer::lock - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /// @copydoc HardwareBuffer::unlock - void unlockImpl(); + void unlockImpl() override; public: GL3PlusDefaultHardwareCounterBuffer(const String& name); GL3PlusDefaultHardwareCounterBuffer(HardwareBufferManagerBase* mgr, const String& name); - ~GL3PlusDefaultHardwareCounterBuffer(); + ~GL3PlusDefaultHardwareCounterBuffer() override; /// @copydoc HardwareBuffer::readData - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /// @copydoc HardwareBuffer::writeData void writeData(size_t offset, size_t length, const void* pSource, - bool discardWholeBuffer = false); + bool discardWholeBuffer = false) override; /** Override HardwareBuffer to turn off all shadowing. */ - void* lock(size_t offset, size_t length, LockOptions options); + void* lock(size_t offset, size_t length, LockOptions options) override; /** Override HardwareBuffer to turn off all shadowing. */ - void unlock(); + void unlock() override; void* getDataPtr(size_t offset) const { return (void*)(mData + offset); } }; @@ -154,29 +154,30 @@ namespace v1 { rendering system (which is required to create a 'real' hardware buffer manager). */ - class _OgreGL3PlusExport GL3PlusDefaultHardwareBufferManagerBase : public HardwareBufferManagerBase + class _OgreGL3PlusExport GL3PlusDefaultHardwareBufferManagerBase final + : public HardwareBufferManagerBase { public: GL3PlusDefaultHardwareBufferManagerBase(); - ~GL3PlusDefaultHardwareBufferManagerBase(); + ~GL3PlusDefaultHardwareBufferManagerBase() override; /// Creates a vertex buffer HardwareVertexBufferSharedPtr createVertexBuffer(size_t vertexSize, size_t numVerts, - HardwareBuffer::Usage usage, bool useShadowBuffer = false); + HardwareBuffer::Usage usage, bool useShadowBuffer = false) override; /// Create a hardware index buffer HardwareIndexBufferSharedPtr createIndexBuffer(HardwareIndexBuffer::IndexType itype, size_t numIndexes, - HardwareBuffer::Usage usage, bool useShadowBuffer = false); + HardwareBuffer::Usage usage, bool useShadowBuffer = false) override; /// Create a uniform buffer HardwareUniformBufferSharedPtr - createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = ""); + createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = "") override; /// Create a counter buffer HardwareCounterBufferSharedPtr - createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = ""); + createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = "") override; }; /// GL3PlusDefaultHardwareBufferManagerBase as a Singleton - class _OgreGL3PlusExport GL3PlusDefaultHardwareBufferManager : public HardwareBufferManager + class _OgreGL3PlusExport GL3PlusDefaultHardwareBufferManager final : public HardwareBufferManager { public: GL3PlusDefaultHardwareBufferManager() @@ -184,7 +185,7 @@ namespace v1 { { } - ~GL3PlusDefaultHardwareBufferManager() + ~GL3PlusDefaultHardwareBufferManager() override { OGRE_DELETE mImpl; } diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareBufferManager.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareBufferManager.h index 10322047ff4..37ab754e080 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareBufferManager.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareBufferManager.h @@ -39,7 +39,7 @@ namespace v1 { # define OGRE_GL_DEFAULT_MAP_BUFFER_THRESHOLD (1024 * 32) /** Implementation of HardwareBufferManager for OpenGL. */ - class _OgreGL3PlusExport GL3PlusHardwareBufferManagerBase : public HardwareBufferManagerBase + class _OgreGL3PlusExport GL3PlusHardwareBufferManagerBase final : public HardwareBufferManagerBase { protected: char* mScratchBufferPool; @@ -50,17 +50,17 @@ namespace v1 { public: GL3PlusHardwareBufferManagerBase(); - ~GL3PlusHardwareBufferManagerBase(); + ~GL3PlusHardwareBufferManagerBase() override; /// Creates a vertex buffer HardwareVertexBufferSharedPtr createVertexBuffer(size_t vertexSize, - size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer = false); + size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer = false) override; /// Create a hardware vertex buffer HardwareIndexBufferSharedPtr createIndexBuffer( HardwareIndexBuffer::IndexType itype, size_t numIndexes, - HardwareBuffer::Usage usage, bool useShadowBuffer = false); + HardwareBuffer::Usage usage, bool useShadowBuffer = false) override; /// Create a uniform buffer HardwareUniformBufferSharedPtr createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, - bool useShadowBuffer, const String& name = ""); + bool useShadowBuffer, const String& name = "") override; /// Create a uniform buffer HardwareUniformBufferSharedPtr createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, size_t binding, const String& name = ""); @@ -73,7 +73,7 @@ namespace v1 { bool useShadowBuffer, size_t binding, const String& name = ""); /// Create a counter buffer HardwareCounterBufferSharedPtr createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, - bool useShadowBuffer, const String& name = ""); + bool useShadowBuffer, const String& name = "") override; /// Create a counter buffer HardwareCounterBufferSharedPtr createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, size_t binding, const String& name = ""); @@ -103,7 +103,7 @@ namespace v1 { }; /// GL3PlusHardwareBufferManagerBase as a Singleton - class _OgreGL3PlusExport GL3PlusHardwareBufferManager : public HardwareBufferManager + class _OgreGL3PlusExport GL3PlusHardwareBufferManager final : public HardwareBufferManager { // protected: // UniformBufferList mShaderStorageBuffers; @@ -114,7 +114,7 @@ namespace v1 { { } - ~GL3PlusHardwareBufferManager() + ~GL3PlusHardwareBufferManager() override { // mShaderStorageBuffers.clear(); OGRE_DELETE mImpl; diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareCounterBuffer.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareCounterBuffer.h index 72fac8b9eaf..8172fea2ce1 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareCounterBuffer.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareCounterBuffer.h @@ -35,7 +35,7 @@ namespace Ogre { namespace v1 { /// Specialisation of HardwareCounterBuffer for OpenGL - class _OgreGL3PlusExport GL3PlusHardwareCounterBuffer : public HardwareCounterBuffer + class _OgreGL3PlusExport GL3PlusHardwareCounterBuffer final : public HardwareCounterBuffer { private: GLuint mBufferId; @@ -43,24 +43,24 @@ namespace v1 { protected: /** See HardwareBuffer. */ - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /** See HardwareBuffer. */ - void unlockImpl(); + void unlockImpl() override; public: GL3PlusHardwareCounterBuffer(HardwareBufferManagerBase* mgr, const String& name); - ~GL3PlusHardwareCounterBuffer(); + ~GL3PlusHardwareCounterBuffer() override; /** See HardwareBuffer. */ - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /** See HardwareBuffer. */ void writeData(size_t offset, size_t length, - const void* pSource, bool discardWholeBuffer = false); + const void* pSource, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ void copyData(HardwareBuffer& srcBuffer, size_t srcOffset, - size_t dstOffset, size_t length, bool discardWholeBuffer = false); + size_t dstOffset, size_t length, bool discardWholeBuffer = false) override; inline GLuint getGLBufferId() const { return mBufferId; } void setGLBufferBinding(GLint binding); diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareIndexBuffer.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareIndexBuffer.h index a287dac5831..3c6cf49e111 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareIndexBuffer.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareIndexBuffer.h @@ -34,7 +34,7 @@ THE SOFTWARE. namespace Ogre { namespace v1 { - class _OgreGL3PlusExport GL3PlusHardwareIndexBuffer : public HardwareIndexBuffer + class _OgreGL3PlusExport GL3PlusHardwareIndexBuffer final : public HardwareIndexBuffer { private: GLuint mBufferId; @@ -47,25 +47,25 @@ namespace v1 { protected: /** See HardwareBuffer. */ - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /** See HardwareBuffer. */ - void unlockImpl(); + void unlockImpl() override; public: GL3PlusHardwareIndexBuffer(HardwareBufferManagerBase* mgr, IndexType idxType, size_t numIndexes, HardwareBuffer::Usage usage, bool useShadowBuffer); - ~GL3PlusHardwareIndexBuffer(); + ~GL3PlusHardwareIndexBuffer() override; /** See HardwareBuffer. */ - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /** See HardwareBuffer. */ void writeData(size_t offset, size_t length, - const void* pSource, bool discardWholeBuffer = false); + const void* pSource, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ void copyData(HardwareBuffer& srcBuffer, size_t srcOffset, - size_t dstOffset, size_t length, bool discardWholeBuffer = false); + size_t dstOffset, size_t length, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ - void _updateFromShadow(); + void _updateFromShadow() override; GLuint getGLBufferId() const { return mBufferId; } }; diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareOcclusionQuery.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareOcclusionQuery.h index 4c586529edd..96f6d018aa0 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareOcclusionQuery.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareOcclusionQuery.h @@ -62,7 +62,7 @@ namespace Ogre { * Updated on 13/9/2005 by Tuan Kuranes email: tuan.kuranes@free.fr */ -class _OgreGL3PlusExport GL3PlusHardwareOcclusionQuery : public HardwareOcclusionQuery +class _OgreGL3PlusExport GL3PlusHardwareOcclusionQuery final : public HardwareOcclusionQuery { //---------------------------------------------------------------------- // Public methods @@ -81,10 +81,10 @@ class _OgreGL3PlusExport GL3PlusHardwareOcclusionQuery : public HardwareOcclusio //------------------------------------------------------------------ // Occlusion query functions (see base class documentation for this) //-- - void beginOcclusionQuery(); - void endOcclusionQuery(); - bool pullOcclusionQuery(unsigned int* NumOfFragments); - bool isStillOutstanding(); + void beginOcclusionQuery() override; + void endOcclusionQuery() override; + bool pullOcclusionQuery(unsigned int* NumOfFragments) override; + bool isStillOutstanding() override; private: GLuint mQueryID; diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareShaderStorageBuffer.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareShaderStorageBuffer.h index ec4fc826c92..a7b41f35a89 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareShaderStorageBuffer.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareShaderStorageBuffer.h @@ -36,7 +36,7 @@ namespace Ogre { namespace v1 { /// Specialisation of HardwareUniformBuffer for the OpenGL Shader Storage Buffer - class _OgreGL3PlusExport GL3PlusHardwareShaderStorageBuffer : public HardwareUniformBuffer + class _OgreGL3PlusExport GL3PlusHardwareShaderStorageBuffer final : public HardwareUniformBuffer { private: GLuint mBufferId; @@ -44,25 +44,25 @@ namespace v1 { protected: /** See HardwareBuffer. */ - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /** See HardwareBuffer. */ - void unlockImpl(); + void unlockImpl() override; public: GL3PlusHardwareShaderStorageBuffer(HardwareBufferManagerBase* mgr, size_t bufferSize, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name); - ~GL3PlusHardwareShaderStorageBuffer(); + ~GL3PlusHardwareShaderStorageBuffer() override; /** See HardwareBuffer. */ - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /** See HardwareBuffer. */ void writeData(size_t offset, size_t length, - const void* pSource, bool discardWholeBuffer = false); + const void* pSource, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ void copyData(HardwareBuffer& srcBuffer, size_t srcOffset, - size_t dstOffset, size_t length, bool discardWholeBuffer = false); + size_t dstOffset, size_t length, bool discardWholeBuffer = false) override; inline GLuint getGLBufferId() const { return mBufferId; } void setGLBufferBinding(GLint binding); diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareUniformBuffer.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareUniformBuffer.h index 53e36fdae52..7dd3658a89e 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareUniformBuffer.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareUniformBuffer.h @@ -34,7 +34,7 @@ THE SOFTWARE. namespace Ogre { namespace v1 { /// Specialisation of HardwareUniformBuffer for OpenGL - class _OgreGL3PlusExport GL3PlusHardwareUniformBuffer : public HardwareUniformBuffer + class _OgreGL3PlusExport GL3PlusHardwareUniformBuffer final : public HardwareUniformBuffer { struct GL3PlusBufferParametersLayout { @@ -51,27 +51,27 @@ namespace v1 { protected: /** See HardwareBuffer. */ - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /** See HardwareBuffer. */ - void unlockImpl(); + void unlockImpl() override; public: GL3PlusBufferParametersLayout mBufferParamsLayout; GL3PlusHardwareUniformBuffer(HardwareBufferManagerBase* mgr, size_t bufferSize, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name); - ~GL3PlusHardwareUniformBuffer(); + ~GL3PlusHardwareUniformBuffer() override; /** See HardwareBuffer. */ - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /** See HardwareBuffer. */ void writeData(size_t offset, size_t length, - const void* pSource, bool discardWholeBuffer = false); + const void* pSource, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ void copyData(HardwareBuffer& srcBuffer, size_t srcOffset, - size_t dstOffset, size_t length, bool discardWholeBuffer = false); + size_t dstOffset, size_t length, bool discardWholeBuffer = false) override; inline GLuint getGLBufferId() const { return mBufferId; } void setGLBufferBinding(GLint binding); diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareVertexBuffer.h b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareVertexBuffer.h index 0add600df63..b1b47922056 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareVertexBuffer.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusHardwareVertexBuffer.h @@ -35,7 +35,7 @@ namespace Ogre { namespace v1 { /// Specialisation of HardwareVertexBuffer for OpenGL - class _OgreGL3PlusExport GL3PlusHardwareVertexBuffer : public HardwareVertexBuffer + class _OgreGL3PlusExport GL3PlusHardwareVertexBuffer final : public HardwareVertexBuffer { private: GLuint mBufferId; @@ -48,28 +48,28 @@ namespace v1 { protected: /** See HardwareBuffer. */ - void* lockImpl(size_t offset, size_t length, LockOptions options); + void* lockImpl(size_t offset, size_t length, LockOptions options) override; /** See HardwareBuffer. */ - void unlockImpl(); + void unlockImpl() override; public: GL3PlusHardwareVertexBuffer(HardwareBufferManagerBase* mgr, size_t vertexSize, size_t numVertices, HardwareBuffer::Usage usage, bool useShadowBuffer); - ~GL3PlusHardwareVertexBuffer(); + ~GL3PlusHardwareVertexBuffer() override; /** See HardwareBuffer. */ - void readData(size_t offset, size_t length, void* pDest); + void readData(size_t offset, size_t length, void* pDest) override; /** See HardwareBuffer. */ void writeData(size_t offset, size_t length, - const void* pSource, bool discardWholeBuffer = false); + const void* pSource, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ void copyData(HardwareBuffer& srcBuffer, size_t srcOffset, - size_t dstOffset, size_t length, bool discardWholeBuffer = false); + size_t dstOffset, size_t length, bool discardWholeBuffer = false) override; /** See HardwareBuffer. */ - void _updateFromShadow(); + void _updateFromShadow() override; inline GLuint getGLBufferId() const { return mBufferId; } }; diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusPixelFormatToShaderType.h b/RenderSystems/GL3Plus/include/OgreGL3PlusPixelFormatToShaderType.h index 78c9ffa607c..669900ff548 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusPixelFormatToShaderType.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusPixelFormatToShaderType.h @@ -34,13 +34,13 @@ Copyright (c) 2000-2016 Torus Knot Software Ltd namespace Ogre { - class _OgreGL3PlusExport GL3PlusPixelFormatToShaderType : public PixelFormatToShaderType + class _OgreGL3PlusExport GL3PlusPixelFormatToShaderType final : public PixelFormatToShaderType { public: - virtual const char* getPixelFormatType( PixelFormatGpu pixelFormat ) const; - virtual const char* getDataType( PixelFormatGpu pixelFormat, uint32 textureType, - bool isMsaa, ResourceAccess::ResourceAccess access ) const; + const char *getPixelFormatType( PixelFormatGpu pixelFormat ) const override; + const char *getDataType( PixelFormatGpu pixelFormat, uint32 textureType, bool isMsaa, + ResourceAccess::ResourceAccess access ) const override; }; -} +} // namespace Ogre #endif diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusPlugin.h b/RenderSystems/GL3Plus/include/OgreGL3PlusPlugin.h index cb6a4ac58c2..a32389c9404 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusPlugin.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusPlugin.h @@ -28,36 +28,35 @@ THE SOFTWARE. #ifndef __GL3PlusPlugin_H__ #define __GL3PlusPlugin_H__ -#include "OgrePlugin.h" #include "OgreGL3PlusRenderSystem.h" +#include "OgrePlugin.h" namespace Ogre { - /** Plugin instance for GL3Plus Manager */ - class _OgreGL3PlusExport GL3PlusPlugin : public Plugin + class _OgreGL3PlusExport GL3PlusPlugin final : public Plugin { public: GL3PlusPlugin(); - /// @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: - GL3PlusRenderSystem* mRenderSystem; + GL3PlusRenderSystem *mRenderSystem; }; -} +} // namespace Ogre #endif diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusRenderPassDescriptor.h b/RenderSystems/GL3Plus/include/OgreGL3PlusRenderPassDescriptor.h index a0703236f51..15f9ece29bc 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusRenderPassDescriptor.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusRenderPassDescriptor.h @@ -56,7 +56,7 @@ namespace Ogre same FBO setup. This doesn't mean these RenderPassDescriptor are exactly the same, as they may have different clear, loadAction or storeAction values. */ - class _OgreGL3PlusExport GL3PlusRenderPassDescriptor : public RenderPassDescriptor + class _OgreGL3PlusExport GL3PlusRenderPassDescriptor final : public RenderPassDescriptor { protected: GLuint mFboName; @@ -89,14 +89,14 @@ namespace Ogre public: GL3PlusRenderPassDescriptor( GL3PlusRenderSystem *renderSystem ); - virtual ~GL3PlusRenderPassDescriptor(); + ~GL3PlusRenderPassDescriptor() override; GLuint getFboName() const { return mFboName; } - virtual void entriesModified( uint32 entryTypes ); + void entriesModified( uint32 entryTypes ) override; - virtual void setClearColour( uint8 idx, const ColourValue &clearColour ); - virtual void setClearColour( const ColourValue &clearColour ); + void setClearColour( uint8 idx, const ColourValue &clearColour ) override; + void setClearColour( const ColourValue &clearColour ) override; uint32 willSwitchTo( GL3PlusRenderPassDescriptor *newDesc, bool warnIfRtvWasFlushed ) const; diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusRenderSystem.h b/RenderSystems/GL3Plus/include/OgreGL3PlusRenderSystem.h index 16289777bd9..c38260c51e4 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusRenderSystem.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusRenderSystem.h @@ -53,7 +53,7 @@ namespace Ogre { /** Implementation of GL 3 as a rendering system. */ - class _OgreGL3PlusExport GL3PlusRenderSystem : public RenderSystem + class _OgreGL3PlusExport GL3PlusRenderSystem final : public RenderSystem { private: /// Rendering loop control @@ -149,18 +149,18 @@ namespace Ogre { GLint getCombinedMinMipFilter() const; #if OGRE_NO_QUAD_BUFFER_STEREO == 0 /// @copydoc RenderSystem::setDrawBuffer - virtual bool setDrawBuffer(ColourBufferType colourBuffer); + bool setDrawBuffer(ColourBufferType colourBuffer) override; #endif /// @copydoc RenderSystem::checkExtension - virtual bool checkExtension( const String &ext ) const; + bool checkExtension( const String &ext ) const override; /// @copydoc RenderSystem::getPixelFormatToShaderType - virtual const PixelFormatToShaderType* getPixelFormatToShaderType() const; + const PixelFormatToShaderType* getPixelFormatToShaderType() const override; - virtual void _clearStateAndFlushCommandBuffer(); + void _clearStateAndFlushCommandBuffer() override; - virtual void flushCommands(); + void flushCommands() override; unsigned char *mSwIndirectBufferPtr; @@ -194,7 +194,7 @@ namespace Ogre { public: // Default constructor / destructor GL3PlusRenderSystem(); - ~GL3PlusRenderSystem(); + ~GL3PlusRenderSystem() override; friend class ShaderGeneratorTechniqueResolverListener; @@ -204,80 +204,81 @@ namespace Ogre { /** See RenderSystem */ - const String& getName() const; + const String& getName() const override; /** See RenderSystem */ - const String& getFriendlyName() const; + const String& getFriendlyName() const override; /** See RenderSystem */ - ConfigOptionMap& getConfigOptions(); + ConfigOptionMap& getConfigOptions() override; /** See RenderSystem */ - void setConfigOption(const String &name, const String &value); + void setConfigOption(const String &name, const String &value) override; - virtual const char* getPriorityConfigOption( size_t idx ) const; + const char* getPriorityConfigOption( size_t idx ) const override; - virtual size_t getNumPriorityConfigOptions() const; + size_t getNumPriorityConfigOptions() const override; /** See RenderSystem */ - String validateConfigOptions(); + String validateConfigOptions() override; /** See RenderSystem */ - Window* _initialise( bool autoCreateWindow, const String& windowTitle = "OGRE Render Window" ); + Window* _initialise( bool autoCreateWindow, const String& windowTitle = "OGRE Render Window" ) override; /** See RenderSystem */ - virtual RenderSystemCapabilities* createRenderSystemCapabilities() const; + RenderSystemCapabilities* createRenderSystemCapabilities() const override; /** See RenderSystem */ - void initialiseFromRenderSystemCapabilities(RenderSystemCapabilities* caps, Window* primary); + void initialiseFromRenderSystemCapabilities( RenderSystemCapabilities *caps, + Window *primary ) override; /** See RenderSystem */ - void reinitialise(); // Used if settings changed mid-rendering + void reinitialise() override; // Used if settings changed mid-rendering /** See RenderSystem */ - void shutdown(); + void shutdown() override; /// @copydoc RenderSystem::_createRenderWindow - Window *_createRenderWindow( const String &name, uint32 width, uint32 height, - bool fullScreen, const NameValuePairList *miscParams = 0 ); + Window *_createRenderWindow( const String &name, uint32 width, uint32 height, bool fullScreen, + const NameValuePairList *miscParams = 0 ) override; /// @copydoc RenderSystem::_createRenderWindows bool _createRenderWindows( const RenderWindowDescriptionList &renderWindowDescriptions, - WindowList &createdWindows ); + WindowList &createdWindows ) override; - virtual void _setCurrentDeviceFromTexture( TextureGpu *texture ); - virtual GL3PlusFrameBufferDescMap& _getFrameBufferDescMap() { return mFrameBufferDescMap; } - virtual RenderPassDescriptor* createRenderPassDescriptor(); - virtual void beginRenderPassDescriptor( RenderPassDescriptor *desc, + void _setCurrentDeviceFromTexture( TextureGpu *texture ) override; + GL3PlusFrameBufferDescMap& _getFrameBufferDescMap() { return mFrameBufferDescMap; } + RenderPassDescriptor* createRenderPassDescriptor() override; + void beginRenderPassDescriptor( RenderPassDescriptor *desc, TextureGpu *anyTarget, uint8 mipLevel, const Vector4 *viewportSizes, const Vector4 *scissors, uint32 numViewports, bool overlaysEnabled, - bool warnIfRtvWasFlushed ); - virtual void endRenderPassDescriptor(); + bool warnIfRtvWasFlushed ) override; + void endRenderPassDescriptor() override; TextureGpu* createDepthBufferFor( TextureGpu *colourTexture, bool preferDepthTexture, - PixelFormatGpu depthBufferFormat, uint16 poolId ); + PixelFormatGpu depthBufferFormat, uint16 poolId ) override; /** See RenderSystem */ - String getErrorDescription(long errorNumber) const; + String getErrorDescription(long errorNumber) const override; /** See RenderSystem */ - VertexElementType getColourVertexElementType() const; + VertexElementType getColourVertexElementType() const override; // ----------------------------- // Low-level overridden members @@ -285,134 +286,136 @@ namespace Ogre { /** See RenderSystem */ - void _useLights(const LightList& lights, unsigned short limit) { }; // Not supported + void _useLights( const LightList & /*lights*/, unsigned short /*limit*/ ) override { + } // Not supported /** See RenderSystem */ - bool areFixedFunctionLightsInViewSpace() const { return true; } + bool areFixedFunctionLightsInViewSpace() const override { return true; } /** See RenderSystem */ - void _setWorldMatrix(const Matrix4 &m); + void _setWorldMatrix(const Matrix4 &m) override; /** See RenderSystem */ - void _setViewMatrix(const Matrix4 &m); + void _setViewMatrix(const Matrix4 &m) override; /** See RenderSystem */ - void _setProjectionMatrix(const Matrix4 &m); + void _setProjectionMatrix(const Matrix4 &m) override; /** See RenderSystem */ void _setSurfaceParams(const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, - TrackVertexColourType tracking) {} + TrackVertexColourType tracking) override {} /** See RenderSystem */ - void _setPointParameters(Real size, bool attenuationEnabled, - Real constant, Real linear, Real quadratic, Real minSize, Real maxSize); + void _setPointParameters( Real size, bool attenuationEnabled, Real constant, Real linear, + Real quadratic, Real minSize, Real maxSize ) override; /** See RenderSystem */ - void _setPointSpritesEnabled(bool enabled); + void _setPointSpritesEnabled(bool enabled) override; /** See RenderSystem */ - void _setVertexTexture(size_t unit, TextureGpu *tex); + void _setVertexTexture(size_t unit, TextureGpu *tex) override; /** See RenderSystem */ - void _setGeometryTexture(size_t unit, TextureGpu *tex); + void _setGeometryTexture(size_t unit, TextureGpu *tex) override; /** See RenderSystem */ - void _setTessellationHullTexture(size_t unit, TextureGpu *tex); + void _setTessellationHullTexture(size_t unit, TextureGpu *tex) override; /** See RenderSystem */ - void _setTessellationDomainTexture(size_t unit, TextureGpu *tex); + void _setTessellationDomainTexture(size_t unit, TextureGpu *tex) override; /** See RenderSystem */ - void _setTexture( size_t unit, TextureGpu *tex, bool bDepthReadOnly ); + void _setTexture( size_t unit, TextureGpu *tex, bool bDepthReadOnly ) override; /// See RenderSystem - virtual void _setTextures( uint32 slotStart, const DescriptorSetTexture *set, - uint32 hazardousTexIdx ); - virtual void _setTextures( uint32 slotStart, const DescriptorSetTexture2 *set ); - virtual void _setSamplers( uint32 slotStart, const DescriptorSetSampler *set ); - virtual void _setTexturesCS( uint32 slotStart, const DescriptorSetTexture *set ); - virtual void _setTexturesCS( uint32 slotStart, const DescriptorSetTexture2 *set ); - virtual void _setSamplersCS( uint32 slotStart, const DescriptorSetSampler *set ); + void _setTextures( uint32 slotStart, const DescriptorSetTexture *set, + uint32 hazardousTexIdx ) override; + void _setTextures( uint32 slotStart, const DescriptorSetTexture2 *set ) override; + void _setSamplers( uint32 slotStart, const DescriptorSetSampler *set ) override; + void _setTexturesCS( uint32 slotStart, const DescriptorSetTexture *set ) override; + void _setTexturesCS( uint32 slotStart, const DescriptorSetTexture2 *set ) override; + void _setSamplersCS( uint32 slotStart, const DescriptorSetSampler *set ) override; protected: - virtual void setBufferUavCS( uint32 slot, const DescriptorSetUav::BufferSlot &bufferSlot ); - virtual void setTextureUavCS( uint32 slot, const DescriptorSetUav::TextureSlot &texSlot, - GLuint srvView ); + void setBufferUavCS( uint32 slot, const DescriptorSetUav::BufferSlot &bufferSlot ); + void setTextureUavCS( uint32 slot, const DescriptorSetUav::TextureSlot &texSlot, + GLuint srvView ); + public: - virtual void _setUavCS( uint32 slotStart, const DescriptorSetUav *set ); + void _setUavCS( uint32 slotStart, const DescriptorSetUav *set ) override; /** See RenderSystem */ void _setTextureCoordCalculation(size_t stage, TexCoordCalcMethod m, - const Frustum* frustum = 0) { }; // Not supported + const Frustum* frustum = 0) override { } // Not supported /** See RenderSystem */ - void _setTextureBlendMode(size_t stage, const LayerBlendModeEx& bm) { }; // Not supported + void _setTextureBlendMode(size_t stage, const LayerBlendModeEx& bm) override { } // Not supported /** See RenderSystem */ - void _setTextureMatrix(size_t stage, const Matrix4& xform) { }; // Not supported + void _setTextureMatrix(size_t stage, const Matrix4& xform) override { }; // Not supported void flushUAVs(); - virtual void executeResourceTransition( const ResourceTransitionArray &rstCollection ); - - virtual void _hlmsPipelineStateObjectCreated( HlmsPso *newPso ); - virtual void _hlmsPipelineStateObjectDestroyed( HlmsPso *pso ); - virtual void _hlmsMacroblockCreated( HlmsMacroblock *newBlock ); - virtual void _hlmsMacroblockDestroyed( HlmsMacroblock *block ); - virtual void _hlmsBlendblockCreated( HlmsBlendblock *newBlock ); - virtual void _hlmsBlendblockDestroyed( HlmsBlendblock *block ); - virtual void _hlmsSamplerblockCreated( HlmsSamplerblock *newBlock ); - virtual void _hlmsSamplerblockDestroyed( HlmsSamplerblock *block ); - virtual void _descriptorSetTexture2Created( DescriptorSetTexture2 *newSet ); - virtual void _descriptorSetTexture2Destroyed( DescriptorSetTexture2 *set ); - virtual void _descriptorSetUavCreated( DescriptorSetUav *newSet ); - virtual void _descriptorSetUavDestroyed( DescriptorSetUav *set ); + void executeResourceTransition( const ResourceTransitionArray &rstCollection ) override; + + void _hlmsPipelineStateObjectCreated( HlmsPso *newPso ) override; + void _hlmsPipelineStateObjectDestroyed( HlmsPso *pso ) override; + void _hlmsMacroblockCreated( HlmsMacroblock *newBlock ) override; + void _hlmsMacroblockDestroyed( HlmsMacroblock *block ) override; + void _hlmsBlendblockCreated( HlmsBlendblock *newBlock ) override; + void _hlmsBlendblockDestroyed( HlmsBlendblock *block ) override; + void _hlmsSamplerblockCreated( HlmsSamplerblock *newBlock ) override; + void _hlmsSamplerblockDestroyed( HlmsSamplerblock *block ) override; + void _descriptorSetTexture2Created( DescriptorSetTexture2 *newSet ) override; + void _descriptorSetTexture2Destroyed( DescriptorSetTexture2 *set ) override; + void _descriptorSetUavCreated( DescriptorSetUav *newSet ) override; + void _descriptorSetUavDestroyed( DescriptorSetUav *set ) override; void _setHlmsMacroblock( const HlmsMacroblock *macroblock, const GL3PlusHlmsPso *pso ); void _setHlmsBlendblock( const HlmsBlendblock *blendblock, const GL3PlusHlmsPso *pso ); - virtual void _setHlmsSamplerblock( uint8 texUnit, const HlmsSamplerblock *samplerblock ); - virtual void _setPipelineStateObject( const HlmsPso *pso ); + void _setHlmsSamplerblock( uint8 texUnit, const HlmsSamplerblock *samplerblock ) override; + void _setPipelineStateObject( const HlmsPso *pso ) override; - virtual void _setIndirectBuffer( IndirectBufferPacked *indirectBuffer ); + void _setIndirectBuffer( IndirectBufferPacked *indirectBuffer ) override; - virtual void _hlmsComputePipelineStateObjectCreated( HlmsComputePso *newPso ); - virtual void _hlmsComputePipelineStateObjectDestroyed( HlmsComputePso *newPso ); - virtual void _setComputePso( const HlmsComputePso *pso ); + void _hlmsComputePipelineStateObjectCreated( HlmsComputePso *newPso ) override; + void _hlmsComputePipelineStateObjectDestroyed( HlmsComputePso *newPso ) override; + void _setComputePso( const HlmsComputePso *pso ) override; /** See RenderSystem */ - void _beginFrame(); + void _beginFrame() override; /** See RenderSystem */ - void _endFrame(); + void _endFrame() override; /** See RenderSystem */ void _setDepthBias(float constantBias, float slopeScaleBias); - virtual void _makeRsProjectionMatrix( const Matrix4& matrix, + void _makeRsProjectionMatrix( const Matrix4& matrix, Matrix4& dest, Real nearPlane, - Real farPlane, ProjectionType projectionType ); + Real farPlane, ProjectionType projectionType ) override; /** See RenderSystem */ - virtual void _convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest); - virtual void _convertOpenVrProjectionMatrix(const Matrix4& matrix, Matrix4& dest); - virtual Real getRSDepthRange() const; + void _convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest) override; + void _convertOpenVrProjectionMatrix(const Matrix4& matrix, Matrix4& dest) override; + Real getRSDepthRange() const override; /** See RenderSystem */ @@ -424,42 +427,42 @@ namespace Ogre { /** See RenderSystem. */ - virtual void setStencilBufferParams( uint32 refValue, const StencilParams &stencilParams ); + void setStencilBufferParams( uint32 refValue, const StencilParams &stencilParams ) override; /** See RenderSystem */ - void _render(const v1::RenderOperation& op); - - virtual void _dispatch( const HlmsComputePso &pso ); - - virtual void _setVertexArrayObject( const VertexArrayObject *vao ); - virtual void _render( const CbDrawCallIndexed *cmd ); - virtual void _render( const CbDrawCallStrip *cmd ); - virtual void _renderEmulated( const CbDrawCallIndexed *cmd ); - virtual void _renderEmulated( const CbDrawCallStrip *cmd ); - virtual void _renderEmulatedNoBaseInstance( const CbDrawCallIndexed *cmd ); - virtual void _renderEmulatedNoBaseInstance( const CbDrawCallStrip *cmd ); - - virtual void _startLegacyV1Rendering(); - virtual void _setRenderOperation( const v1::CbRenderOp *cmd ); - virtual void _render( const v1::CbDrawCallIndexed *cmd ); - virtual void _render( const v1::CbDrawCallStrip *cmd ); - virtual void _renderNoBaseInstance( const v1::CbDrawCallIndexed *cmd ); - virtual void _renderNoBaseInstance( const v1::CbDrawCallStrip *cmd ); - - virtual void clearFrameBuffer( RenderPassDescriptor *renderPassDesc, - TextureGpu *anyTarget, uint8 mipLevel ); - HardwareOcclusionQuery* createHardwareOcclusionQuery(); - Real getHorizontalTexelOffset() { return 0.0; } // No offset in GL - Real getVerticalTexelOffset() { return 0.0; } // No offset in GL - Real getMinimumDepthInputValue(); - Real getMaximumDepthInputValue(); + void _render(const v1::RenderOperation& op) override; + + void _dispatch( const HlmsComputePso &pso ) override; + + void _setVertexArrayObject( const VertexArrayObject *vao ) override; + void _render( const CbDrawCallIndexed *cmd ) override; + void _render( const CbDrawCallStrip *cmd ) override; + void _renderEmulated( const CbDrawCallIndexed *cmd ) override; + void _renderEmulated( const CbDrawCallStrip *cmd ) override; + void _renderEmulatedNoBaseInstance( const CbDrawCallIndexed *cmd ) override; + void _renderEmulatedNoBaseInstance( const CbDrawCallStrip *cmd ) override; + + void _startLegacyV1Rendering() override; + void _setRenderOperation( const v1::CbRenderOp *cmd ) override; + void _render( const v1::CbDrawCallIndexed *cmd ) override; + void _render( const v1::CbDrawCallStrip *cmd ) override; + void _renderNoBaseInstance( const v1::CbDrawCallIndexed *cmd ) override; + void _renderNoBaseInstance( const v1::CbDrawCallStrip *cmd ) override; + + void clearFrameBuffer( RenderPassDescriptor *renderPassDesc, + TextureGpu *anyTarget, uint8 mipLevel ) override; + HardwareOcclusionQuery* createHardwareOcclusionQuery() override; + Real getHorizontalTexelOffset() override { return 0.0; } // No offset in GL + Real getVerticalTexelOffset() override { return 0.0; } // No offset in GL + Real getMinimumDepthInputValue() override; + Real getMaximumDepthInputValue() override; OGRE_MUTEX(mThreadInitMutex); - void registerThread(); - void unregisterThread(); - void preExtraThreadsStarted(); - void postExtraThreadsStarted(); - void setClipPlanesImpl(const Ogre::PlaneList& planeList); + void registerThread() override; + void unregisterThread() override; + void preExtraThreadsStarted() override; + void postExtraThreadsStarted() override; + void setClipPlanesImpl(const Ogre::PlaneList& planeList) override; // ---------------------------------- // GL3PlusRenderSystem specific members @@ -493,37 +496,37 @@ namespace Ogre { const GL3PlusSupport* getGLSupport() const { return mGLSupport; } - void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 mask); - void bindGpuProgramPassIterationParameters(GpuProgramType gptype); + void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 mask) override; + void bindGpuProgramPassIterationParameters(GpuProgramType gptype) override; /// @copydoc RenderSystem::_setSceneBlending void _setSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendOperation op ); /// @copydoc RenderSystem::_setSeparateSceneBlending void _setSeparateSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha, SceneBlendOperation op, SceneBlendOperation alphaOp ); /// @copydoc RenderSystem::getDisplayMonitorCount - unsigned int getDisplayMonitorCount() const; + unsigned int getDisplayMonitorCount() const override; void _setSceneBlendingOperation(SceneBlendOperation op); void _setSeparateSceneBlendingOperation(SceneBlendOperation op, SceneBlendOperation alphaOp); /// @copydoc RenderSystem::hasAnisotropicMipMapFilter - virtual bool hasAnisotropicMipMapFilter() const { return false; } + bool hasAnisotropicMipMapFilter() const override { return false; } /// @copydoc RenderSystem::beginProfileEvent - virtual void beginProfileEvent( const String &eventName ); + void beginProfileEvent( const String &eventName ) override; /// @copydoc RenderSystem::endProfileEvent - virtual void endProfileEvent(); + void endProfileEvent() override; /// @copydoc RenderSystem::markProfileEvent - virtual void markProfileEvent( const String &eventName ); + void markProfileEvent( const String &eventName ) override; - virtual void debugAnnotationPush( const String &event ); - virtual void debugAnnotationPop(); + void debugAnnotationPush( const String &event ) override; + void debugAnnotationPop() override; - virtual void initGPUProfiling(); - virtual void deinitGPUProfiling(); - virtual void beginGPUSampleProfile( const String &name, uint32 *hashCache ); - virtual void endGPUSampleProfile( const String &name ); + void initGPUProfiling() override; + void deinitGPUProfiling() override; + void beginGPUSampleProfile( const String &name, uint32 *hashCache ) override; + void endGPUSampleProfile( const String &name ) override; }; } diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusStagingTexture.h b/RenderSystems/GL3Plus/include/OgreGL3PlusStagingTexture.h index fa7f9cb364a..7181a7605df 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusStagingTexture.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusStagingTexture.h @@ -38,15 +38,15 @@ THE SOFTWARE. namespace Ogre { - class _OgreGL3PlusExport GL3PlusStagingTexture : public StagingTextureBufferImpl + class _OgreGL3PlusExport GL3PlusStagingTexture final : public StagingTextureBufferImpl { GL3PlusDynamicBuffer *mDynamicBuffer; size_t mUnmapTicket; void *mMappedPtr; void *mLastMappedPtr; - virtual bool belongsToUs( const TextureBox &box ); - virtual void* RESTRICT_ALIAS_RETURN mapRegionImplRawPtr(); + bool belongsToUs( const TextureBox &box ) override; + void* RESTRICT_ALIAS_RETURN mapRegionImplRawPtr() override; void uploadCubemap( const TextureBox &srcBox, PixelFormatGpu pixelFormat, uint8 mipLevel, GLenum format, GLenum type, @@ -57,16 +57,16 @@ namespace Ogre GL3PlusStagingTexture( VaoManager *vaoManager, PixelFormatGpu formatFamily, size_t size, size_t internalBufferStart, size_t vboPoolIdx, GL3PlusDynamicBuffer *dynamicBuffer ); - virtual ~GL3PlusStagingTexture(); + ~GL3PlusStagingTexture() override; void _unmapBuffer(); - virtual void startMapRegion(); - virtual void stopMapRegion(); + void startMapRegion() override; + void stopMapRegion() override; - virtual void upload( const TextureBox &srcBox, TextureGpu *dstTexture, - uint8 mipLevel, const TextureBox *cpuSrcBox=0, - const TextureBox *dstBox=0, bool skipSysRamCopy=false ); + void upload( const TextureBox &srcBox, TextureGpu *dstTexture, uint8 mipLevel, + const TextureBox *cpuSrcBox = 0, const TextureBox *dstBox = 0, + bool skipSysRamCopy = false ) override; GL3PlusDynamicBuffer* _getDynamicBuffer() { return mDynamicBuffer; } void _resetDynamicBuffer() { mDynamicBuffer = 0; } diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h index 054ca9b20ee..03574680477 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpu.h @@ -65,8 +65,8 @@ namespace Ogre /// This value is always an FBO. GLuint mMsaaFramebufferName; - virtual void createInternalResourcesImpl(); - virtual void destroyInternalResourcesImpl(); + void createInternalResourcesImpl() override; + void destroyInternalResourcesImpl() override; bool isRenderbuffer() const; @@ -81,29 +81,28 @@ namespace Ogre public: GL3PlusTextureGpu( GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, VaoManager *vaoManager, IdString name, uint32 textureFlags, - TextureTypes::TextureTypes initialType, - TextureGpuManager *textureManager ); - virtual ~GL3PlusTextureGpu(); + TextureTypes::TextureTypes initialType, TextureGpuManager *textureManager ); + ~GL3PlusTextureGpu() override; - virtual void setTextureType( TextureTypes::TextureTypes textureType ); + void setTextureType( TextureTypes::TextureTypes textureType ) override; - virtual void copyTo( + void copyTo( TextureGpu *dst, const TextureBox &dstBox, uint8 dstMipLevel, const TextureBox &srcBox, uint8 srcMipLevel, bool keepResolvedTexSynced = true, CopyEncTransitionMode::CopyEncTransitionMode srcTransitionMode = CopyEncTransitionMode::Auto, CopyEncTransitionMode::CopyEncTransitionMode dstTransitionMode = - CopyEncTransitionMode::Auto ); + CopyEncTransitionMode::Auto ) override; - virtual void _autogenerateMipmaps( - CopyEncTransitionMode::CopyEncTransitionMode transitionMode = CopyEncTransitionMode::Auto ); + void _autogenerateMipmaps( CopyEncTransitionMode::CopyEncTransitionMode transitionMode = + CopyEncTransitionMode::Auto ) override; - virtual void getSubsampleLocations( vector::type locations ); + void getSubsampleLocations( vector::type locations ) override; - virtual void notifyDataIsReady(); - virtual bool _isDataReadyImpl() const; + void notifyDataIsReady() override; + bool _isDataReadyImpl() const override; - virtual void _setToDisplayDummyTexture(); - virtual void _notifyTextureSlotChanged( const TexturePool *newPool, uint16 slice ); + void _setToDisplayDummyTexture() override; + void _notifyTextureSlotChanged( const TexturePool *newPool, uint16 slice ) override; /// Returns the GLuid of the texture that is being displayed. While the texture is /// being loaded (i.e. data is not ready), we will display a dummy white texture. @@ -133,7 +132,7 @@ namespace Ogre /// Returns GL_TEXTURE_2D / GL_TEXTURE_2D_ARRAY / etc GLenum getGlTextureTarget() const { return mGlTextureTarget; } - void getCustomAttribute( IdString name, void *pData ); + void getCustomAttribute( IdString name, void *pData ) override; }; class _OgreGL3PlusExport GL3PlusTextureGpuRenderTarget : public GL3PlusTextureGpu @@ -145,25 +144,25 @@ namespace Ogre #if OGRE_NO_VIEWPORT_ORIENTATIONMODE == 0 OrientationMode mOrientationMode; #endif - virtual void createInternalResourcesImpl(); - virtual void destroyInternalResourcesImpl(); + void createInternalResourcesImpl() override; + void destroyInternalResourcesImpl() override; public: GL3PlusTextureGpuRenderTarget( GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, VaoManager *vaoManager, IdString name, uint32 textureFlags, TextureTypes::TextureTypes initialType, TextureGpuManager *textureManager ); - virtual ~GL3PlusTextureGpuRenderTarget(); + ~GL3PlusTextureGpuRenderTarget() override; - virtual void _setDepthBufferDefaults( uint16 depthBufferPoolId, bool preferDepthTexture, - PixelFormatGpu desiredDepthBufferFormat ); - virtual uint16 getDepthBufferPoolId() const; - virtual bool getPreferDepthTexture() const; - virtual PixelFormatGpu getDesiredDepthBufferFormat() const; + void _setDepthBufferDefaults( uint16 depthBufferPoolId, bool preferDepthTexture, + PixelFormatGpu desiredDepthBufferFormat ) override; + uint16 getDepthBufferPoolId() const override; + bool getPreferDepthTexture() const override; + PixelFormatGpu getDesiredDepthBufferFormat() const override; - virtual void setOrientationMode( OrientationMode orientationMode ); + void setOrientationMode( OrientationMode orientationMode ) override; #if OGRE_NO_VIEWPORT_ORIENTATIONMODE == 0 - virtual OrientationMode getOrientationMode() const; + OrientationMode getOrientationMode() const override; #endif }; } diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuManager.h b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuManager.h index 12ae4752c52..a00cbf695b4 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuManager.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuManager.h @@ -39,53 +39,53 @@ THE SOFTWARE. namespace Ogre { /** \addtogroup Core - * @{ - */ + * @{ + */ /** \addtogroup Resources - * @{ - */ - class _OgreGL3PlusExport GL3PlusTextureGpuManager : public TextureGpuManager + * @{ + */ + class _OgreGL3PlusExport GL3PlusTextureGpuManager final : public TextureGpuManager { protected: /// 4x4 texture for when we have nothing to display. - GLuint mBlankTexture[TextureTypes::Type3D + 1u]; - GLuint mTmpFbo[2]; + GLuint mBlankTexture[TextureTypes::Type3D + 1u]; + GLuint mTmpFbo[2]; const GL3PlusSupport &mSupport; - virtual TextureGpu* createTextureImpl( GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, - IdString name, uint32 textureFlags, - TextureTypes::TextureTypes initialType ); - virtual StagingTexture* createStagingTextureImpl( uint32 width, uint32 height, uint32 depth, - uint32 slices, PixelFormatGpu pixelFormat ); - virtual void destroyStagingTextureImpl( StagingTexture *stagingTexture ); + TextureGpu *createTextureImpl( GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, + IdString name, uint32 textureFlags, + TextureTypes::TextureTypes initialType ) override; + StagingTexture *createStagingTextureImpl( uint32 width, uint32 height, uint32 depth, + uint32 slices, PixelFormatGpu pixelFormat ) override; + void destroyStagingTextureImpl( StagingTexture *stagingTexture ) override; - virtual AsyncTextureTicket* createAsyncTextureTicketImpl (uint32 width, uint32 height, - uint32 depthOrSlices, - TextureTypes::TextureTypes textureType, - PixelFormatGpu pixelFormatFamily ); + AsyncTextureTicket *createAsyncTextureTicketImpl( uint32 width, uint32 height, + uint32 depthOrSlices, + TextureTypes::TextureTypes textureType, + PixelFormatGpu pixelFormatFamily ) override; public: GL3PlusTextureGpuManager( VaoManager *vaoManager, RenderSystem *renderSystem, const GL3PlusSupport &support ); - virtual ~GL3PlusTextureGpuManager(); + ~GL3PlusTextureGpuManager() override; /** Creates a special GL3PlusTextureGpuWindow pointer, to be used by Ogre::Window. The pointer can be freed by a regular OGRE_DELETE. We do not track this pointer. If caller doesnt' delete it, it will leak. */ - TextureGpu* createTextureGpuWindow( GL3PlusContext *context, Window *window ); + TextureGpu *createTextureGpuWindow( GL3PlusContext *context, Window *window ); /// See EglPBufferWindow. We do not track this pointer. /// If caller doesnt' delete it, it will leak. - TextureGpu* createTextureGpuHeadlessWindow( GL3PlusContext *context, Window *window ); + TextureGpu *createTextureGpuHeadlessWindow( GL3PlusContext *context, Window *window ); GLuint getBlankTextureGlName( TextureTypes::TextureTypes textureType ) const; /// fboIdx must be in range [0; 1] - GLuint getTemporaryFbo( uint32 fboIdx ) const { return mTmpFbo[fboIdx]; } + GLuint getTemporaryFbo( uint32 fboIdx ) const { return mTmpFbo[fboIdx]; } - const GL3PlusSupport& getGlSupport() const { return mSupport; } + const GL3PlusSupport &getGlSupport() const { return mSupport; } #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE virtual bool checkSupport( PixelFormatGpu format, TextureTypes::TextureTypes textureType, @@ -95,7 +95,7 @@ namespace Ogre /** @} */ /** @} */ -} +} // namespace Ogre #include "OgreHeaderSuffix.h" diff --git a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuWindow.h b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuWindow.h index f6284921b21..9281aaa6468 100644 --- a/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuWindow.h +++ b/RenderSystems/GL3Plus/include/OgreGL3PlusTextureGpuWindow.h @@ -35,13 +35,13 @@ THE SOFTWARE. namespace Ogre { - class _OgreGL3PlusExport GL3PlusTextureGpuWindow : public GL3PlusTextureGpuRenderTarget + class _OgreGL3PlusExport GL3PlusTextureGpuWindow final : public GL3PlusTextureGpuRenderTarget { GL3PlusContext *mContext; Window *mWindow; - virtual void createInternalResourcesImpl(); - virtual void destroyInternalResourcesImpl(); + void createInternalResourcesImpl() override; + void destroyInternalResourcesImpl() override; public: GL3PlusTextureGpuWindow( GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, @@ -49,26 +49,26 @@ namespace Ogre TextureTypes::TextureTypes initialType, TextureGpuManager *textureManager, GL3PlusContext *context, Window *window ); - virtual ~GL3PlusTextureGpuWindow(); + ~GL3PlusTextureGpuWindow() override; - virtual void setTextureType( TextureTypes::TextureTypes textureType ); + void setTextureType( TextureTypes::TextureTypes textureType ) override; - virtual void getSubsampleLocations( vector::type locations ); + void getSubsampleLocations( vector::type locations ) override; - virtual void notifyDataIsReady(); - virtual bool _isDataReadyImpl() const; + void notifyDataIsReady() override; + bool _isDataReadyImpl() const override; - virtual void swapBuffers(); + void swapBuffers() override; - virtual void getCustomAttribute( IdString name, void *pData ); + void getCustomAttribute( IdString name, void *pData ) override; - virtual bool isOpenGLRenderWindow() const; + bool isOpenGLRenderWindow() const override; - virtual void _setToDisplayDummyTexture(); - virtual void _notifyTextureSlotChanged( const TexturePool *newPool, uint16 slice ); + void _setToDisplayDummyTexture() override; + void _notifyTextureSlotChanged( const TexturePool *newPool, uint16 slice ) override; }; - class _OgreGL3PlusExport GL3PlusTextureGpuHeadlessWindow : public GL3PlusTextureGpuRenderTarget + class _OgreGL3PlusExport GL3PlusTextureGpuHeadlessWindow final : public GL3PlusTextureGpuRenderTarget { GL3PlusContext *mContext; Window *mWindow; @@ -79,17 +79,17 @@ namespace Ogre TextureTypes::TextureTypes initialType, TextureGpuManager *textureManager, GL3PlusContext *context, Window *window ); - virtual ~GL3PlusTextureGpuHeadlessWindow(); + ~GL3PlusTextureGpuHeadlessWindow() override; - virtual void setTextureType( TextureTypes::TextureTypes textureType ); + void setTextureType( TextureTypes::TextureTypes textureType ) override; - virtual void swapBuffers(); + void swapBuffers() override; - virtual void getCustomAttribute( IdString name, void *pData ); + void getCustomAttribute( IdString name, void *pData ) override; - virtual bool isOpenGLRenderWindow() const; + bool isOpenGLRenderWindow() const override; - virtual void _notifyTextureSlotChanged( const TexturePool *newPool, uint16 slice ); + void _notifyTextureSlotChanged( const TexturePool *newPool, uint16 slice ) override; }; } diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusAsyncTicket.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusAsyncTicket.h index 33836554c3e..cb1f1d09de9 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusAsyncTicket.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusAsyncTicket.h @@ -40,14 +40,14 @@ namespace Ogre protected: GLsync mFenceName; - virtual const void* mapImpl(); + const void* mapImpl() override; public: GL3PlusAsyncTicket( BufferPacked *creator, StagingBuffer *stagingBuffer, size_t elementStart, size_t elementCount ); - virtual ~GL3PlusAsyncTicket(); + ~GL3PlusAsyncTicket() override; - virtual bool queryIsTransferDone(); + bool queryIsTransferDone() override; }; } diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusBufferInterface.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusBufferInterface.h index e8c19344692..3ee20733940 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusBufferInterface.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusBufferInterface.h @@ -62,7 +62,7 @@ namespace Ogre public: GL3PlusBufferInterface( size_t vboPoolIdx, GLuint vboName, GL3PlusDynamicBuffer *dynamicBuffer ); - ~GL3PlusBufferInterface(); + ~GL3PlusBufferInterface() override; size_t getVboPoolIndex() { return mVboPoolIdx; } GLuint getVboName() const { return mVboName; } @@ -72,16 +72,16 @@ namespace Ogre /// Only use this function for the first upload void _firstUpload( void *data, size_t elementStart, size_t elementCount ); - virtual void* RESTRICT_ALIAS_RETURN map( size_t elementStart, size_t elementCount, - MappingState prevMappingState, - bool advanceFrame = true ); - virtual void unmap( UnmapOptions unmapOption, - size_t flushStartElem = 0, size_t flushSizeElem = 0 ); - virtual void advanceFrame(); - virtual void regressFrame(); + void *RESTRICT_ALIAS_RETURN map( size_t elementStart, size_t elementCount, + MappingState prevMappingState, + bool advanceFrame = true ) override; + void unmap( UnmapOptions unmapOption, size_t flushStartElem = 0, + size_t flushSizeElem = 0 ) override; + void advanceFrame() override; + void regressFrame() override; - virtual void copyTo( BufferInterface *dstBuffer, size_t dstOffsetBytes, - size_t srcOffsetBytes, size_t sizeBytes ); + void copyTo( BufferInterface *dstBuffer, size_t dstOffsetBytes, size_t srcOffsetBytes, + size_t sizeBytes ) override; }; } diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusConstBufferPacked.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusConstBufferPacked.h index 28e3d29a429..51b65f06328 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusConstBufferPacked.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusConstBufferPacked.h @@ -34,7 +34,7 @@ THE SOFTWARE. namespace Ogre { - class _OgreGL3PlusExport GL3PlusConstBufferPacked : public ConstBufferPacked + class _OgreGL3PlusExport GL3PlusConstBufferPacked final : public ConstBufferPacked { inline void bindBuffer( uint16 slot ); @@ -43,14 +43,14 @@ namespace Ogre uint32 bytesPerElement, uint32 numElementsPadding, BufferType bufferType, void *initialData, bool keepAsShadow, VaoManager *vaoManager, BufferInterface *bufferInterface ); - virtual ~GL3PlusConstBufferPacked(); - - virtual void bindBufferVS( uint16 slot ); - virtual void bindBufferPS( uint16 slot ); - virtual void bindBufferGS( uint16 slot ); - virtual void bindBufferHS( uint16 slot ); - virtual void bindBufferDS( uint16 slot ); - virtual void bindBufferCS( uint16 slot ); + ~GL3PlusConstBufferPacked() override; + + void bindBufferVS( uint16 slot ) override; + void bindBufferPS( uint16 slot ) override; + void bindBufferGS( uint16 slot ) override; + void bindBufferHS( uint16 slot ) override; + void bindBufferDS( uint16 slot ) override; + void bindBufferCS( uint16 slot ) override; }; } diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusReadOnlyBufferPacked.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusReadOnlyBufferPacked.h index 0df71053e73..4f131dc2ca7 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusReadOnlyBufferPacked.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusReadOnlyBufferPacked.h @@ -37,7 +37,7 @@ namespace Ogre { class GL3PlusBufferInterface; - class _OgreGL3PlusExport GL3PlusReadOnlyTexBufferPacked : public ReadOnlyBufferPacked + class _OgreGL3PlusExport GL3PlusReadOnlyTexBufferPacked final : public ReadOnlyBufferPacked { GLuint mTexName; GLenum mInternalFormat; @@ -50,19 +50,19 @@ namespace Ogre BufferType bufferType, void *initialData, bool keepAsShadow, VaoManager *vaoManager, GL3PlusBufferInterface *bufferInterface, PixelFormatGpu pf ); - virtual ~GL3PlusReadOnlyTexBufferPacked(); + ~GL3PlusReadOnlyTexBufferPacked() override; - virtual void bindBufferVS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferPS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferGS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferDS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferHS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); + void bindBufferVS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferPS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferGS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferDS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferHS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; - virtual void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ); + void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ) override; }; - class _OgreGL3PlusExport GL3PlusReadOnlyUavBufferPacked : public ReadOnlyBufferPacked + class _OgreGL3PlusExport GL3PlusReadOnlyUavBufferPacked final : public ReadOnlyBufferPacked { inline void bindBuffer( uint16 slot, size_t offset, size_t sizeBytes ); @@ -72,19 +72,19 @@ namespace Ogre BufferType bufferType, void *initialData, bool keepAsShadow, VaoManager *vaoManager, GL3PlusBufferInterface *bufferInterface, PixelFormatGpu pf ); - virtual ~GL3PlusReadOnlyUavBufferPacked(); + ~GL3PlusReadOnlyUavBufferPacked() override; - virtual void bindBufferVS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferPS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferGS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferDS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferHS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); + void bindBufferVS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferPS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferGS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferDS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferHS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; - virtual void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ); + void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ) override; }; - class _OgreGL3PlusExport GL3PlusReadOnlyBufferEmulatedPacked : public ReadOnlyBufferPacked + class _OgreGL3PlusExport GL3PlusReadOnlyBufferEmulatedPacked final : public ReadOnlyBufferPacked { GLuint mTexName; GLenum mInternalFormat; @@ -105,16 +105,16 @@ namespace Ogre VaoManager *vaoManager, GL3PlusBufferInterface *bufferInterface, PixelFormatGpu pf ); - virtual ~GL3PlusReadOnlyBufferEmulatedPacked(); + ~GL3PlusReadOnlyBufferEmulatedPacked() override; - virtual void bindBufferVS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferPS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferGS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferDS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferHS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); - virtual void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ); + void bindBufferVS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferPS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferGS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferDS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferHS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; + void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; - virtual void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ); + void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ) override; }; } // namespace Ogre diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusStagingBuffer.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusStagingBuffer.h index 84f0f89fa71..dbd1374d606 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusStagingBuffer.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusStagingBuffer.h @@ -102,21 +102,21 @@ namespace Ogre /// May modify mMappingStart. void waitIfNeeded(); - virtual void* mapImpl( size_t sizeBytes ); - virtual void unmapImpl( const Destination *destinations, size_t numDestinations ); + void* mapImpl( size_t sizeBytes ) override; + void unmapImpl( const Destination *destinations, size_t numDestinations ) override; - virtual const void* _mapForReadImpl( size_t offset, size_t sizeBytes ); + const void* _mapForReadImpl( size_t offset, size_t sizeBytes ) override; public: GL3PlusStagingBuffer( size_t internalBufferStart, size_t sizeBytes, VaoManager *vaoManager, bool uploadOnly, GLuint vboName ); - virtual ~GL3PlusStagingBuffer(); + ~GL3PlusStagingBuffer() override; - virtual StagingStallType uploadWillStall( size_t sizeBytes ); + StagingStallType uploadWillStall( size_t sizeBytes ) override; void cleanUnfencedHazards(); - virtual size_t _asyncDownload( BufferPacked *source, size_t srcOffset, size_t srcLength ); + size_t _asyncDownload( BufferPacked *source, size_t srcOffset, size_t srcLength ) override; GLuint getBufferName() const { return mVboName; } }; diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferEmulatedPacked.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferEmulatedPacked.h index 7617af86073..b8138ce5d8a 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferEmulatedPacked.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferEmulatedPacked.h @@ -36,7 +36,7 @@ namespace Ogre { class GL3PlusBufferInterface; - class _OgreGL3PlusExport GL3PlusTexBufferEmulatedPacked : public TexBufferPacked + class _OgreGL3PlusExport GL3PlusTexBufferEmulatedPacked final : public TexBufferPacked { GLuint mTexName; GLenum mInternalFormat; @@ -57,16 +57,16 @@ namespace Ogre void *initialData, bool keepAsShadow, VaoManager *vaoManager, GL3PlusBufferInterface *bufferInterface, PixelFormatGpu pf ); - virtual ~GL3PlusTexBufferEmulatedPacked(); + ~GL3PlusTexBufferEmulatedPacked() override; - virtual void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ); + void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ) override; - virtual void bindBufferVS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferPS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferGS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferDS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferHS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferCS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); + void bindBufferVS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferPS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferGS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferDS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferHS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferCS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; }; } diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferPacked.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferPacked.h index 2f7694f509b..cce3ebf2742 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferPacked.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusTexBufferPacked.h @@ -36,7 +36,7 @@ namespace Ogre { class GL3PlusBufferInterface; - class _OgreGL3PlusExport GL3PlusTexBufferPacked : public TexBufferPacked + class _OgreGL3PlusExport GL3PlusTexBufferPacked final : public TexBufferPacked { GLuint mTexName; GLenum mInternalFormat; @@ -49,16 +49,16 @@ namespace Ogre void *initialData, bool keepAsShadow, VaoManager *vaoManager, GL3PlusBufferInterface *bufferInterface, PixelFormatGpu pf ); - virtual ~GL3PlusTexBufferPacked(); + ~GL3PlusTexBufferPacked() override; - virtual void bindBufferVS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferPS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferGS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferDS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferHS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferCS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); + void bindBufferVS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferPS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferGS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferDS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferHS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferCS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; - virtual void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ); + void _bindBufferDirectly( uint16 slot, size_t offset, size_t sizeBytes ) override; }; } diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusUavBufferPacked.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusUavBufferPacked.h index db69f41c358..f8e2df5c04c 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusUavBufferPacked.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusUavBufferPacked.h @@ -36,10 +36,10 @@ namespace Ogre { class GL3PlusBufferInterface; - class _OgreGL3PlusExport GL3PlusUavBufferPacked : public UavBufferPacked + class _OgreGL3PlusExport GL3PlusUavBufferPacked final : public UavBufferPacked { - virtual TexBufferPacked* getAsTexBufferImpl( PixelFormatGpu pixelFormat ); - virtual ReadOnlyBufferPacked *getAsReadOnlyBufferImpl(); + TexBufferPacked *getAsTexBufferImpl( PixelFormatGpu pixelFormat ) override; + ReadOnlyBufferPacked *getAsReadOnlyBufferImpl() override; inline void bindBuffer( uint16 slot, size_t offset, size_t sizeBytes ); @@ -47,15 +47,15 @@ namespace Ogre GL3PlusUavBufferPacked( size_t internalBufStartBytes, size_t numElements, uint32 bytesPerElement, uint32 bindFlags, void *initialData, bool keepAsShadow, VaoManager *vaoManager, GL3PlusBufferInterface *bufferInterface ); - virtual ~GL3PlusUavBufferPacked(); - -// virtual void bindBufferVS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); -// virtual void bindBufferPS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); -// virtual void bindBufferGS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); -// virtual void bindBufferDS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); -// virtual void bindBufferHS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); - virtual void bindBufferCS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ); + ~GL3PlusUavBufferPacked() override; + + // void bindBufferVS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + // void bindBufferPS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + // void bindBufferGS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + // void bindBufferDS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + // void bindBufferHS( uint16 slot, size_t offset=0, size_t sizeBytes=0 ) override; + void bindBufferCS( uint16 slot, size_t offset = 0, size_t sizeBytes = 0 ) override; }; -} +} // namespace Ogre #endif diff --git a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusVaoManager.h b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusVaoManager.h index 275ac24ba2c..1a806af5b21 100644 --- a/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusVaoManager.h +++ b/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusVaoManager.h @@ -191,59 +191,56 @@ namespace Ogre BlockVec &blocks ); protected: - virtual VertexBufferPacked* createVertexBufferImpl( size_t numElements, - uint32 bytesPerElement, - BufferType bufferType, - void *initialData, bool keepAsShadow, - const VertexElement2Vec &vertexElements ); + VertexBufferPacked *createVertexBufferImpl( size_t numElements, uint32 bytesPerElement, + BufferType bufferType, void *initialData, + bool keepAsShadow, + const VertexElement2Vec &vertexElements ) override; - virtual void destroyVertexBufferImpl( VertexBufferPacked *vertexBuffer ); + void destroyVertexBufferImpl( VertexBufferPacked *vertexBuffer ) override; #ifdef _OGRE_MULTISOURCE_VBO - virtual MultiSourceVertexBufferPool* createMultiSourceVertexBufferPoolImpl( + MultiSourceVertexBufferPool* createMultiSourceVertexBufferPoolImpl( const VertexElement2VecVec &vertexElementsBySource, size_t maxNumVertices, size_t totalBytesPerVertex, - BufferType bufferType ); + BufferType bufferType ) override; #endif - virtual IndexBufferPacked* createIndexBufferImpl( size_t numElements, - uint32 bytesPerElement, - BufferType bufferType, - void *initialData, bool keepAsShadow ); + IndexBufferPacked *createIndexBufferImpl( size_t numElements, uint32 bytesPerElement, + BufferType bufferType, void *initialData, + bool keepAsShadow ) override; - virtual void destroyIndexBufferImpl( IndexBufferPacked *indexBuffer ); + void destroyIndexBufferImpl( IndexBufferPacked *indexBuffer ) override; - virtual ConstBufferPacked* createConstBufferImpl( size_t sizeBytes, BufferType bufferType, - void *initialData, bool keepAsShadow ); - virtual void destroyConstBufferImpl( ConstBufferPacked *constBuffer ); + ConstBufferPacked *createConstBufferImpl( size_t sizeBytes, BufferType bufferType, + void *initialData, bool keepAsShadow ) override; + void destroyConstBufferImpl( ConstBufferPacked *constBuffer ) override; - virtual TexBufferPacked* createTexBufferImpl( PixelFormatGpu pixelFormat, size_t sizeBytes, - BufferType bufferType, - void *initialData, bool keepAsShadow ); - virtual void destroyTexBufferImpl( TexBufferPacked *texBuffer ); + TexBufferPacked *createTexBufferImpl( PixelFormatGpu pixelFormat, size_t sizeBytes, + BufferType bufferType, void *initialData, + bool keepAsShadow ) override; + void destroyTexBufferImpl( TexBufferPacked *texBuffer ) override; - virtual ReadOnlyBufferPacked *createReadOnlyBufferImpl( PixelFormatGpu pixelFormat, - size_t sizeBytes, BufferType bufferType, - void *initialData, bool keepAsShadow ); - virtual void destroyReadOnlyBufferImpl( ReadOnlyBufferPacked *readOnlyBuffer ); + ReadOnlyBufferPacked *createReadOnlyBufferImpl( PixelFormatGpu pixelFormat, size_t sizeBytes, + BufferType bufferType, void *initialData, + bool keepAsShadow ) override; + void destroyReadOnlyBufferImpl( ReadOnlyBufferPacked *readOnlyBuffer ) override; - virtual UavBufferPacked* createUavBufferImpl( size_t numElements, uint32 bytesPerElement, - uint32 bindFlags, - void *initialData, bool keepAsShadow ); - virtual void destroyUavBufferImpl( UavBufferPacked *uavBuffer ); + UavBufferPacked *createUavBufferImpl( size_t numElements, uint32 bytesPerElement, + uint32 bindFlags, void *initialData, + bool keepAsShadow ) override; + void destroyUavBufferImpl( UavBufferPacked *uavBuffer ) override; - virtual IndirectBufferPacked* createIndirectBufferImpl( size_t sizeBytes, BufferType bufferType, - void *initialData, bool keepAsShadow ); - virtual void destroyIndirectBufferImpl( IndirectBufferPacked *indirectBuffer ); + IndirectBufferPacked *createIndirectBufferImpl( size_t sizeBytes, BufferType bufferType, + void *initialData, bool keepAsShadow ) override; + void destroyIndirectBufferImpl( IndirectBufferPacked *indirectBuffer ) override; GLuint createVao( const Vao &vaoRef ); - virtual VertexArrayObject* createVertexArrayObjectImpl( - const VertexBufferPackedVec &vertexBuffers, + VertexArrayObject *createVertexArrayObjectImpl( const VertexBufferPackedVec &vertexBuffers, IndexBufferPacked *indexBuffer, - OperationType opType ); + OperationType opType ) override; - virtual void destroyVertexArrayObjectImpl( VertexArrayObject *vao ); + void destroyVertexArrayObjectImpl( VertexArrayObject *vao ) override; static VboFlag bufferTypeToVboFlag( BufferType bufferType ); @@ -251,20 +248,20 @@ namespace Ogre size_t poolCapacity, LwString &text, MemoryStatsEntryVec &outStats, Log *log ) const; - virtual void switchVboPoolIndexImpl( unsigned internalVboBufferType, size_t oldPoolIdx, - size_t newPoolIdx, BufferPacked *buffer ); + void switchVboPoolIndexImpl( unsigned internalVboBufferType, size_t oldPoolIdx, + size_t newPoolIdx, BufferPacked *buffer ) override; public: GL3PlusVaoManager( bool supportsArbBufferStorage, bool emulateTexBuffers, bool supportsIndirectBuffers, bool _supportsBaseInstance, bool supportsSsbo, const NameValuePairList *params ); - virtual ~GL3PlusVaoManager(); + ~GL3PlusVaoManager() override; - virtual void getMemoryStats( MemoryStatsEntryVec &outStats, size_t &outCapacityBytes, - size_t &outFreeBytes, Log *log, bool &outIncludesTextures ) const; + void getMemoryStats( MemoryStatsEntryVec &outStats, size_t &outCapacityBytes, + size_t &outFreeBytes, Log *log, bool &outIncludesTextures ) const override; - virtual void cleanupEmptyPools(); + void cleanupEmptyPools() override; /// Binds the Draw ID to the currently bound vertex array object. void bindDrawId(); @@ -277,10 +274,10 @@ namespace Ogre The returned buffer starts with a reference count of 1. You should decrease it when you're done using it. */ - virtual StagingBuffer* createStagingBuffer( size_t sizeBytes, bool forUpload ); + StagingBuffer *createStagingBuffer( size_t sizeBytes, bool forUpload ) override; - virtual AsyncTicketPtr createAsyncTicket( BufferPacked *creator, StagingBuffer *stagingBuffer, - size_t elementStart, size_t elementCount ); + AsyncTicketPtr createAsyncTicket( BufferPacked *creator, StagingBuffer *stagingBuffer, + size_t elementStart, size_t elementCount ) override; /// See GL3PlusTextureGpuManager::createStagingTextureImpl. TextureManager delegates /// to the VaoManager because behind the scenes, in GL StagingTextures are just a @@ -293,16 +290,16 @@ namespace Ogre /// (i.e. no hazards). void destroyStagingTexture( GL3PlusStagingTexture *stagingTexture ); - virtual void _update(); + void _update() override; /// See VaoManager::waitForTailFrameToFinish - virtual uint8 waitForTailFrameToFinish(); + uint8 waitForTailFrameToFinish() override; /// See VaoManager::waitForSpecificFrameToFinish - virtual void waitForSpecificFrameToFinish( uint32 frameCount ); + void waitForSpecificFrameToFinish( uint32 frameCount ) override; /// See VaoManager::isFrameFinished - virtual bool isFrameFinished( uint32 frameCount ); + bool isFrameFinished( uint32 frameCount ) override; /** Will stall undefinitely until GPU finishes (signals the sync object). @param fenceName diff --git a/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXContext.h b/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXContext.h index 5f7deea8def..f62862add0b 100644 --- a/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXContext.h +++ b/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXContext.h @@ -31,34 +31,35 @@ THE SOFTWARE. #include "OgreGL3PlusContext.h" #include "OgreGLXGLSupport.h" -namespace Ogre { - - class _OgrePrivate GLXContext: public GL3PlusContext +namespace Ogre +{ + class _OgrePrivate GLXContext final : public GL3PlusContext { public: - GLXContext(GLXGLSupport* glsupport, ::GLXFBConfig fbconfig, ::GLXDrawable drawable, ::GLXContext context = 0); - - virtual ~GLXContext(); - + GLXContext( GLXGLSupport *glsupport, ::GLXFBConfig fbconfig, ::GLXDrawable drawable, + ::GLXContext context = 0 ); + + ~GLXContext() override; + /// @copydoc GL3PlusContext::setCurrent - virtual void setCurrent(); - + void setCurrent() override; + /// @copydoc GL3PlusContext::endCurrent - virtual void endCurrent(); - + void endCurrent() override; + /// @copydoc GL3PlusContext::clone - GL3PlusContext* clone() const; + GL3PlusContext *clone() const override; + + ::GLXFBConfig _getFbConfig() const { return mFBConfig; } + + ::GLXDrawable mDrawable; + ::GLXContext mContext; - ::GLXFBConfig _getFbConfig() const { return mFBConfig; } - - ::GLXDrawable mDrawable; - ::GLXContext mContext; - private: - ::GLXFBConfig mFBConfig; - GLXGLSupport* mGLSupport; + ::GLXFBConfig mFBConfig; + GLXGLSupport *mGLSupport; bool mExternalContext; }; -} +} // namespace Ogre #endif diff --git a/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXGLSupport.h b/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXGLSupport.h index 36d0def0b62..ca35a101fe4 100644 --- a/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXGLSupport.h +++ b/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXGLSupport.h @@ -35,7 +35,7 @@ namespace Ogre { - class _OgrePrivate GLXGLSupport : public GL3PlusSupport + class _OgrePrivate GLXGLSupport final : public GL3PlusSupport { public: GLXGLSupport(); @@ -46,33 +46,33 @@ namespace Ogre { Atom mAtomState; /** @copydoc see GL3PlusSupport::addConfig */ - void addConfig(); + void addConfig() override; /** @copydoc see GL3PlusSupport::validateConfig */ - String validateConfig(); + String validateConfig() override; /** @copydoc see GL3PlusSupport::setConfigOption */ - void setConfigOption(const String &name, const String &value); + void setConfigOption(const String &name, const String &value) override; /// @copydoc GL3PlusSupport::createWindow Window* createWindow( bool autoCreateWindow, GL3PlusRenderSystem* renderSystem, - const String& windowTitle ); + const String& windowTitle ) override; /// @copydoc RenderSystem::createRenderWindow Window* newWindow( const String &name, uint32 width, uint32 height, - bool fullScreen, const NameValuePairList *miscParams = 0 ); + bool fullScreen, const NameValuePairList *miscParams = 0 ) override; /** @copydoc see GL3PlusSupport::start */ - void start(); + void start() override; /** @copydoc see GL3PlusSupport::stop */ - void stop(); + void stop() override; /** @copydoc see GL3PlusSupport::initialiseExtensions */ - void initialiseExtensions(); + void initialiseExtensions() override; /** @copydoc see GL3PlusSupport::getProcAddress */ - void* getProcAddress(const char* procname) const; + void* getProcAddress(const char* procname) const override; // The remaining functions are internal to the GLX Rendersystem: diff --git a/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXWindow.h b/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXWindow.h index 7321f8983bb..1180867d317 100644 --- a/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXWindow.h +++ b/RenderSystems/GL3Plus/include/windowing/GLX/OgreGLXWindow.h @@ -36,7 +36,7 @@ THE SOFTWARE. namespace Ogre { - class _OgrePrivate GLXWindow : public Window + class _OgrePrivate GLXWindow final : public Window { protected: bool mClosed; @@ -58,42 +58,42 @@ namespace Ogre GLXWindow( const String &title, uint32 width, uint32 height, bool fullscreenMode, PixelFormatGpu depthStencilFormat, const NameValuePairList *miscParams, GLXGLSupport* glsupport ); - virtual ~GLXWindow(); + ~GLXWindow() override; - virtual void _initialize( TextureGpuManager *textureManager ); + void _initialize( TextureGpuManager *textureManager ) override; - virtual void setVSync( bool vSync, uint32 vSyncInterval ); - virtual void reposition( int32 left, int32 top); + void setVSync( bool vSync, uint32 vSyncInterval ) override; + void reposition( int32 left, int32 top) override; void requestFullscreenSwitch( bool goFullscreen, bool borderless, uint32 monitorIdx, uint32 width, uint32 height, - uint32 frequencyNumerator, uint32 frequencyDenominator ); + uint32 frequencyNumerator, uint32 frequencyDenominator ) override; /** @copydoc see RenderWindow::destroy */ - virtual void destroy(); + virtual void destroy() override; /** @copydoc see RenderWindow::isClosed */ - virtual bool isClosed() const; + virtual bool isClosed() const override; /** @copydoc see RenderWindow::isVisible */ - bool isVisible() const; + bool isVisible() const override; - virtual void _setVisible(bool visible); + virtual void _setVisible(bool visible) override; /** @copydoc see RenderWindow::isHidden */ - bool isHidden() const { return mHidden; } + bool isHidden() const override { return mHidden; } /** @copydoc see RenderWindow::setHidden */ - void setHidden(bool hidden); + void setHidden(bool hidden) override; /** @copydoc see RenderWindow::resize */ - void requestResolution( uint32 width, uint32 height ); + void requestResolution( uint32 width, uint32 height ) override; /** @copydoc see RenderWindow::windowMovedOrResized */ - void windowMovedOrResized(); + void windowMovedOrResized() override; /** @copydoc see RenderWindow::swapBuffers */ - void swapBuffers(); + void swapBuffers() override; /** @remarks @@ -104,7 +104,7 @@ namespace Ogre * DISPLAYNAME The X Server name for the connected display. * ATOM The X Atom used in client delete events. */ - virtual void getCustomAttribute( IdString name, void* pData ); + virtual void getCustomAttribute( IdString name, void* pData ) override; bool requiresTextureFlipping() const { return false; } };