75 Mesh(
const char *vs_shader,
const char *fs_shader);
76 Mesh(
const char *vs_shader,
const char *tc_shader,
const char *te_shader,
77 const char *geom_shader,
const char *fs_shader);
121 : offset(offset), elems(elems)
153 static constexpr
unsigned lods = 6;
201 this->center =
vec4(center, 1.0
f);
void draw(GLuint ubo, unsigned ubo_offset)
static constexpr float patch_size
GLuint height_displacement
LODMesh(unsigned offset, unsigned elems)
std::vector< Patch > patches
std::vector< float > lod_buffer
GLenum GLuint GLintptr offset
BoundingSphere(vec3 center, vec3 radius)
static constexpr unsigned max_instances
std::vector< Vertex > vertices
static constexpr unsigned blocks_x
bool test_frustum(const vec4 *frustum) const
static constexpr float lod0_distance
void build_lod(unsigned lod)
void calculate_lods(const RenderInfo &info)
float vec_length(const T &vec)
MorphedGeoMipMapMesh & operator=(MorphedGeoMipMapMesh &&)=delete
void bind_textures(const RenderInfo &info)
unsigned displacement_downsample
void render(const RenderInfo &info) override
static constexpr unsigned blocks_z
std::vector< GLushort > indices
virtual void render(const RenderInfo &info)=0
static constexpr unsigned patch_size
static constexpr float lod0_distance
static constexpr unsigned blocks_x
static constexpr unsigned lods
GLint GLint GLint GLint GLint x
static constexpr unsigned blocks_z
std::vector< LOD > lod_meshes
Mesh(const char *vs_shader, const char *fs_shader)
typedef GLuint(GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count
Vertex(GLubyte x, GLubyte y)
void render(const RenderInfo &info) override