moving shader across to std

This commit is contained in:
Alister
2021-12-12 15:48:58 +00:00
parent 490474cede
commit 43904dd036
2 changed files with 3 additions and 6 deletions

View File

@@ -112,7 +112,7 @@ namespace opengl
#endif
}
program::program (program&& other)
: _handle (boost::none)
: _handle (std::nullopt)
{
std::swap (_handle, other._handle);
}
@@ -240,7 +240,7 @@ namespace opengl
void use_program::bind_uniform_block(std::string const& name, unsigned target)
{
gl.uniformBlockBinding(_program._handle.get(), uniform_block_location(name), target);
gl.uniformBlockBinding(_program._handle.value() , uniform_block_location(name), target);
}
void use_program::uniform (std::string const& name, std::vector<int> const& value)
{

View File

@@ -4,9 +4,6 @@
#include <opengl/shader.fwd.hpp>
#include <opengl/types.hpp>
#include <boost/optional.hpp>
#include <initializer_list>
#include <map>
#include <set>
@@ -72,7 +69,7 @@ namespace opengl
friend struct scoped::use_program;
boost::optional<GLuint> _handle;
std::optional<GLuint> _handle;
tsl::robin_map<std::string, GLuint> _uniforms;
tsl::robin_map<std::string, GLuint> _attribs;