mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
fix Skybox::clear to set _empty
This commit is contained in:
parent
5f699072d9
commit
1e7c00c0c8
1 changed files with 6 additions and 4 deletions
|
@ -26,13 +26,15 @@ Skybox::Skybox() {
|
|||
}
|
||||
|
||||
void Skybox::setColor(const Color& color) {
|
||||
_empty = false;
|
||||
_schemaBuffer.edit<Schema>().color = color;
|
||||
_empty = false;
|
||||
}
|
||||
|
||||
void Skybox::setCubemap(const gpu::TexturePointer& cubemap) {
|
||||
_empty = false;
|
||||
_cubemap = cubemap;
|
||||
if (cubemap) {
|
||||
_empty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Skybox::updateSchemaBuffer() const {
|
||||
|
@ -52,9 +54,9 @@ void Skybox::updateSchemaBuffer() const {
|
|||
}
|
||||
|
||||
void Skybox::clear() {
|
||||
_empty = true;
|
||||
_schemaBuffer.edit<Schema>().color = vec3(0);
|
||||
setCubemap(nullptr);
|
||||
_cubemap = nullptr;
|
||||
_empty = true;
|
||||
}
|
||||
|
||||
void Skybox::prepare(gpu::Batch& batch, int textureSlot, int bufferSlot) const {
|
||||
|
|
Loading…
Reference in a new issue