Support drawing textures without doing any clipping.
This commit is contained in:
parent
0674f2d28d
commit
79fbf0faf7
4 changed files with 29 additions and 10 deletions
|
@ -67,12 +67,13 @@ namespace cloonel {
|
|||
const ushort2 grid(static_cast<ushort2>(m_tileCount.tileCount()));
|
||||
const float2& sz = m_tileCount.tileSize();
|
||||
|
||||
//TODO: add code to tell the renderer if the current tile will need clipping or not
|
||||
float2 dest;
|
||||
dest.y() = 0.0f;
|
||||
for (uint16_t y = 0; y < grid.y(); ++y) {
|
||||
dest.x() = 0.0f;
|
||||
for (uint16_t x = 0; x < grid.x(); ++x) {
|
||||
m_tile->Render(dest, sz, float2(1.0f));
|
||||
m_tile->Render(dest, sz, float2(1.0f), true);
|
||||
dest.x() += sz.x();
|
||||
}
|
||||
dest.y() += sz.y();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue