12 #ifndef hifi_model_Skybox_h
13 #define hifi_model_Skybox_h
15 #include <gpu/Texture.h>
21 namespace gpu {
class Batch; }
25 typedef glm::vec3 Color;
29 typedef gpu::BufferView UniformBufferView;
32 Skybox& operator= (
const Skybox& skybox);
35 void setColor(
const Color& color);
36 const Color getColor()
const {
return _schemaBuffer.get<Schema>().color; }
38 void setCubemap(
const gpu::TexturePointer& cubemap);
39 const gpu::TexturePointer& getCubemap()
const {
return _cubemap; }
41 void setOrientation(
const glm::quat& orientation);
42 const glm::quat getOrientation()
const {
return _orientation; }
44 virtual bool empty() {
return _empty; }
47 void prepare(gpu::Batch& batch)
const;
48 virtual void render(gpu::Batch& batch,
const ViewFrustum& frustum,
bool forward, uint transformSlot)
const;
50 static void render(gpu::Batch& batch,
const ViewFrustum& frustum,
const Skybox& skybox,
bool forward, uint transformSlot);
52 const UniformBufferView& getSchemaBuffer()
const {
return _schemaBuffer; }
57 glm::vec3 color { 0.0f, 0.0f, 0.0f };
61 void updateSchemaBuffer()
const;
63 mutable gpu::BufferView _schemaBuffer;
64 gpu::TexturePointer _cubemap;
65 glm::quat _orientation;
69 typedef std::shared_ptr<Skybox> SkyboxPointer;