removed index type unsigned_byte

This commit is contained in:
andrey.zhirnov
2019-08-05 12:32:51 +03:00
parent 3fcf6e053a
commit cff16a5cfa
9 changed files with 6 additions and 28 deletions

View File

@@ -64,7 +64,7 @@ namespace
}
};
std::array<u8,6> generate_quad_indices() noexcept {
std::array<u16,6> generate_quad_indices() noexcept {
return {0, 1, 2, 2, 1, 3};
}
@@ -111,7 +111,7 @@ namespace
const auto indices = generate_quad_indices();
index_buffer_ = the<render>().create_index_buffer(
indices,
index_declaration::index_type::unsigned_byte,
index_declaration::index_type::unsigned_short,
index_buffer::usage::static_draw);
const auto vertices1 = generate_quad_vertices(texture1_->size());

View File

@@ -56,7 +56,7 @@ namespace
}
};
std::array<u8,36> generate_cube_indices() noexcept {
std::array<u16,36> generate_cube_indices() noexcept {
return {
0, 1, 2,
2, 3, 0,
@@ -170,7 +170,7 @@ namespace
const auto indices = generate_cube_indices();
index_buffer_ = the<render>().create_index_buffer(
indices,
index_declaration::index_type::unsigned_byte,
index_declaration::index_type::unsigned_short,
index_buffer::usage::static_draw);
const auto vertices1 = generate_cube_vertices(make_vec3(1.f));

View File

@@ -44,7 +44,7 @@ namespace
}
};
std::array<u8,36> generate_cube_indices() noexcept {
std::array<u16,36> generate_cube_indices() noexcept {
return {
0, 1, 2,
2, 3, 0,
@@ -125,7 +125,7 @@ namespace
const auto indices = generate_cube_indices();
index_buffer_ = the<render>().create_index_buffer(
indices,
index_declaration::index_type::unsigned_byte,
index_declaration::index_type::unsigned_short,
index_buffer::usage::static_draw);
const auto vertices = generate_cube_vertices(make_vec3(1.f));