paysages3d/src/render/software/SoftwareRenderer.h

62 lines
1.5 KiB
C
Raw Normal View History

2013-11-09 17:46:34 +00:00
#ifndef SOFTWARERENDERER_H
#define SOFTWARERENDERER_H
#include "software_global.h"
#include "renderer.h"
namespace paysages {
namespace software {
/*!
* \brief This class renders a defined scenery in sotware mode (using only standard CPU computations).
*/
class SOFTWARESHARED_EXPORT SoftwareRenderer: public Renderer
{
public:
2013-11-10 16:04:38 +00:00
SoftwareRenderer(Scenery* scenery=0);
2013-11-09 17:46:34 +00:00
virtual ~SoftwareRenderer();
/*!
* \brief Set the scenery to render.
*
* Don't call this after rendering has already started.
*/
virtual void setScenery(Scenery* scenery) override;
/*!
* \brief Prepare the renderer sub-systems.
*
* This will clear the caches and connect elements together.
* After this call, don't update the scenery when renderer is in use.
*/
virtual void prepare() override;
/*!
* \brief Start the rasterization process.
*/
virtual void rasterize() override;
2013-11-09 17:46:34 +00:00
inline Scenery* getScenery() const {return scenery;}
inline BaseAtmosphereRenderer* getAtmosphereRenderer() const {return atmosphere_renderer;}
inline CloudsRenderer* getCloudsRenderer() const {return clouds_renderer;}
inline FluidMediumManager* getFluidMediumManager() const {return fluid_medium;}
2013-11-09 17:46:34 +00:00
virtual Color applyMediumTraversal(Vector3 location, Color color) override;
2013-11-10 16:04:38 +00:00
2013-11-09 17:46:34 +00:00
private:
Scenery* scenery;
bool own_scenery;
FluidMediumManager* fluid_medium;
BaseAtmosphereRenderer* atmosphere_renderer;
CloudsRenderer* clouds_renderer;
2013-11-09 17:46:34 +00:00
};
}
}
#endif // SOFTWARERENDERER_H