mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
LibGL+LibSoftGPU: Use device samplers for rendering
We now sample textures from the device owned image samplers. Passing of enabled texture units has been simplified by only passing a list of texture unit indices.
This commit is contained in:
parent
f69de5e850
commit
d8c17c8838
5 changed files with 19 additions and 30 deletions
|
@ -224,14 +224,14 @@ void SoftwareGLContext::gl_end()
|
|||
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
||||
}
|
||||
|
||||
m_bound_texture_units.clear();
|
||||
for (auto& texture_unit : m_texture_units) {
|
||||
if (texture_unit.is_bound())
|
||||
m_bound_texture_units.append(texture_unit);
|
||||
Vector<size_t, 32> enabled_texture_units;
|
||||
for (size_t i = 0; i < m_texture_units.size(); ++i) {
|
||||
if (m_texture_units[i].texture_2d_enabled())
|
||||
enabled_texture_units.append(i);
|
||||
}
|
||||
|
||||
sync_device_config();
|
||||
m_rasterizer.draw_primitives(m_current_draw_mode, m_projection_matrix * m_model_view_matrix, m_texture_matrix, m_vertex_list, m_bound_texture_units);
|
||||
m_rasterizer.draw_primitives(m_current_draw_mode, m_projection_matrix * m_model_view_matrix, m_texture_matrix, m_vertex_list, enabled_texture_units);
|
||||
|
||||
m_vertex_list.clear_with_capacity();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue