transfered from codeberg

This commit is contained in:
2026-03-26 14:46:39 -05:00
parent 630f28bb7e
commit 5ed2173793
136 changed files with 14932 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include "chunk_renderer.h"
#include "chunk.h"
#include "chunk_position_to_vector_3/chunk_position_to_vector_3.h"
#include "frustum.h"
#include "raylib.h"
/**
* Renders a single chunk to the screen, performing frustum culling
* using the provided array of clipping planes.
*/
void draw_chunk(struct chunk_struct* chunk,
const struct frustum_plane_struct* frustum)
{
if (!is_axis_aligned_bounding_box_in_frustum(frustum, chunk->bounds))
{
return;
}
DrawModel(chunk->model, chunk_position_to_vector_3(chunk->position), 1.0f, WHITE);
}

View File

@@ -0,0 +1,14 @@
#ifndef chunk_renderer_h
#define chunk_renderer_h
struct chunk_struct;
struct frustum_plane_struct;
/**
* Renders a single chunk to the screen, performing frustum culling
* using the provided array of clipping planes.
*/
void draw_chunk(struct chunk_struct* chunk,
const struct frustum_plane_struct* frustum_planes);
#endif