aboutsummaryrefslogtreecommitdiff
#ifndef TERRAIN_H
#define TERRAIN_H

#include "renderer/renderer_types.h"
#include "math/vector.h"

typedef struct
{
    Texture *texture[4];
} TerrainTexturePack;

typedef struct
{
    Mesh *mesh;
    Texture *blendmap;
    TerrainTexturePack textures;

    GLfloat *height;
    int w, l;
    Vec3 position;
} Terrain;

extern Terrain *Terrain_Create( int w, int l, const char* heightmap_path, Texture *blendmap, TerrainTexturePack *textures);
extern GLfloat Terrain_GetHeightOfTerrain(Terrain *terrain, GLfloat x, GLfloat z);
extern void Terrain_Destroy( Terrain *terrain );

#endif // TERRAIN_H