mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Replaced RuntimeData with separate, temporary structs that are passed around
This commit is contained in:
@@ -29,11 +29,11 @@
|
||||
#include <openspace/rendering/renderable.h>
|
||||
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
// ghoul includes
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
#include <ghoul/opengl/texture.h>
|
||||
#include <openspace/util/runtimedata.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -49,8 +49,8 @@ public:
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
|
||||
void render(const Camera* camera, const psc& thisPosition, RuntimeData* runtimeData) override;
|
||||
void update() override;
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
|
||||
protected:
|
||||
void loadTexture();
|
||||
@@ -62,6 +62,8 @@ private:
|
||||
ghoul::opengl::Texture* _texture;
|
||||
planetgeometry::PlanetGeometry* _geometry;
|
||||
|
||||
glm::dmat3 _stateMatrix;
|
||||
|
||||
std::string _target;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <openspace/util/camera.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <openspace/properties/propertyowner.h>
|
||||
#include <openspace/util/runtimedata.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -51,8 +51,8 @@ public:
|
||||
void setBoundingSphere(const PowerScaledScalar& boundingSphere);
|
||||
const PowerScaledScalar& getBoundingSphere();
|
||||
|
||||
virtual void render(const Camera* camera, const psc& thisPosition, RuntimeData* runtimeData) = 0;
|
||||
virtual void update();
|
||||
virtual void render(const RenderData& data) = 0;
|
||||
virtual void update(const UpdateData& data);
|
||||
|
||||
bool isVisible() const;
|
||||
|
||||
@@ -63,7 +63,6 @@ private:
|
||||
properties::BoolProperty _enabled;
|
||||
|
||||
PowerScaledScalar boundingSphere_;
|
||||
RuntimeData* _runtimeData;
|
||||
std::string _relativePath;
|
||||
};
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
// open space includes
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
// ghoul includes
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
@@ -43,8 +44,8 @@ public:
|
||||
bool initialize();
|
||||
bool deinitialize();
|
||||
|
||||
virtual void render(const Camera *camera, const psc& thisPosition, RuntimeData* runtimeData);
|
||||
virtual void update();
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
|
||||
private:
|
||||
std::vector<std::vector<LinePoint> > getFieldlinesData(std::string filename, ghoul::Dictionary hintsDictionary);
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
// open space includes
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
|
||||
// ghoul includes
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
#include <ghoul/opengl/texture.h>
|
||||
@@ -43,8 +44,8 @@ public:
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
|
||||
void render(const Camera* camera, const psc& position, RuntimeData* runtimeData) override;
|
||||
void update() override;
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
private:
|
||||
protected:
|
||||
typedef struct {
|
||||
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
bool initialize();
|
||||
bool deinitialize();
|
||||
|
||||
virtual void render(const Camera *camera, const psc& thisPosition, RuntimeData* runtimeData);
|
||||
virtual void update();
|
||||
virtual void render(const RenderData& data) override;
|
||||
virtual void update(const UpdateData& data) override;
|
||||
|
||||
private:
|
||||
ghoul::Dictionary _hintsDictionary;
|
||||
@@ -69,7 +69,6 @@ private:
|
||||
float _w;
|
||||
GLint _MVPLocation, _modelTransformLocation, _typeLocation;
|
||||
|
||||
RuntimeData* _runtimeData;
|
||||
bool _updateTransferfunction;
|
||||
int _id;
|
||||
};
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#define __RENDERENGINE_H__
|
||||
|
||||
#include <openspace/scenegraph/scenegraph.h>
|
||||
#include <openspace/util/runtimedata.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -44,7 +43,6 @@ public:
|
||||
|
||||
bool initialize();
|
||||
|
||||
void setRuntimeData(RuntimeData* runtimeData);
|
||||
void setSceneGraph(SceneGraph* sceneGraph);
|
||||
SceneGraph* sceneGraph();
|
||||
|
||||
@@ -63,7 +61,6 @@ public:
|
||||
private:
|
||||
Camera* _mainCamera;
|
||||
SceneGraph* _sceneGraph;
|
||||
RuntimeData* _runtimeData;
|
||||
ABuffer* _abuffer;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
// open space includes
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
|
||||
// ghoul includes
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
#include <ghoul/opengl/texture.h>
|
||||
@@ -43,8 +44,8 @@ public:
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
|
||||
void render(const Camera* camera, const psc& position, RuntimeData* runtimeData) override;
|
||||
void update() override;
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
|
||||
protected:
|
||||
void loadTexture();
|
||||
@@ -72,8 +73,6 @@ private:
|
||||
int v_size;
|
||||
int v_stride;
|
||||
int v_total;
|
||||
|
||||
RuntimeData* _runtimeData;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user