else if(i->type==GL_TEXTURE_2D)
{
Texture2D *tex = static_cast<Texture2D *>(i->tex);
- width = tex->get_width();
- height = tex->get_height();
+ width = max(tex->get_width()>>i->level, 1U);
+ height = max(tex->get_height()>>i->level, 1U);
}
else if(i->type==GL_TEXTURE_CUBE_MAP)
{
- width = static_cast<TextureCube *>(i->tex)->get_size();
+ width = max(static_cast<TextureCube *>(i->tex)->get_size()>>i->level, 1U);
height = width;
}
if(full_viewport)