Skip to content

Visual Studio 2013, 3D SBS rendering and 2nd screen #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,11 @@ unix/config/config.sub
unix/config/depcomp
unix/config/install-sh
unix/config/missing
libraries/ilmbase/Half/eLut.h
libraries/ilmbase/Half/toFloat.h
libraries/openexr/IlmImf/b44ExpLogTable.h
libraries/png/pnglibconf.h
libraries/tiff/libtiff/tiffconf.h
libraries/tiff/libtiff/tif_config.h
*.bsc
windows/vs13/bin32/lib/cmedit32d.exp
1 change: 1 addition & 0 deletions libraries/openexr/IlmImf/ImfOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include <vector>
#include <fstream>
#include <assert.h>
#include <algorithm>


namespace Imf {
Expand Down
1 change: 1 addition & 0 deletions libraries/openexr/IlmImf/ImfScanLineInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <string>
#include <vector>
#include <assert.h>
#include <algorithm>


namespace Imf {
Expand Down
1 change: 1 addition & 0 deletions libraries/openexr/IlmImf/ImfTiledMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "Iex.h"
#include <ImfMisc.h>
#include <ImfChannelList.h>
#include <algorithm>


namespace Imf {
Expand Down
1 change: 1 addition & 0 deletions libraries/openexr/IlmImf/ImfTiledOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <fstream>
#include <assert.h>
#include <map>
#include <algorithm>


namespace Imf {
Expand Down
4 changes: 2 additions & 2 deletions source/backend/bounding/boundingtask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class BSPProgress : public BSPTree::Progress
BSPProgress();
};

BoundingTask::BoundingTask(shared_ptr<SceneData> sd, unsigned int bt) :
SceneTask(new TraceThreadData(sd), boost::bind(&BoundingTask::SendFatalError, this, _1), "Bounding", sd),
BoundingTask::BoundingTask(std::shared_ptr<SceneData> sd, unsigned int bt) :
SceneTask(new TraceThreadData(sd), std::bind(&BoundingTask::SendFatalError, this, std::placeholders::_1), "Bounding", sd),
sceneData(sd),
boundingThreshold(bt)
{
Expand Down
4 changes: 2 additions & 2 deletions source/backend/bounding/boundingtask.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class TraceThreadData;
class BoundingTask : public SceneTask
{
public:
BoundingTask(shared_ptr<SceneData> sd, unsigned int bt);
BoundingTask(std::shared_ptr<SceneData> sd, unsigned int bt);
virtual ~BoundingTask();

virtual void Run();
Expand All @@ -63,7 +63,7 @@ class BoundingTask : public SceneTask

inline TraceThreadData *GetSceneDataPtr() { return reinterpret_cast<TraceThreadData *>(GetDataPtr()); }
private:
shared_ptr<SceneData> sceneData;
std::shared_ptr<SceneData> sceneData;
unsigned int boundingThreshold;

void SendFatalError(pov_base::Exception& e);
Expand Down
4 changes: 2 additions & 2 deletions source/backend/control/renderbackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void RenderBackend::CreateScene(POVMS_Message& msg, POVMS_Message& result, int)
if(err != kNoErr)
throw POV_EXCEPTION_CODE (err);

shared_ptr<Scene> scene(new Scene(backendAddress, msg.GetSourceAddress(), scenecounter + 1));
std::shared_ptr<Scene> scene(new Scene(backendAddress, msg.GetSourceAddress(), scenecounter + 1));

scenecounter++;

Expand Down Expand Up @@ -388,7 +388,7 @@ void RenderBackend::CreateView(POVMS_Message& msg, POVMS_Message& result, int)
if(i == scenes.end())
throw POV_EXCEPTION_CODE(kInvalidIdentifierErr);

shared_ptr<View> view(i->second->NewView(msg.TryGetInt(kPOVAttrib_Width, 160), msg.TryGetInt(kPOVAttrib_Height, 120), viewcounter + 1));
std::shared_ptr<View> view(i->second->NewView(msg.TryGetInt(kPOVAttrib_Width, 160), msg.TryGetInt(kPOVAttrib_Height, 120), viewcounter + 1));

viewcounter++;

Expand Down
4 changes: 2 additions & 2 deletions source/backend/control/renderbackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ class RenderBackend : public POVMS_MessageReceiver
ViewId viewcounter;

typedef std::set<ViewId> ViewIdSet;
typedef std::map<SceneId, shared_ptr<Scene> > SceneMap;
typedef std::map<ViewId, shared_ptr<View> > ViewMap;
typedef std::map<SceneId, std::shared_ptr<Scene> > SceneMap;
typedef std::map<ViewId, std::shared_ptr<View> > ViewMap;
typedef std::map<SceneId, ViewIdSet> Scene2ViewsMap;
typedef std::map<ViewId, SceneId> View2SceneMap;

Expand Down
8 changes: 4 additions & 4 deletions source/backend/control/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ void Scene::StartParser(POVMS_Object& parseOptions)
// A scene can only be parsed once
if(parserControlThread == NULL)
#ifndef USE_OFFICIAL_BOOST
parserControlThread = new boost::thread(boost::bind(&Scene::ParserControlThread, this), 1024 * 64);
parserControlThread = new boost::thread(std::bind(&Scene::ParserControlThread, this), 1024 * 64);
#else
parserControlThread = new boost::thread(boost::bind(&Scene::ParserControlThread, this));
parserControlThread = new boost::thread(std::bind(&Scene::ParserControlThread, this));
#endif
else
return;
Expand Down Expand Up @@ -174,10 +174,10 @@ void Scene::StartParser(POVMS_Object& parseOptions)
parserTasks.AppendSync();

// send statistics
parserTasks.AppendFunction(boost::bind(&Scene::SendStatistics, this, _1));
parserTasks.AppendFunction(std::bind(&Scene::SendStatistics, this, std::placeholders::_1));

// send done message and compatibility data
parserTasks.AppendFunction(boost::bind(&Scene::SendDoneMessage, this, _1));
parserTasks.AppendFunction(std::bind(&Scene::SendDoneMessage, this, std::placeholders::_1));
}

void Scene::StopParser()
Expand Down
13 changes: 7 additions & 6 deletions source/backend/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

#include <stack>
#include <vector>
#include <algorithm>

#include "base/configbase.h"
#include "backend/configbackend.h"
Expand Down Expand Up @@ -963,7 +964,7 @@ class Interior
SNGL Fade_Distance, Fade_Power;
MathColour Fade_Colour;
vector<Media> media;
shared_ptr<SubsurfaceInterior> subsurface;
std::shared_ptr<SubsurfaceInterior> subsurface;

Interior();
Interior(const Interior&);
Expand All @@ -976,8 +977,8 @@ class Interior
Interior& operator=(const Interior&);
};

typedef shared_ptr<Interior> InteriorPtr;
typedef shared_ptr<const Interior> ConstInteriorPtr;
typedef std::shared_ptr<Interior> InteriorPtr;
typedef std::shared_ptr<const Interior> ConstInteriorPtr;

/// @}
///
Expand Down Expand Up @@ -1023,8 +1024,8 @@ typedef shared_ptr<const Interior> ConstInteriorPtr;

struct BasicPattern;

typedef shared_ptr<BasicPattern> PatternPtr;
typedef shared_ptr<const BasicPattern> ConstPatternPtr;
typedef std::shared_ptr<BasicPattern> PatternPtr;
typedef std::shared_ptr<const BasicPattern> ConstPatternPtr;


struct Pattern_Struct
Expand Down Expand Up @@ -1430,7 +1431,7 @@ class FractalRules
virtual bool Bound (const BasicRay&, const Fractal *, DBL *, DBL *) const = 0;
};

typedef shared_ptr<FractalRules> FractalRulesPtr;
typedef std::shared_ptr<FractalRules> FractalRulesPtr;


struct QualityFlags
Expand Down
2 changes: 1 addition & 1 deletion source/backend/lighting/photonestimationtask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void PhotonEstimationTask::Finish()
void PhotonEstimationTask::SearchThroughObjectsEstimatePhotons(vector<ObjectPtr>& Objects, LightSource *Light)
{
ViewThreadData *renderDataPtr = GetViewDataPtr();
shared_ptr<SceneData> sceneData = GetSceneData();
std::shared_ptr<SceneData> sceneData = GetSceneData();

/* check this object and all siblings */
for(vector<ObjectPtr>::iterator Sib = Objects.begin(); Sib != Objects.end(); Sib++)
Expand Down
6 changes: 3 additions & 3 deletions source/backend/lighting/photons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const int PHOTON_BLOCK_MASK = (PHOTON_BLOCK_SIZE-1);
const int INITIAL_BASE_ARRAY_SIZE = 100;


PhotonTrace::PhotonTrace(shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, const QualityFlags& qf, Trace::CooperateFunctor& cf) :
PhotonTrace::PhotonTrace(std::shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, const QualityFlags& qf, Trace::CooperateFunctor& cf) :
Trace(sd, td, qf, cf, mediaPhotons, noRadiosity),
mediaPhotons(sd, td, this, new PhotonGatherer(&sd->mediaPhotonMap, sd->photonSettings))
{
Expand Down Expand Up @@ -932,7 +932,7 @@ void PhotonTrace::addSurfacePhoton(const Vector3d& Point, const Vector3d& Origin

}

PhotonMediaFunction::PhotonMediaFunction(shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg) :
PhotonMediaFunction::PhotonMediaFunction(std::shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg) :
MediaFunction(td, t, pg),
sceneData(sd)
{
Expand Down Expand Up @@ -2707,7 +2707,7 @@ int LightTargetCombo::computeMergedFlags()
}


void LightTargetCombo::computeAnglesAndDeltas(shared_ptr<SceneData> sceneData)
void LightTargetCombo::computeAnglesAndDeltas(std::shared_ptr<SceneData> sceneData)
{
shootingDirection.compute();

Expand Down
8 changes: 4 additions & 4 deletions source/backend/lighting/photons.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,22 +300,22 @@ class PhotonGatherer
class PhotonMediaFunction : public MediaFunction
{
public:
PhotonMediaFunction(shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg);
PhotonMediaFunction(std::shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg);

void ComputeMediaAndDepositPhotons(MediaVector& medias, const Ray& ray, const Intersection& isect, MathColour& colour);
protected:
void DepositMediaPhotons(MathColour& colour, MediaVector& medias, LightSourceEntryVector& lights, MediaIntervalVector& mediaintervals,
const Ray& ray, int minsamples, bool ignore_photons, bool use_scattering, bool all_constant_and_light_ray);
private:
shared_ptr<SceneData> sceneData;
std::shared_ptr<SceneData> sceneData;

void addMediaPhoton(const Vector3d& Point, const Vector3d& Origin, const MathColour& LightCol, DBL depthDiff);
};

class PhotonTrace : public Trace
{
public:
PhotonTrace(shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, const QualityFlags& qf, Trace::CooperateFunctor& cf);
PhotonTrace(std::shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, const QualityFlags& qf, Trace::CooperateFunctor& cf);
~PhotonTrace();

virtual DBL TraceRay(Ray& ray, MathColour& colour, ColourChannel&, COLC weight, bool continuedRay, DBL maxDepth = 0.0);
Expand Down Expand Up @@ -368,7 +368,7 @@ class LightTargetCombo
ShootingDirection shootingDirection;

int computeMergedFlags();
void computeAnglesAndDeltas(shared_ptr<SceneData> sceneData);
void computeAnglesAndDeltas(std::shared_ptr<SceneData> sceneData);
};


Expand Down
2 changes: 1 addition & 1 deletion source/backend/lighting/photonshootingstrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ PhotonShootingUnit* PhotonShootingStrategy::getNextUnit()
return unit;
}

void PhotonShootingStrategy::createUnitsForCombo(ObjectPtr obj, LightSource* light, shared_ptr<SceneData> sceneData)
void PhotonShootingStrategy::createUnitsForCombo(ObjectPtr obj, LightSource* light, std::shared_ptr<SceneData> sceneData)
{
PhotonShootingUnit* unit = new PhotonShootingUnit(light, obj);
unit->lightAndObject.computeAnglesAndDeltas(sceneData);
Expand Down
2 changes: 1 addition & 1 deletion source/backend/lighting/photonshootingstrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class PhotonShootingStrategy

vector<PhotonShootingUnit*> units;

void createUnitsForCombo(ObjectPtr obj, LightSource* light, shared_ptr<SceneData> sceneData);
void createUnitsForCombo(ObjectPtr obj, LightSource* light, std::shared_ptr<SceneData> sceneData);
void start();
PhotonShootingUnit* getNextUnit();

Expand Down
2 changes: 1 addition & 1 deletion source/backend/lighting/photonstrategytask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void PhotonStrategyTask::Finish()

void PhotonStrategyTask::SearchThroughObjectsCreateUnits(vector<ObjectPtr>& Objects, LightSource *Light)
{
shared_ptr<SceneData> sceneData = GetSceneData();
std::shared_ptr<SceneData> sceneData = GetSceneData();

/* check this object and all siblings */
for(vector<ObjectPtr>::iterator Sib = Objects.begin(); Sib != Objects.end(); Sib++)
Expand Down
2 changes: 1 addition & 1 deletion source/backend/lighting/radiosity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ RadiosityRecursionSettings* SceneRadiositySettings::GetRecursionSettings(bool fi
return recSettings;
}

RadiosityFunction::RadiosityFunction(shared_ptr<SceneData> sd, TraceThreadData *td, const SceneRadiositySettings& rs,
RadiosityFunction::RadiosityFunction(std::shared_ptr<SceneData> sd, TraceThreadData *td, const SceneRadiositySettings& rs,
RadiosityCache& rc, Trace::CooperateFunctor& cf, bool ft, const Vector3d& camera) :
threadData(td),
trace(sd, td, GetRadiosityQualityFlags(rs, QualityFlags(9)), cf, media, *this), // TODO FIXME - we can only use hard-coded Level-9 quality because Radiosity happens to be disabled at lower settings!
Expand Down
2 changes: 1 addition & 1 deletion source/backend/lighting/radiosity.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class RadiosityFunction : public Trace::RadiosityFunctor
// cf - the cooperate functor (whatever that is - some thing that handles inter-thread communication?)
// pts - number of the current pretrace step (PRETRACE_FIRST to PRETRACE_MAX, or FINAL_TRACE for main render)
// camera - position of the camera
RadiosityFunction(shared_ptr<SceneData> sd, TraceThreadData *td,
RadiosityFunction(std::shared_ptr<SceneData> sd, TraceThreadData *td,
const SceneRadiositySettings& rs, RadiosityCache& rc, Trace::CooperateFunctor& cf, bool ft, const Vector3d& camera);
virtual ~RadiosityFunction();

Expand Down
4 changes: 2 additions & 2 deletions source/backend/povray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@ boost::thread *povray_init(const boost::function0<void>& threadExit, POVMSAddres
pov::InitializePatternGenerators();

#ifndef USE_OFFICIAL_BOOST
POV_MainThread = new boost::thread(boost::bind(&MainThreadFunction, threadExit), 1024 * 64);
POV_MainThread = new boost::thread(std::bind(&MainThreadFunction, threadExit), 1024 * 64);
#else
POV_MainThread = new boost::thread(boost::bind(&MainThreadFunction, threadExit));
POV_MainThread = new boost::thread(std::bind(&MainThreadFunction, threadExit));
#endif

// we can't depend on boost::thread::yield here since under windows it is not
Expand Down
4 changes: 2 additions & 2 deletions source/backend/render/rendertask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace pov
using namespace pov_base;

RenderTask::RenderTask(ViewData *vd, const char* sn, RenderBackend::ViewId vid) :
SceneTask(new ViewThreadData(vd), boost::bind(&RenderTask::SendFatalError, this, _1), sn, vd->GetSceneData(), vid),
SceneTask(new ViewThreadData(vd), std::bind(&RenderTask::SendFatalError, this, std::placeholders::_1), sn, vd->GetSceneData(), vid),
viewData(vd)
{
}
Expand All @@ -67,7 +67,7 @@ RenderTask::~RenderTask()
{
}

shared_ptr<SceneData>& RenderTask::GetSceneData()
std::shared_ptr<SceneData>& RenderTask::GetSceneData()
{
return viewData->GetSceneData();
}
Expand Down
2 changes: 1 addition & 1 deletion source/backend/render/rendertask.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class RenderTask : public SceneTask
virtual void Run() = 0;
virtual void Stopped() = 0;

shared_ptr<SceneData>& GetSceneData();
std::shared_ptr<SceneData>& GetSceneData();
ViewData *GetViewData();

inline ViewThreadData *GetViewDataPtr() { return reinterpret_cast<ViewThreadData *>(GetDataPtr()); }
Expand Down
Loading