- if (!use_transparency) color.color |= 0xff000000;
- Driver->draw2DImageBatch(page->texture, page->render_positions, page->render_source_rects, clip, color, true);
+ if (shadow_offset) {
+ for (size_t i = 0; i < page->render_positions.size(); ++i)
+ page->render_positions[i] += core::vector2di(shadow_offset, shadow_offset);
+ Driver->draw2DImageBatch(page->texture, page->render_positions, page->render_source_rects, clip, video::SColor(shadow_alpha,0,0,0), true);
+ for (size_t i = 0; i < page->render_positions.size(); ++i)
+ page->render_positions[i] -= core::vector2di(shadow_offset, shadow_offset);
+ }
+ for (size_t i = 0; i < page->render_positions.size(); ++i) {
+ irr::video::SColor col;
+ if (!applied_colors.empty()) {
+ col = applied_colors[i < applied_colors.size() ? i : 0];
+ } else {
+ col = irr::video::SColor(255, 255, 255, 255);
+ }
+ if (!use_transparency)
+ col.color |= 0xff000000;
+ Driver->draw2DImage(page->texture, page->render_positions[i], page->render_source_rects[i], clip, col, true);
+ }