Move render target texture parameters to renderer gl
This commit is contained in:
@@ -38,6 +38,12 @@ constexpr std::uint32_t gl_texture_cube_map_positive_y = 0x8517U;
|
||||
constexpr std::uint32_t gl_texture_cube_map_negative_y = 0x8518U;
|
||||
constexpr std::uint32_t gl_texture_cube_map_positive_z = 0x8519U;
|
||||
constexpr std::uint32_t gl_texture_cube_map_negative_z = 0x851AU;
|
||||
constexpr std::uint32_t gl_linear = 0x2601U;
|
||||
constexpr std::uint32_t gl_texture_mag_filter = 0x2800U;
|
||||
constexpr std::uint32_t gl_texture_min_filter = 0x2801U;
|
||||
constexpr std::uint32_t gl_texture_wrap_s = 0x2802U;
|
||||
constexpr std::uint32_t gl_texture_wrap_t = 0x2803U;
|
||||
constexpr std::uint32_t gl_clamp_to_edge = 0x812FU;
|
||||
|
||||
[[nodiscard]] bool contains(std::string_view text, std::string_view needle) noexcept
|
||||
{
|
||||
@@ -195,4 +201,16 @@ std::uint32_t cube_face_texture_target(std::uint32_t face_index) noexcept
|
||||
return targets[face_index];
|
||||
}
|
||||
|
||||
std::span<const OpenGlTextureParameter> default_render_target_texture_parameters() noexcept
|
||||
{
|
||||
static constexpr std::array<OpenGlTextureParameter, 4> parameters {
|
||||
OpenGlTextureParameter { .name = gl_texture_mag_filter, .value = gl_linear },
|
||||
OpenGlTextureParameter { .name = gl_texture_min_filter, .value = gl_linear },
|
||||
OpenGlTextureParameter { .name = gl_texture_wrap_s, .value = gl_clamp_to_edge },
|
||||
OpenGlTextureParameter { .name = gl_texture_wrap_t, .value = gl_clamp_to_edge },
|
||||
};
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user