Follow-up of 5b2e2fe7b3 -> Fixed uv mapping on gizmobar

This commit is contained in:
Enrico Turri 2020-01-08 10:04:39 +01:00
parent ca950d1a00
commit 5a63b9a6a0

View file

@ -886,7 +886,7 @@ void GLGizmosManager::do_render_overlay() const
#else
float du = (float)(tex_width - 1) / (3.0f * (float)tex_width); // 3 is the number of possible states if the icons
#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE
float dv = (float)(tex_height - 1) / (float)(selectable_idxs.size() * tex_height);
float dv = (float)(tex_height - 1) / (float)(m_gizmos.size() * tex_height);
// tiles in the texture are spaced by 1 pixel
float u_offset = 1.0f / (float)tex_width;