paysages3d/src/render/opengl/OpenGLWater.h

39 lines
824 B
C
Raw Normal View History

2013-12-21 23:41:19 +00:00
#ifndef OPENGLWATER_H
#define OPENGLWATER_H
#include "opengl_global.h"
#include "OpenGLPart.h"
#include "DefinitionWatcher.h"
2013-12-21 23:41:19 +00:00
namespace paysages {
namespace opengl {
class OPENGLSHARED_EXPORT OpenGLWater : public OpenGLPart, public DefinitionWatcher {
public:
OpenGLWater(OpenGLRenderer *renderer);
2013-12-21 23:41:19 +00:00
virtual ~OpenGLWater();
virtual void initialize() override;
virtual void update() override;
virtual void render() override;
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff) override;
2015-08-20 22:25:34 +00:00
/**
* Enable or disable the water surface rendering.
*/
void setEnabled(bool enabled);
private:
2013-12-21 23:41:19 +00:00
void setVertex(int i, float x, float y, float z);
2015-08-20 22:25:34 +00:00
bool enabled;
OpenGLShaderProgram *program;
float *vertices;
2013-12-21 23:41:19 +00:00
};
}
}
#endif // OPENGLWATER_H