mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 14:49:19 +02:00
indice-aware calculate_tangents
This commit is contained in:
@@ -1860,7 +1860,7 @@ gfx::geometry_handle opengl33_renderer::Insert( gfx::index_array &Indices, gfx::
|
||||
// creates a new geometry chunk of specified type from supplied data, in specified bank. returns: handle to the chunk or NULL
|
||||
gfx::geometry_handle opengl33_renderer::Insert(gfx::vertex_array &Vertices, gfx::geometrybank_handle const &Geometry, int const Type)
|
||||
{
|
||||
gfx::calculate_tangents(Vertices, Type);
|
||||
gfx::calculate_tangents(Vertices, gfx::index_array(), Type);
|
||||
|
||||
return m_geometry.create_chunk(Vertices, Geometry, Type);
|
||||
}
|
||||
@@ -1868,7 +1868,7 @@ gfx::geometry_handle opengl33_renderer::Insert(gfx::vertex_array &Vertices, gfx:
|
||||
// replaces data of specified chunk with the supplied vertex data, starting from specified offset
|
||||
bool opengl33_renderer::Replace(gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, int const Type, std::size_t const Offset)
|
||||
{
|
||||
gfx::calculate_tangents(Vertices, Type);
|
||||
gfx::calculate_tangents(Vertices, gfx::index_array(), Type);
|
||||
|
||||
return m_geometry.replace(Vertices, Geometry, Offset);
|
||||
}
|
||||
@@ -1876,7 +1876,7 @@ bool opengl33_renderer::Replace(gfx::vertex_array &Vertices, gfx::geometry_handl
|
||||
// adds supplied vertex data at the end of specified chunk
|
||||
bool opengl33_renderer::Append(gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, int const Type)
|
||||
{
|
||||
gfx::calculate_tangents(Vertices, Type);
|
||||
gfx::calculate_tangents(Vertices, gfx::index_array(), Type);
|
||||
|
||||
return m_geometry.append(Vertices, Geometry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user