Closed BaconOFBurger closed 2 years ago
In program.hpp at line 188
program.hpp
glGetProgramBinary(id_, static_cast<GLsizei>(result.size()), nullptr, &format, static_cast<void*>(result.data()));
We are passing a pointer to format which is of type const GLenum * and according to https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgramBinary.xhtml it should be GLenum *
format
const GLenum *
GLenum *
I suggest that we either change the function signature to
std::vector<type> program_binary (GLenum format) const {
Or change line 188, so it includes a const cast
glGetProgramBinary(id_, static_cast<GLsizei>(result.size()), nullptr, const_cast<GLenum *>(&format), static_cast<void*>(result.data()));
I also noticed in renderbuffer.hpp at line 146
renderbuffer.hpp
[[nodiscard]] void copy_image_sub_data(const renderbuffer& source, const GLint source_level, const GLint source_x, const GLint source_y, const GLint source_z, const GLint level , const GLint x , const GLint y , const GLint z , const GLint width, const GLint height, const GLint depth) const { glCopyImageSubData(source.id(), GL_RENDERBUFFER, source_level, source_x, source_y, source_z, id_, GL_RENDERBUFFER, level, x, y, z, width, height, depth); }
That the [[nodiscard]] attribute seems useless as we return no value, so it should be removed.
[[nodiscard]]
Dear @BaconOFBurger , I have pushed the said changes to both develop and master, and released hotfix 2.1.2. Keep them coming. You can close the issue if there is no more.
In
program.hpp
at line 188We are passing a pointer to
format
which is of typeconst GLenum *
and according to https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgramBinary.xhtml it should beGLenum *
I suggest that we either change the function signature to
Or change line 188, so it includes a const cast
I also noticed in
renderbuffer.hpp
at line 146That the
[[nodiscard]]
attribute seems useless as we return no value, so it should be removed.