21 #ifndef GROUND_MESH_H__
22 #define GROUND_MESH_H__
25 #include <GLES3/gl3.h>
DrawInfo get_draw_info_vert_fixup(InstanceData *instance_data)
vec2 get_offset_level(const vec2 &camera_pos, unsigned int level)
[Snapping clipmap level to a grid]
void setup_vertex_buffer(unsigned int size)
void setup_block_ranges(unsigned int size)
[Generating index buffer]
void set_frustum(const Frustum &frustum)
DrawInfo get_draw_info_degenerate_top(InstanceData *instance_data)
GLint uniform_buffer_align
DrawInfo get_draw_info_trim_bottom_left(InstanceData *instance_data)
GLenum GLuint GLintptr offset
Frustum view_proj_frustum
DrawInfo get_draw_info_degenerate_bottom(InstanceData *instance_data)
void setup_uniform_buffer()
DrawInfo get_draw_info_trim_top_left(InstanceData *instance_data)
size_t uniform_buffer_offset
bool(* TrimConditional)(const vec2 &offset)
DrawInfo get_draw_info_degenerate_left(InstanceData *instance_data)
DrawInfo get_draw_info_horiz_fixup(InstanceData *instance_data)
void update_level_offsets(const vec2 &camera_pos)
[Snapping clipmap level to a grid]
DrawInfo get_draw_info_degenerate_right(InstanceData *instance_data)
DrawInfo get_draw_info_trim(InstanceData *instance_data, const Block &block, TrimConditional cond)
DrawInfo get_draw_info_degenerate(InstanceData *instance_data, const Block &block, const vec2 &offset, const vec2 &ring_offset)
size_t index_buffer_offset
DrawInfo get_draw_info_trim_top_right(InstanceData *instance_data)
void setup_index_buffer(unsigned int size)
GroundMesh(unsigned int size, unsigned int levels, float clip_scale)
void render()
[Rendering the entire terrain]
DrawInfo get_draw_info_blocks(InstanceData *instance_data)
void setup_vertex_array()
std::vector< DrawInfo > draw_list
const std::vector< vec2 > & get_level_offsets() const
GLenum GLuint GLintptr GLsizeiptr size
std::vector< vec2 > level_offsets
void render_draw_list()
[Rendering the entire terrain]
GLenum GLuint GLint level
bool intersects_frustum(const vec2 &offset, const vec2 &range, unsigned int level)
typedef GLuint(GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count
size_t uniform_buffer_size
DrawInfo get_draw_info_trim_full(InstanceData *instance_data)
DrawInfo get_draw_info_trim_bottom_right(InstanceData *instance_data)