gltest/src/GLObjects/Mesh.h

31 lines
564 B
C++

#ifndef GLTEST_MESH_H
#define GLTEST_MESH_H
#include "vertex.h"
#include "../Shaders/ShaderProgram.h"
#include "GLObject.h"
#include <cstddef>
#include <GL/glew.h>
#include <glm/glm.hpp>
class Mesh: public GLObject {
protected:
std::size_t _size;
public:
Mesh(ShaderProgram* shader, std::size_t size);
virtual ~Mesh();
protected:
void generateVertices() const override final;
void generateIndices() const override final;
protected:
virtual float heightMapFunc(std::size_t nx, std::size_t ny, float fx, float fy) const = 0;
};
#endif //GLTEST_MESH_H