mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
set skybox clear color to empty color
This commit is contained in:
parent
24162f0f3d
commit
5e82093e69
2 changed files with 6 additions and 1 deletions
|
@ -49,6 +49,11 @@ void Skybox::updateSchemaBuffer() const {
|
|||
}
|
||||
}
|
||||
|
||||
void Skybox::clear() {
|
||||
_schemaBuffer.edit<Schema>().color = vec3(0);
|
||||
setCubemap(nullptr);
|
||||
}
|
||||
|
||||
void Skybox::prepare(gpu::Batch& batch, int textureSlot, int bufferSlot) const {
|
||||
if (bufferSlot > -1) {
|
||||
batch.setUniformBuffer(bufferSlot, _schemaBuffer);
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
const gpu::TexturePointer& getCubemap() const { return _cubemap; }
|
||||
|
||||
virtual bool empty() { return _schemaBuffer.get<Schema>().color == vec3(0) && !_cubemap; }
|
||||
virtual void clear() { setCubemap(nullptr); }
|
||||
virtual void clear();
|
||||
|
||||
void prepare(gpu::Batch& batch, int textureSlot = SKYBOX_SKYMAP_SLOT, int bufferSlot = SKYBOX_CONSTANTS_SLOT) const;
|
||||
virtual void render(gpu::Batch& batch, const ViewFrustum& frustum) const;
|
||||
|
|
Loading…
Reference in a new issue