diff --git a/include/ACGL/OpenGL/Objects/Buffer.hh b/include/ACGL/OpenGL/Objects/Buffer.hh index db2a4c0fc2ea15da4d93053df94fb119f7f94bd6..ef3d737ea230c6e89bc4b50b89186a28b5420131 100644 --- a/include/ACGL/OpenGL/Objects/Buffer.hh +++ b/include/ACGL/OpenGL/Objects/Buffer.hh @@ -344,6 +344,16 @@ public: */ virtual inline void setTarget( GLenum _target ) { mTarget = _target; } + /** + * @brief invalidateBufferData is a performance optimization and will invalidate the whole + * buffer. Before GL 4.3 this is a NO-OP. + */ + void invalidateBufferData() { +#if (ACGL_OPENGL_VERSION >= 43) + glInvalidateBufferData( getObjectName() ); +#endif + } + // =================================================================================================== \/ // ============================================================================================ FIELDS \/ // =================================================================================================== \/