Fixed Texture::Download with mipmaps

Former-commit-id: 1c2f6bd9fdd580e3fd5a6425bfa49251766676d2
This commit is contained in:
Lynix 2015-01-07 23:42:07 +01:00
parent 586aac534b
commit 09856d42e3
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ bool NzTexture::Download(NzImage* image) const
// Téléchargement...
NzOpenGL::BindTexture(m_impl->type, m_impl->id);
for (nzUInt8 level = 0; level < m_impl->levelCount; ++level)
glGetTexImage(NzOpenGL::TextureTarget[m_impl->type], level, format.dataFormat, format.dataType, image->GetPixels(level));
glGetTexImage(NzOpenGL::TextureTarget[m_impl->type], level, format.dataFormat, format.dataType, image->GetPixels(0, 0, 0, level));
return true;
}