git-svn-id: svn://db.shs.com.ru/libs@704 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-15 20:01:36 +00:00
parent b8f2ee0dfb
commit cb19854e1b
3 changed files with 11 additions and 1 deletions

View File

@@ -234,6 +234,13 @@ void CubeTexture::load() {
QSize sz;
QVector<QVector3D> data = loadFileHDR(hdr_path, &sz);
loadHDR(data, sz);
} else {
destroy();
bind();
for (int i = 0; i < 6; ++i) {
f->glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, format_, 1, 1, 0, GL_RGB, GL_FLOAT, 0);
}
f->glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
}
changed_ = false;
}