35 lines
657 B
C++
35 lines
657 B
C++
//
|
|
// Created by Selim Mustafaev on 10.05.15.
|
|
//
|
|
|
|
#ifndef GLTEST_MESH_H
|
|
#define GLTEST_MESH_H
|
|
|
|
#include "vertex.h"
|
|
#include "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();
|
|
|
|
private:
|
|
std::tuple<Vertex*, std::size_t> generateVertices() const override final;
|
|
std::tuple<GLuint*, std::size_t> 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
|