Remove individual dirty flags for ProgramObjects and replace with new Ghoul version

Moved projectiveTexture shader into modules directory
This commit is contained in:
Alexander Bock
2015-05-20 10:33:36 +02:00
parent abc8f7a5d8
commit 18752b9d8b
25 changed files with 109 additions and 154 deletions

View File

@@ -43,7 +43,6 @@ public:
private:
ghoul::opengl::ProgramObject* _program;
bool _programIsDirty;
std::string _instrumentName;
std::string _source;

View File

@@ -76,7 +76,6 @@ private:
properties::StringProperty _seedPointSourceFile;
ghoul::opengl::ProgramObject* _program;
bool _programIsDirty;
ghoul::Dictionary _vectorFieldInfo;
ghoul::Dictionary _fieldlineInfo;

View File

@@ -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

View File

@@ -75,7 +75,6 @@ private:
bool _planeIsDirty;
ghoul::opengl::ProgramObject* _shader;
bool _programIsDirty;
bool _textureIsDirty;
ghoul::opengl::Texture* _texture;
ghoul::filesystem::File* _textureFile;

View File

@@ -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

View File

@@ -67,7 +67,6 @@ private:
PowerScaledSphere* _sphere;
bool _programIsDirty;
bool _sphereIsDirty;
};

View File

@@ -66,7 +66,6 @@ private:
properties::BoolProperty _showTimestamps;
ghoul::opengl::ProgramObject* _programObject;
bool _programIsDirty;
bool _successfullDictionaryFetch;

View File

@@ -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;

View File

@@ -77,7 +77,6 @@ private:
properties::FloatProperty _minBillboardSize;
ghoul::opengl::ProgramObject* _program;
bool _programIsDirty;
std::string _speckFile;