Files
Cesarus85--mjolnir-vr/source/render/render.h
T
Berthalamewandpunpckhdq 4817ee1995 console/terminal related work (#8)
* misc changes and additions

formatting changes and add structs/constants for terminal work

* match write_to_error_file and add error_global_data

* console work

* requested changes

* terminal work

100% match all terminal functions

* Formatting

---------

Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
2026-01-06 23:30:12 +00:00

79 lines
1.7 KiB
C

/*
RENDER.H
header included in hcex build.
*/
#ifndef __RENDER_H
#define __RENDER_H
#pragma once
/* ---------- headers */
#include "render_cameras.h"
#include "structures/structures.h"
#include "structures/structure_render.h"
/* ---------- constants */
enum
{
MAXIMUM_RENDERED_DISTANT_LIGHTS= 2,
MAXIMUM_RENDERED_POINT_LIGHTS= 2,
MAXIMUM_RENDERED_ENVIRONMENT_SURFACES= 16384,
MAXIMUM_RENDERED_CLUSTERS= 128,
MAXIMUM_SURFACES_PER_STRUCTURE= 0x20000,
MAXIMUM_RENDERED_LIGHTS= 128,
MAXIMUM_LIGHTS_PER_MAP= 896,
MAXIMUM_LENS_FLARES_PER_LIGHT= 8,
MAXIMUM_QUEUED_LENS_FLARES= 8,
};
/* ---------- macros */
/* ---------- structures */
struct rendered_cluster
{
short cluster_index;
real_rectangle2d clip_bounds;
struct render_frustum frustum;
};
struct render_globals
{
long frame_index;
long scene_index;
short local_player_index;
short window_index;
real time_delta_since_tick_sec;
struct render_camera camera;
struct render_frustum frustum;
struct render_fog fog;
long leaf_index;
long cluster_index;
boolean under_water;
boolean visible_sky_model;
short visible_sky_index;
// Bitvector of all clusters where bit set means the cluster is visible
unsigned long visible_cluster_flags[MAXIMUM_CLUSTERS_PER_STRUCTURE / LONG_BITS];
struct rendered_cluster rendered_clusters[MAXIMUM_RENDERED_CLUSTERS];
short rendered_cluster_count;
unsigned long environment_surface_flags[MAXIMUM_SURFACES_PER_STRUCTURE];
short environment_surface_count;
long environment_surface_indices[MAXIMUM_RENDERED_ENVIRONMENT_SURFACES];
};
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* comm */
struct render_globals render;
/* ---------- public code */
#endif // __RENDER_H