paysages3d/src/render/software/SoftwareRenderer.cpp

37 lines
751 B
C++
Raw Normal View History

2013-11-09 17:46:34 +00:00
#include "SoftwareRenderer.h"
#include "camera.h"
2013-11-10 16:04:38 +00:00
#include "Scenery.h"
#include "FluidMediumManager.h"
2013-11-09 17:46:34 +00:00
2013-11-10 16:04:38 +00:00
SoftwareRenderer::SoftwareRenderer(Scenery* scenery)
2013-11-09 17:46:34 +00:00
{
fluid_medium = new FluidMediumManager(this);
2013-11-10 16:04:38 +00:00
if (scenery)
{
this->scenery = scenery;
}
else
{
this->scenery = Scenery::getCurrent();
}
this->scenery->bindToRenderer(this);
2013-11-09 17:46:34 +00:00
}
SoftwareRenderer::~SoftwareRenderer()
{
delete fluid_medium;
}
2013-11-10 16:04:38 +00:00
void SoftwareRenderer::initialize()
2013-11-10 16:04:38 +00:00
{
//fluid_medium->registerMedium(water_renderer);
2013-11-10 16:04:38 +00:00
}
/*Color SoftwareRenderer::applyMediumTraversal(Vector3 location, Color color)
{
Vector3 eye = cameraGetLocation(scenery->getCamera());
return fluid_medium->applyTraversal(eye, location, color);
}*/