drafting a simple skybox

This commit is contained in:
Sam Gateau 2015-03-22 19:04:33 -07:00
parent 2d4aee7343
commit 5f3c4b743f
2 changed files with 31 additions and 0 deletions

View file

@ -184,6 +184,14 @@ void Atmosphere::setInnerOuterRadiuses(float inner, float outer) {
data._scales.z = data._scales.x / data._scales.y;
}
Skybox::Skybox() {
}
void Skybox::setCubemap(const gpu::TexturePointer& cubemap) {
_cubemap = cubemap;
}
const int NUM_DAYS_PER_YEAR = 365;
const float NUM_HOURS_PER_DAY = 24.0f;
@ -273,3 +281,6 @@ void SunSkyStage::updateGraphicsObject() const {
}
void SunSkyStage::setSkybox(const Vec3& color) {
_skybox ;
}

View file

@ -160,6 +160,21 @@ protected:
};
typedef QSharedPointer< Atmosphere > AtmospherePointer;
class Skybox {
public:
Skybox();
Skybox& operator= (const Atmosphere& Skybox);
virtual ~Skybox() {};
void setCubemap(const gpu::TexturePointer& cubemap);
const gpu::TexturePointer& getCubemap() const { return _cubemap; }
protected:
gpu::TexturePointer _cubemap;
};
typedef QSharedPointer< Skybox > SkyboxPointer;
// Sun sky stage generates the rendering primitives to display a scene realistically
// at the specified location and time around earth
class SunSkyStage {
@ -197,9 +212,14 @@ public:
LightPointer getSunLight() const { valid(); return _sunLight; }
AtmospherePointer getAtmosphere() const { valid(); return _atmosphere; }
// Skybox
void setSkybox(const SkyboxPointer& skybox);
const SkyboxPointer& getSkybox() const { valid(); return _skybox; }
protected:
LightPointer _sunLight;
AtmospherePointer _atmosphere;
SkyboxPointer _skybox;
gpu::PipelinePointer _skyPipeline;