Go to the documentation of this file. 1 #ifndef OGLPLUS_GLSL_SOURCE_REF_HPP
9 #define OGLPLUS_GLSL_SOURCE_REF_HPP
11 #include "../gl_api/config.hpp"
16 namespace eagine::oglp {
37 , _lengths{&_length} {}
42 memory::accomodate<const char_type>(source_str).data(),
43 eagine::limit_cast<int_type>(source_str.size())) {}
50 : _count{eagine::limit_cast<sizei_type>(n)}
53 EAGINE_ASSERT(_count >= 0);
54 EAGINE_ASSERT(_parts !=
nullptr);
90 #endif // OGLPLUS_GLSL_SOURCE_REF_HPP
GLsizei sizei_type
Signed integer size type.
Definition: config.hpp:88
GLchar char_type
String character type.
Definition: config.hpp:46
Class referencing a set of GLSL source code strings.
Definition: source_ref.hpp:20
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
constexpr auto count() const noexcept -> sizei_type
Returns the number of source string fragments.
Definition: source_ref.hpp:60
GLint int_type
Signed integer type.
Definition: config.hpp:70
glsl_source_ref(span_size_t n, const char_type **ps, const int_type *ls) noexcept
Construction from C-string array and lengths array.
Definition: source_ref.hpp:46
gl_types::sizei_type sizei_type
Alias for integer type storing size values.
Definition: source_ref.hpp:29
auto lengths() const noexcept -> const int_type *
Returns the lengths of the source string fragments.
Definition: source_ref.hpp:76
constexpr auto parts() const noexcept -> const char_type **
Returns pointers to the source string fragments.
Definition: source_ref.hpp:68
gl_types::char_type char_type
Alias for character string type.
Definition: source_ref.hpp:23
constexpr glsl_source_ref(const char_type *part, int_type length) noexcept
Construction from a single C-string and length value.
Definition: source_ref.hpp:32
constexpr glsl_source_ref(string_view source_str) noexcept
Construction from a string_view.
Definition: source_ref.hpp:40
gl_types::int_type int_type
Alias for integer type.
Definition: source_ref.hpp:26