mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Remove individual dirty flags for ProgramObjects and replace with new Ghoul version
Moved projectiveTexture shader into modules directory
This commit is contained in:
@@ -43,7 +43,6 @@ public:
|
||||
|
||||
private:
|
||||
ghoul::opengl::ProgramObject* _program;
|
||||
bool _programIsDirty;
|
||||
|
||||
std::string _instrumentName;
|
||||
std::string _source;
|
||||
|
||||
@@ -76,7 +76,6 @@ private:
|
||||
properties::StringProperty _seedPointSourceFile;
|
||||
|
||||
ghoul::opengl::ProgramObject* _program;
|
||||
bool _programIsDirty;
|
||||
|
||||
ghoul::Dictionary _vectorFieldInfo;
|
||||
ghoul::Dictionary _fieldlineInfo;
|
||||
|
||||
@@ -40,55 +40,54 @@ namespace ghoul {
|
||||
|
||||
namespace openspace {
|
||||
|
||||
class RenderablePath : public Renderable {
|
||||
public:
|
||||
RenderablePath(const ghoul::Dictionary& dictionary);
|
||||
class RenderablePath : public Renderable {
|
||||
public:
|
||||
RenderablePath(const ghoul::Dictionary& dictionary);
|
||||
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
|
||||
bool isReady() const override;
|
||||
bool isReady() const override;
|
||||
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
|
||||
void calculatePath(std::string observer);
|
||||
private:
|
||||
struct VertexInfo {
|
||||
float x, y, z, e;
|
||||
//float r, g, b, a;
|
||||
};
|
||||
void sendToGPU();
|
||||
void addPosition(psc pos);
|
||||
void addColor(glm::vec4 col);
|
||||
|
||||
glm::vec3 _lineColor;
|
||||
glm::vec4 _lastPosition;
|
||||
properties::FloatProperty _lineFade;
|
||||
properties::FloatProperty _lineWidth;
|
||||
properties::BoolProperty _drawLine;
|
||||
|
||||
ghoul::opengl::ProgramObject* _programObject;
|
||||
bool _programIsDirty;
|
||||
|
||||
bool _successfullDictionaryFetch;
|
||||
|
||||
std::string _target;
|
||||
std::string _observer;
|
||||
std::string _frame;
|
||||
|
||||
GLuint _vaoID;
|
||||
GLuint _vBufferID;
|
||||
|
||||
bool _needsSweep;
|
||||
|
||||
std::vector<VertexInfo> _vertexArray;
|
||||
|
||||
float _increment;
|
||||
double _start;
|
||||
double _stop;
|
||||
float _distanceFade;
|
||||
void calculatePath(std::string observer);
|
||||
private:
|
||||
struct VertexInfo {
|
||||
float x, y, z, e;
|
||||
//float r, g, b, a;
|
||||
};
|
||||
void sendToGPU();
|
||||
void addPosition(psc pos);
|
||||
void addColor(glm::vec4 col);
|
||||
|
||||
glm::vec3 _lineColor;
|
||||
glm::vec4 _lastPosition;
|
||||
properties::FloatProperty _lineFade;
|
||||
properties::FloatProperty _lineWidth;
|
||||
properties::BoolProperty _drawLine;
|
||||
|
||||
ghoul::opengl::ProgramObject* _programObject;
|
||||
|
||||
bool _successfullDictionaryFetch;
|
||||
|
||||
std::string _target;
|
||||
std::string _observer;
|
||||
std::string _frame;
|
||||
|
||||
GLuint _vaoID;
|
||||
GLuint _vBufferID;
|
||||
|
||||
bool _needsSweep;
|
||||
|
||||
std::vector<VertexInfo> _vertexArray;
|
||||
|
||||
float _increment;
|
||||
double _start;
|
||||
double _stop;
|
||||
float _distanceFade;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ private:
|
||||
bool _planeIsDirty;
|
||||
|
||||
ghoul::opengl::ProgramObject* _shader;
|
||||
bool _programIsDirty;
|
||||
bool _textureIsDirty;
|
||||
ghoul::opengl::Texture* _texture;
|
||||
ghoul::filesystem::File* _textureFile;
|
||||
|
||||
@@ -43,57 +43,56 @@ namespace ghoul {
|
||||
}
|
||||
|
||||
namespace openspace {
|
||||
struct LinePoint;
|
||||
struct LinePoint;
|
||||
|
||||
struct target {
|
||||
std::string body;
|
||||
std::string frame;
|
||||
std::string node;
|
||||
};
|
||||
struct target {
|
||||
std::string body;
|
||||
std::string frame;
|
||||
std::string node;
|
||||
};
|
||||
|
||||
class RenderablePlaneProjection : public Renderable {
|
||||
class RenderablePlaneProjection : public Renderable {
|
||||
|
||||
|
||||
public:
|
||||
RenderablePlaneProjection(const ghoul::Dictionary& dictionary);
|
||||
~RenderablePlaneProjection();
|
||||
public:
|
||||
RenderablePlaneProjection(const ghoul::Dictionary& dictionary);
|
||||
~RenderablePlaneProjection();
|
||||
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
bool initialize() override;
|
||||
bool deinitialize() override;
|
||||
|
||||
bool isReady() const override;
|
||||
bool isReady() const override;
|
||||
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
void render(const RenderData& data) override;
|
||||
void update(const UpdateData& data) override;
|
||||
|
||||
private:
|
||||
void loadTexture();
|
||||
void updatePlane(const Image img, double currentTime);
|
||||
std::string findClosestTarget(double currentTime);
|
||||
void setTarget(std::string body);
|
||||
private:
|
||||
void loadTexture();
|
||||
void updatePlane(const Image img, double currentTime);
|
||||
std::string findClosestTarget(double currentTime);
|
||||
void setTarget(std::string body);
|
||||
|
||||
std::string _texturePath;
|
||||
std::string _texturePath;
|
||||
|
||||
bool _planeIsDirty;
|
||||
bool _planeIsDirty;
|
||||
|
||||
glm::dmat3 _stateMatrix;
|
||||
std::string _frame;
|
||||
glm::dmat3 _stateMatrix;
|
||||
std::string _frame;
|
||||
|
||||
ghoul::opengl::ProgramObject* _shader;
|
||||
bool _programIsDirty;
|
||||
bool _textureIsDirty;
|
||||
ghoul::opengl::Texture* _texture;
|
||||
ghoul::filesystem::File* _textureFile;
|
||||
GLuint _quad;
|
||||
GLuint _vertexPositionBuffer;
|
||||
std::string _spacecraft;
|
||||
std::string _instrument;
|
||||
ghoul::opengl::ProgramObject* _shader;
|
||||
bool _textureIsDirty;
|
||||
ghoul::opengl::Texture* _texture;
|
||||
ghoul::filesystem::File* _textureFile;
|
||||
GLuint _quad;
|
||||
GLuint _vertexPositionBuffer;
|
||||
std::string _spacecraft;
|
||||
std::string _instrument;
|
||||
|
||||
double _previousTime;
|
||||
target _target;
|
||||
std::string _name;
|
||||
bool _moving;
|
||||
};
|
||||
double _previousTime;
|
||||
target _target;
|
||||
std::string _name;
|
||||
bool _moving;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
#endif
|
||||
|
||||
@@ -67,7 +67,6 @@ private:
|
||||
|
||||
PowerScaledSphere* _sphere;
|
||||
|
||||
bool _programIsDirty;
|
||||
bool _sphereIsDirty;
|
||||
};
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@ private:
|
||||
properties::BoolProperty _showTimestamps;
|
||||
|
||||
ghoul::opengl::ProgramObject* _programObject;
|
||||
bool _programIsDirty;
|
||||
|
||||
bool _successfullDictionaryFetch;
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ private:
|
||||
std::string _constellationFilename; ///< The file containing constellation names
|
||||
|
||||
ghoul::opengl::ProgramObject* _program;
|
||||
bool _programIsDirty;
|
||||
|
||||
/// The list of all loaded constellation bounds
|
||||
std::vector<ConstellationBound> _constellationBounds;
|
||||
|
||||
@@ -77,7 +77,6 @@ private:
|
||||
properties::FloatProperty _minBillboardSize;
|
||||
|
||||
ghoul::opengl::ProgramObject* _program;
|
||||
bool _programIsDirty;
|
||||
|
||||
std::string _speckFile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user