11 #ifndef hifi_model_Skybox_h
12 #define hifi_model_Skybox_h
14 #include <gpu/Texture.h>
20 namespace gpu {
class Batch; }
24 typedef glm::vec3 Color;
28 typedef gpu::BufferView UniformBufferView;
31 Skybox& operator= (
const Skybox& skybox);
34 void setColor(
const Color& color);
35 const Color getColor()
const {
return _schemaBuffer.get<Schema>().color; }
37 void setCubemap(
const gpu::TexturePointer& cubemap);
38 const gpu::TexturePointer& getCubemap()
const {
return _cubemap; }
40 void setOrientation(
const glm::quat& orientation);
41 const glm::quat getOrientation()
const {
return _orientation; }
43 virtual bool empty() {
return _empty; }
46 void prepare(gpu::Batch& batch)
const;
47 virtual void render(gpu::Batch& batch,
const ViewFrustum& frustum,
bool forward)
const;
49 static void render(gpu::Batch& batch,
const ViewFrustum& frustum,
const Skybox& skybox,
bool forward);
51 const UniformBufferView& getSchemaBuffer()
const {
return _schemaBuffer; }
56 glm::vec3 color { 0.0f, 0.0f, 0.0f };
60 void updateSchemaBuffer()
const;
62 mutable gpu::BufferView _schemaBuffer;
63 gpu::TexturePointer _cubemap;
64 glm::quat _orientation;
68 typedef std::shared_ptr<Skybox> SkyboxPointer;