Move shape buffer mapping to renderer gl

This commit is contained in:
2026-06-02 06:47:29 +02:00
parent 0d2a1bd0ae
commit 47eb1ec0b2
6 changed files with 131 additions and 53 deletions

View File

@@ -192,6 +192,7 @@ void maps_shape_index_and_primitive_modes(pp::tests::Harness& h)
constexpr std::uint32_t gl_triangles = 0x0004U;
constexpr std::uint32_t gl_unsigned_short = 0x1403U;
constexpr std::uint32_t gl_unsigned_int = 0x1405U;
constexpr std::uint32_t gl_float = 0x1406U;
PP_EXPECT(h, pp::renderer::gl::index_type_for_index_size(2U) == gl_unsigned_short);
PP_EXPECT(h, pp::renderer::gl::index_type_for_index_size(4U) == gl_unsigned_int);
@@ -206,6 +207,12 @@ void maps_shape_index_and_primitive_modes(pp::tests::Harness& h)
PP_EXPECT(h, pp::renderer::gl::primitive_mode_for_stroke_count(1U) == gl_points);
PP_EXPECT(h, pp::renderer::gl::primitive_mode_for_stroke_count(2U) == gl_lines);
PP_EXPECT(h, pp::renderer::gl::primitive_mode_for_stroke_count(99U) == gl_lines);
PP_EXPECT(h, pp::renderer::gl::array_buffer_target() == 0x8892U);
PP_EXPECT(h, pp::renderer::gl::element_array_buffer_target() == 0x8893U);
PP_EXPECT(h, pp::renderer::gl::static_draw_buffer_usage() == 0x88E4U);
PP_EXPECT(h, pp::renderer::gl::vertex_attribute_float_component_type() == gl_float);
PP_EXPECT(h, pp::renderer::gl::vertex_attribute_not_normalized() == 0U);
}
void maps_panopainter_cube_faces_to_texture_targets(pp::tests::Harness& h)