minor update poking around why the texturing code is broken

This commit is contained in:
Hartmut Seichter 2023-06-30 23:20:30 +02:00
parent 833a18a3ee
commit 0eebe25ea9
6 changed files with 47 additions and 24 deletions

View file

@ -56,9 +56,9 @@ struct Shader final {
Shader&
set_uniform_at_location(int location,
uint32_t v); //!< sets a 32bit unsigned in a shader
Shader&
const Shader&
set_uniform_at_location(int location,
int32_t v); //!< sets a 32bit signed in a shader
int32_t v) const; //!< sets a 32bit signed in a shader
/**
* @brief retrieves the position of a uniform
@ -80,7 +80,7 @@ struct Shader final {
* sets data of the
*/
template <typename T>
Shader& set_uniform(std::string const& name, T&& value) {
const Shader& set_uniform(std::string const& name, T&& value) const {
return set_uniform_at_location(uniform_location(name),
std::forward<T>(value));
}

View file

@ -35,6 +35,8 @@ struct Sprite final {
static constexpr Sprite create() noexcept { return {}; }
Bitmap bitmap{};
Vector2<float> pivot{Vector2<float>::zero()};
std::array<std::uint32_t, 6> indices{0, 3, 2, 2, 1, 0};
@ -57,6 +59,7 @@ struct Sprite final {
};
ChangeCountType change_count{};
};
} // namespace paradiso