2013-12-21 23:41:19 +00:00
|
|
|
#ifndef OPENGLWATER_H
|
|
|
|
#define OPENGLWATER_H
|
|
|
|
|
|
|
|
#include "opengl_global.h"
|
|
|
|
|
|
|
|
#include "OpenGLPart.h"
|
2015-08-17 20:55:30 +00:00
|
|
|
#include "DefinitionWatcher.h"
|
2013-12-21 23:41:19 +00:00
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace opengl {
|
|
|
|
|
2015-08-17 20:55:30 +00:00
|
|
|
class OPENGLSHARED_EXPORT OpenGLWater: public OpenGLPart, public DefinitionWatcher
|
2013-12-21 23:41:19 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
OpenGLWater(OpenGLRenderer* renderer);
|
|
|
|
virtual ~OpenGLWater();
|
|
|
|
|
|
|
|
virtual void initialize() override;
|
|
|
|
virtual void update() override;
|
|
|
|
virtual void render() override;
|
|
|
|
|
2015-08-17 20:55:30 +00:00
|
|
|
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff) override;
|
2013-12-21 23:41:19 +00:00
|
|
|
private:
|
|
|
|
void setVertex(int i, float x, float y, float z);
|
|
|
|
|
|
|
|
OpenGLShaderProgram* program;
|
|
|
|
float* vertices;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // OPENGLWATER_H
|