Untitled
Loading...
Searching...
No Matches
Editor System

All of the required structures for the Editor system. More...

Data Structures

struct  EditorSettings
 Editor settings and engine global variables that can be changed through the editor. More...
struct  ComboLabel
 The structure used for some dropdown abstractions in the Editor UI. More...
struct  MainEditorMenu
struct  LightEditorMenu
struct  LProbeEditorMenu
struct  AProbeEditorMenu
struct  UIElementEditorMenu
struct  AssetInstanceEditorMenu
struct  MeshNodeEditorMenu
struct  TextBoxEditorMenu
struct  UndoStructure
struct  Undo
struct  NKSlider

Macros

#define MAX_GLTF_NAMES   256
#define MAX_RPROBE_NAMES   256
#define MAX_UNDO_BYTES   50000
#define MAX_UNDOS   256
#define CAST_SPECIAL(type, special)

Enumerations

enum  UndoStructureType {
  UNDOSTRUCT_MN , UNDOSTRUCT_UI_ELEMENT , UNDOSTRUCT_UI_CONTAINER , UNDOSTRUCT_TEXTBOX , UNDOSTRUCT_LIGHT , UNDOSTRUCT_GLOBAL , UNDOSTRUCT_EDITOR_SETTINGS , UNDOSTRUCT_ENTITY ,
  UNDOSTRUCT_MATERIAL , UNDOSTRUCT_RPROBE , UNDOSTRUCT_LPROBE , UNDOSTRUCT_APROBE , UNDOSTRUCT_AEMITTER , UNDOSTRUCT_APORTAL , UNDOSTRUCT_MENU , UNDOSTRUCT_ASSETINSTANCE
}
enum  UndoValue { UNDOVAL_NONE , UNDOVAL_INT , UNDOVAL_FLOAT , UNDOVAL_VEC2 , UNDOVAL_VEC3 , UNDOVAL_VEC4 }
enum  UndoSpecial {
  UNDOSPECIAL_NONE , UNDOEDITORSETTINGS_FULLSCREENOPT , UNDOEDITORSETTINGS_SCREEN_RES , UNDOEDITORSETTINGS_RENDER_RES , UNDOEDITORSETTINGS_SSAO_RES , UNDOEDITORSETTINGS_DOF_RES , UNDOEDITORSETTINGS_BLOOM_RES , UNDOEDITORSETTINGS_HALFSIZE_EFFECTS ,
  UNDOASSETINSTANCE_ROTATION_ANGLE , UNDOASSETINSTANCE_MAT , UNDOMN_ROTATION_ANGLE , UNDOMN_MAT , UNDOMN_CHANGE_MATERIAL , UNDOAPORTAL_SPAWN , UNDOAPORTAL_DELETE , UNDOAEMITTER_SPAWN ,
  UNDOAEMITTER_DELETE_SOUND_OBJ , UNDOAEMITTER_LOAD_SOUND_OBJ , UNDOAEMITTER_DELETE_EMITTER , UNDOAEMITTER_PLAY_EMITTER , UNDOAEMITTER_STOP_EMITTER , UNDOAEMITTER_OBB_ROT , UNDOAPROBE_RESET_APVS , UNDOAPROBE_SPAWN_APV ,
  UNDOAPROBE_RESET_APV_SIZE , UNDOAPROBE_DELETE_APV , UNDOAPROBE_BAKE_APV , UNDOAPROBE_OBB_ROT , UNDOLPROBE_SPAWN , UNDOLPROBE_RESET_LPVS , REDOLPROBE_RESET_LPVS , UNDOLPROBE_RESET_LPV_SIZE ,
  UNDOLPROBE_DELETE , UNDOLPROBE_BAKE , UNDOLPROBE_OBB_ROT , UNDORPROBE_SPAWN , UNDORPROBE_DELETE , UNDOLIGHT_SPAWN , UNDOLIGHT_DELETE , UNDOGLOBAL_SPAWN_ASSET_INSTANCE ,
  UNDOUIELEMENT_CREATE_ELEMENT , UNDOUIELEMENT_DELETE_ELEMENT , UNDOUIELEMENT_CHANGE_CONTAINER , UNDOUIELEMENT_REMOVE_FROM_CONTAINER , REDOUIELEMENT_ADD_TO_CONTAINER , UNDOUIELEMENT_CREATE_CONTAINER , UNDOUIELEMENT_DELETE_CONTAINER , UNDOUIELEMENT_CREATE_LABEL ,
  UNDOUIELEMENT_JUSTIFY_LABEL , UNDOUICONTAINER_CHANGE_SCROLLBAR , UNDOTEXTBOX_CREATE_TEXT_BOX , UNDOTEXTBOX_DELETE_TEXT_BOX , UNDOTEXTBOX_CHANGE_TEXT , UNDOTEXTBOX_CHANGE_CONTAINER , UNDOTEXTBOX_REMOVE_FROM_CONTAINER , UNDOTEXTBOX_ADD_TO_CONTAINER
}

Functions

void change_fullscreen_option (FullscreenOptions option)
void change_render_resolution ()
void change_ssao_res (int w, int h)
void change_dof_res (int w, int h)
void change_bloom_res (int w, int h)
void UNDO_INIT ()
 Initializes Undos inside of UNDOS to free state.
void clear_special_undo_bytes (Undo *undo)
void clear_undo (Undo *undo)
void destroy_undo (Undo *undo)
Undo * find_last_undo ()
Undo * find_empty_undo ()
void link_undo (Undo *undo)
void check_stack_size ()
void perform_newest_undo ()
 Performs top-most Undo and moves the top-most pointer to the previous.
void perform_newest_redo ()
 Performs top-most Redo (Undo->next) and moves pointers upward.
void destroy_redo_history ()
void push_nk_slider_undo (NKSlider *s, UndoStructure structure, size_t byte_offset)
void push_raw_bytes_undo (void *bytes, size_t byte_size, UndoStructure structure, size_t byte_offset)
void push_special_undo (UndoStructure structure, uint8_t **bytes, size_t total_byte_size, size_t bytes_count, size_t byte_offset)
void push_special_undo_normal_bytes (UndoStructure structure, void *bytes, size_t byte_size, size_t byte_offset)
UndoStructure create_undo_structure (UndoStructureType type, int id[8], UndoSpecial special)
UndoStructure create_singular_id_undo_structure (UndoStructureType type, int id, UndoSpecial special)
UndoStructure create_light_undo_structure (int id, UndoSpecial special)
void copy_special_undo (Undo *undo, uint8_t ***special_bytes, int ids[8])
void execute_non_special_undo (Undo *undo, uint8_t *p)
void execute_light_undo (Undo *undo)
void execute_globals_undo (Undo *undo)
UndoStructure create_editor_settings_undo_structure (UndoSpecial special)
void execute_editor_settings_undo (Undo *undo)
UndoStructure create_rprobe_undo_structure (int id, UndoSpecial special)
void execute_rprobe_undo (Undo *undo)
void execute_lprobe_undo (Undo *undo)
void execute_aprobe_undo (Undo *undo)
void execute_aemitter_undo (Undo *undo)
void execute_aportal_undo (Undo *undo)
void execute_ui_menu_undo (Undo *undo)
void execute_ui_element_undo (Undo *undo)
void execute_ui_container_undo (Undo *undo)
void execute_text_box_undo (Undo *undo)
void execute_asset_instance_undo (Undo *undo)
void execute_mesh_node_undo (Undo *undo)
void execute_undo (Undo *undo)
 Performs an Undo (switch-case into each UndoStructureType).
void store_into_nkslider (NKSlider *s, void *bytes, size_t byte_size)
void toggle_performance_overlay ()
 Toggles the performance overlay menu: PERFORMANCE_OVERLAY_MENU.
void update_performance_overlay (GLuint64 query_s[PQUERY_MAX])
 Fills performance overlay with text based on current GPU profiling information.
void create_performance_overlay ()
 Allocates and initializes position of the TextBoxes for the performance overlay.
bool nk_check_equivalency (void *a, void *b, size_t byte_size, NKSlider *s, bool *dirty)
bool check_equivalencyv3 (vec3 *a, vec3 b, NKSlider *s, bool *dirty)
bool check_equivalencyv4 (vec4 *a, vec4 b, NKSlider *s, bool *dirty)
bool check_equivalencyf (float *a, float b, NKSlider *s, bool *dirty)
bool check_equivalencyi (int *a, int b, NKSlider *s, bool *dirty)
void FILE_DIR_REGISTRY_INIT ()
 Initializes each FileDirectoryRegistry based on initial paths.
void load_filenames (FileDirectoryRegistry *registry)
void load_rprobe_filenames (const char *folder_path)
void load_gltf_filenames (const char *folder_path)
void render_entity_menu ()
void render_file_directory_dropdown (FileDirectoryRegistry *registry)
void render_dropdown_labels (int *selected, char **options, int option_count)
void render_dropdown (const char *dropdown_name, int *selected, char **options, int option_count, int x, int y)
mat3 mat3_rotation_x (float angle_radians)
mat3 mat3_rotation_y (float angle_radians)
mat3 mat3_rotation_z (float angle_radians)
void obb_orthonormalize (OBB *obb)
void render_ivec3_widget (const char *name, UndoStructureType undo_type, int id, ivec3 *vec, NKSlider *sliders)
void render_pos_widget (const char *name, UndoStructureType undo_type, int id, vec3 *pos, NKSlider *sliders)
void render_aabb_widget (const char *name, AABB *aabb)
void render_mat4_widget (const char *name, UndoStructureType undo_type, int id, mat4 *mat, vec3 *tr, vec4 *rot, vec3 *sc, NKSlider *sliders)
void render_obb_widget (const char *name, UndoStructureType undo_type, int id, OBB *obb, NKSlider *sliders)
void render_selection_menu ()
void render_text_menu ()
void render_ui_menu ()
void render_audio_menu ()
void render_lprobe_menu ()
void render_main_menu ()
void render_mn_menu ()
void render_material_menu ()
void render_light_menu ()
void render_asset_instance_menu ()
void render_editor_menu ()
 Renders the editor menus.

Variables

LightEditorMenu LIGHT_MENU = {0}
MainEditorMenu MAIN_MENU = {0}
LProbeEditorMenu LPROBE_MENU = {0}
AProbeEditorMenu APROBE_MENU = {0}
UIElementEditorMenu UIELEMENT_MENU = {0}
TextBoxEditorMenu TEXTBOX_MENU = {0}
AssetInstanceEditorMenu AI_MENU = {0}
MeshNodeEditorMenu MN_MENU = {0}
char gltf_names [256][256]
int gltf_names_count = 0
char rprobe_names [256][256]
int rprobe_names_count = 0
FileDirectoryRegistry scene_registry = {0}
FileDirectoryRegistry lightmap_registry = {0}
FileDirectoryRegistry light_registry = {0}
FileDirectoryRegistry sound_registry = {0}
FileDirectoryRegistry aportal_registry = {0}
FileDirectoryRegistry rprobe_registry = {0}
FileDirectoryRegistry lprobe_registry = {0}
FileDirectoryRegistry aprobe_registry = {0}
FileDirectoryRegistry scene_apv_registry = {0}
FileDirectoryRegistry scene_lpv_registry = {0}
FileDirectoryRegistry ui_registry = {0}
Undo UNDOS [MAX_UNDOS] = {0}
int undo_stack_idx = 0
size_t undo_stack_size = 0
Undo * top_undo = NULL
Undo * next_redo = NULL
const char QUERY_NAMES [PQUERY_MAX][256]
nk_bool gltf_file_names_open = nk_false
nk_bool rprobe_file_names_open = nk_false
const char target_types [4][256]
const char menu_names [][256]
 The array for all editor menu names (to avoid Nuklear hashing problems).
int tb_id_flags = NK_EDIT_INACTIVE
int tb_text_flags = NK_EDIT_INACTIVE
int tb_cont_flags = NK_EDIT_INACTIVE
int ui_menu_id_flags = NK_EDIT_INACTIVE
int ui_id_flags = NK_EDIT_INACTIVE
int ui_parent_cont_flags = NK_EDIT_INACTIVE
int ui_cont_flags = NK_EDIT_INACTIVE
int ui_scrollbar_flags = NK_EDIT_INACTIVE
int ui_label_id_flags = NK_EDIT_INACTIVE
int aportal_flags = NK_EDIT_INACTIVE
int apv_flags = NK_EDIT_INACTIVE
int scene_apv_flags = NK_EDIT_INACTIVE
int lpv_flags = NK_EDIT_INACTIVE
int scene_lpv_flags = NK_EDIT_INACTIVE
int scene_name_flags = NK_EDIT_INACTIVE
int scene_file_name_flags = NK_EDIT_INACTIVE
int ui_name_flags = NK_EDIT_INACTIVE
int rprobe_name_flags = NK_EDIT_INACTIVE
int light_name_flags = NK_EDIT_INACTIVE
int lm_name_flags = NK_EDIT_INACTIVE
char aportal_name_buffer [256]
char light_name_buffer [256]
char aprobe_name_buffer [256]
char lprobe_name_buffer [256]
char scene_apv_name_buffer [256]
char scene_lpv_name_buffer [256]
char text_container_buffer [256]
char text_id_buffer [256]
char menu_id_buffer [256]
char element_id_buffer [256]
char element_parent_container_buffer [256]
char element_cid_buffer [256]
char scrollbar_buffer [256]
char label_id_buffer [256]
const char * MSAA_OPTIONS []

FileDirectoryRegistries

All of the registries used for parsing working directories.

FileDirectoryRegistry lightmap_registry
FileDirectoryRegistry light_registry
FileDirectoryRegistry sound_registry
FileDirectoryRegistry aportal_registry
FileDirectoryRegistry rprobe_registry
FileDirectoryRegistry lprobe_registry
FileDirectoryRegistry aprobe_registry
FileDirectoryRegistry scene_apv_registry
FileDirectoryRegistry ui_registry

Editor Wireframe Sizes

Sizes of wireframes for various engine structures.

#define EDITOR_LIGHT_SIZE   0.5f
#define EDITOR_RPROBE_SIZE   0.5f
#define EDITOR_AUDIO_EMITTER_SIZE   0.5f
#define EDITOR_APROBE_SIZE   0.1f
#define EDITOR_APORTAL_SIZE   0.2f

Detailed Description

All of the required structures for the Editor system.

The structures, functions, constants, and variables within the editor system.

All of these track slider states in the editor UI so that Undos with current values can be pushed when sliders start.


Data Structure Documentation

◆ EditorSettings

struct EditorSettings

Editor settings and engine global variables that can be changed through the editor.

Also houses flags and indices for the editor UI.

See also
editor/editor.c

Definition at line 668 of file engine_types.h.

Data Fields
DebugView current_debug_view
PostprocessDView pp_dview
bool editor_menu_open
bool editor_mode
bool mesh_node_menu_open
bool material_menu_open
bool light_menu_open
bool main_menu_open
bool entity_menu_open
bool text_menu_open
bool audio_menu_open
bool selection_menu_open
bool lprobe_menu_open
bool ui_menu_open
bool asset_instance_menu_open
bool opening_menu
SelectionMode SELMODE
bool element_drag_mode
bool text_box_drag_mode
bool SSAO
bool SSR
bool DOF
bool MBLUR
bool TAA
bool BLOOM
bool MSAA
bool VSYNC
bool NOISE
bool LUT
bool ACES
bool UI
bool FULL_GBUFFER
bool dof_expanded
float DOF_fstop
float DOF_focal_length
float DOF_sensor_height
float DOF_max_blur_radius
bool wireframe_toggled Shows wireframes around many structures: Lights, ReflectionProbes, AudioProbes, AudioPortals, AABBs, etc.
int res_width Tracks rendering dimensions in editor menu.
See also
render_main_menu()
int res_height
int selected_material_mn_id
int selected_sm_id
int selected_gltf_file_id
int selected_rprobe_file_id
int selected_asset_id
int selected_light_id
int selected_mn_id
int selected_ent_id
int selected_text_id
int selected_audio_emitter_id
int selected_audio_portal_id
int selected_audio_probe_volume_id
int selected_lighting_probe_volume_id
int selected_fullscreen_option
int current_fullscreen_option
int selected_ui_element_id
int selected_ui_menu_id
int selected_ui_action_id
int selected_ui_hover_id
int selected_asset_instance_id
int selected_asset_instance_mn_id
int selected_r_probe
vec3 rotation_axis The rotation axis for rotation operations in the editor.
float rotation_angle The current angle for rotation operations in the editor.
bool audio_probe_volume_overlay
bool lighting_probe_volume_overlay
int lm_iterations The amount of iterations to bake a lightmap.
int probe_iterations The amount of iterations to bake each probe.
float texels_per_uv_unit Controls the texel density of the uv lightmapper.
float ao_threshold Controls the distance threshold for AO detection.
int ao_iterations Controls how many iterations per lightmap iteration perform the AO check.
bool mfactor_enabled Controls how many iterations per lightmap iteration perform the AO check.
float mfactor Controls how many iterations per lightmap iteration perform the AO check.
int audio_probe_iterations The amount of iterations (sample rays) to bake per AudioProbe.
int audio_probe_bounces The amount of bounces to accept per AudioProbe iteration.
float render_framerate_target The target framerate for rendering and processing ui events (a cap).
float reverb_wet Controls the volume of the reverb signal.
float volume Controls the engine volume.
float obb_axis_x_angle
float obb_axis_y_angle
float obb_axis_z_angle
AABB lm_aabb The AABB that sizes the current lightmap in world space.
size_t undo_stack_max_byte_size The maximum memory value for the Undo stack.

◆ ComboLabel

struct ComboLabel

The structure used for some dropdown abstractions in the Editor UI.

See also
editor/editor.c

Definition at line 1550 of file engine_types.h.

Data Fields
char buffer[600][256]
const char * ptrs[600]
int selected
int item_to_id[600]
int item_count

◆ MainEditorMenu

struct MainEditorMenu

Definition at line 3209 of file engine_types.h.

Data Fields
NKSlider res_width
NKSlider res_height
NKSlider focal_length
NKSlider fstop
NKSlider sensor_height
NKSlider blur_radius

◆ LightEditorMenu

struct LightEditorMenu

Definition at line 3222 of file engine_types.h.

Data Fields
NKSlider color_r
NKSlider color_g
NKSlider color_b
NKSlider x
NKSlider y
NKSlider z
NKSlider rx
NKSlider ry
NKSlider rz
NKSlider intensity
NKSlider threshold
NKSlider cone_angle
NKSlider penumbra
NKSlider light_type
NKSlider mfactor
NKSlider mfactor_enabled
NKSlider texels_per_unit
NKSlider lm_iterations
NKSlider probe_iterations
NKSlider ao_iterations
NKSlider ao_threshold
NKSlider lm_aabbx
NKSlider lm_aabby
NKSlider lm_aabbz
NKSlider aabbe_x
NKSlider aabbe_y
NKSlider aabbe_z
NKSlider rp_aabbx
NKSlider rp_aabby
NKSlider rp_aabbz
NKSlider rp_aabbe_x
NKSlider rp_aabbe_y
NKSlider rp_aabbe_z
NKSlider rp_fade_x
NKSlider rp_fade_y
NKSlider rp_fade_z
NKSlider rp_capposx
NKSlider rp_capposy
NKSlider rp_capposz
NKSlider center_pos

◆ LProbeEditorMenu

struct LProbeEditorMenu

Definition at line 3284 of file engine_types.h.

Data Fields
NKSlider OBB_sliders[9]

◆ AProbeEditorMenu

struct AProbeEditorMenu

Definition at line 3291 of file engine_types.h.

Data Fields
NKSlider iterations
NKSlider bounces
NKSlider volume
NKSlider wet
NKSlider aportal_pos[3]
NKSlider emitter_pos[3]
NKSlider emitter_vol
NKSlider apv_res[3]
NKSlider OBB_sliders[9]

◆ UIElementEditorMenu

struct UIElementEditorMenu

Definition at line 3311 of file engine_types.h.

Data Fields
NKSlider x
NKSlider y
NKSlider z
NKSlider sx
NKSlider sy
NKSlider radius
NKSlider angle
NKSlider sizex
NKSlider sizey
NKSlider layer
NKSlider color
NKSlider fill
NKSlider shadow_dist
NKSlider shadow_dirx
NKSlider shadow_diry
NKSlider cpadl
NKSlider cpadr
NKSlider cpadu
NKSlider cpadd
NKSlider cpad
NKSlider cscrollx
NKSlider cscrolly
NKSlider sliderx
NKSlider slidery
NKSlider slidermin
NKSlider slidermax
NKSlider sliderlen
NKSlider sliderscrollscale

◆ AssetInstanceEditorMenu

struct AssetInstanceEditorMenu

Definition at line 3358 of file engine_types.h.

Data Fields
NKSlider model[10]

◆ MeshNodeEditorMenu

struct MeshNodeEditorMenu

Definition at line 3365 of file engine_types.h.

Data Fields
NKSlider model[10]

◆ TextBoxEditorMenu

struct TextBoxEditorMenu

Definition at line 3372 of file engine_types.h.

Data Fields
NKSlider translation
NKSlider angle
NKSlider scale
NKSlider text_size
NKSlider layer
NKSlider color
NKSlider fill
NKSlider shadow_dist
NKSlider shadow_dirx
NKSlider shadow_diry

◆ UndoStructure

struct UndoStructure

Definition at line 166 of file types.h.

Data Fields
UndoStructureType type
UndoSpecial special
int ids[8]

◆ Undo

struct Undo

Definition at line 176 of file types.h.

Data Fields
bool free
size_t special_count
size_t byte_size
size_t byte_offset
uint32_t id
Undo * prev
Undo * next
uint8_t ** special_bytes
UndoStructure structure
uint8_t bytes[50000]

◆ NKSlider

struct NKSlider

Definition at line 193 of file types.h.

Data Fields
bool is_held
uint8_t bytes[50000]
size_t byte_size

Macro Definition Documentation

◆ EDITOR_LIGHT_SIZE

#define EDITOR_LIGHT_SIZE   0.5f

Definition at line 140 of file engine_types.h.

Referenced by render().

◆ EDITOR_RPROBE_SIZE

#define EDITOR_RPROBE_SIZE   0.5f

Definition at line 142 of file engine_types.h.

◆ EDITOR_AUDIO_EMITTER_SIZE

#define EDITOR_AUDIO_EMITTER_SIZE   0.5f

Definition at line 144 of file engine_types.h.

Referenced by render().

◆ EDITOR_APROBE_SIZE

#define EDITOR_APROBE_SIZE   0.1f

Definition at line 146 of file engine_types.h.

Referenced by render_probe_volume().

◆ EDITOR_APORTAL_SIZE

#define EDITOR_APORTAL_SIZE   0.2f

Definition at line 148 of file engine_types.h.

Referenced by process_sdl_event(), and render().

◆ MAX_GLTF_NAMES

#define MAX_GLTF_NAMES   256

Definition at line 45 of file editor.c.

◆ MAX_RPROBE_NAMES

#define MAX_RPROBE_NAMES   256

Definition at line 48 of file editor.c.

◆ MAX_UNDO_BYTES

#define MAX_UNDO_BYTES   50000

Definition at line 95 of file types.h.

Referenced by execute_non_special_undo().

◆ MAX_UNDOS

#define MAX_UNDOS   256

Definition at line 96 of file types.h.

Referenced by find_empty_undo(), and UNDO_INIT().

◆ CAST_SPECIAL

#define CAST_SPECIAL ( type,
special )
Value:
((UndoSpecial)((type)special))
UndoSpecial
Definition types.h:103

Definition at line 100 of file types.h.

Enumeration Type Documentation

◆ UndoStructureType

Enumerator
UNDOSTRUCT_MN 
UNDOSTRUCT_UI_ELEMENT 
UNDOSTRUCT_UI_CONTAINER 
UNDOSTRUCT_TEXTBOX 
UNDOSTRUCT_LIGHT 
UNDOSTRUCT_GLOBAL 
UNDOSTRUCT_EDITOR_SETTINGS 
UNDOSTRUCT_ENTITY 
UNDOSTRUCT_MATERIAL 
UNDOSTRUCT_RPROBE 
UNDOSTRUCT_LPROBE 
UNDOSTRUCT_APROBE 
UNDOSTRUCT_AEMITTER 
UNDOSTRUCT_APORTAL 
UNDOSTRUCT_MENU 
UNDOSTRUCT_ASSETINSTANCE 

Definition at line 59 of file types.h.

◆ UndoValue

enum UndoValue
Enumerator
UNDOVAL_NONE 
UNDOVAL_INT 
UNDOVAL_FLOAT 
UNDOVAL_VEC2 
UNDOVAL_VEC3 
UNDOVAL_VEC4 

Definition at line 83 of file types.h.

◆ UndoSpecial

Enumerator
UNDOSPECIAL_NONE 
UNDOEDITORSETTINGS_FULLSCREENOPT 
UNDOEDITORSETTINGS_SCREEN_RES 
UNDOEDITORSETTINGS_RENDER_RES 
UNDOEDITORSETTINGS_SSAO_RES 
UNDOEDITORSETTINGS_DOF_RES 
UNDOEDITORSETTINGS_BLOOM_RES 
UNDOEDITORSETTINGS_HALFSIZE_EFFECTS 
UNDOASSETINSTANCE_ROTATION_ANGLE 
UNDOASSETINSTANCE_MAT 
UNDOMN_ROTATION_ANGLE 
UNDOMN_MAT 
UNDOMN_CHANGE_MATERIAL 
UNDOAPORTAL_SPAWN 
UNDOAPORTAL_DELETE 
UNDOAEMITTER_SPAWN 
UNDOAEMITTER_DELETE_SOUND_OBJ 
UNDOAEMITTER_LOAD_SOUND_OBJ 
UNDOAEMITTER_DELETE_EMITTER 
UNDOAEMITTER_PLAY_EMITTER 
UNDOAEMITTER_STOP_EMITTER 
UNDOAEMITTER_OBB_ROT 
UNDOAPROBE_RESET_APVS 
UNDOAPROBE_SPAWN_APV 
UNDOAPROBE_RESET_APV_SIZE 
UNDOAPROBE_DELETE_APV 
UNDOAPROBE_BAKE_APV 
UNDOAPROBE_OBB_ROT 
UNDOLPROBE_SPAWN 
UNDOLPROBE_RESET_LPVS 
REDOLPROBE_RESET_LPVS 
UNDOLPROBE_RESET_LPV_SIZE 
UNDOLPROBE_DELETE 
UNDOLPROBE_BAKE 
UNDOLPROBE_OBB_ROT 
UNDORPROBE_SPAWN 
UNDORPROBE_DELETE 
UNDOLIGHT_SPAWN 
UNDOLIGHT_DELETE 
UNDOGLOBAL_SPAWN_ASSET_INSTANCE 
UNDOUIELEMENT_CREATE_ELEMENT 
UNDOUIELEMENT_DELETE_ELEMENT 
UNDOUIELEMENT_CHANGE_CONTAINER 
UNDOUIELEMENT_REMOVE_FROM_CONTAINER 
REDOUIELEMENT_ADD_TO_CONTAINER 
UNDOUIELEMENT_CREATE_CONTAINER 
UNDOUIELEMENT_DELETE_CONTAINER 
UNDOUIELEMENT_CREATE_LABEL 
UNDOUIELEMENT_JUSTIFY_LABEL 
UNDOUICONTAINER_CHANGE_SCROLLBAR 
UNDOTEXTBOX_CREATE_TEXT_BOX 
UNDOTEXTBOX_DELETE_TEXT_BOX 
UNDOTEXTBOX_CHANGE_TEXT 
UNDOTEXTBOX_CHANGE_CONTAINER 
UNDOTEXTBOX_REMOVE_FROM_CONTAINER 
UNDOTEXTBOX_ADD_TO_CONTAINER 

Definition at line 102 of file types.h.

Function Documentation

◆ change_fullscreen_option()

◆ change_render_resolution()

◆ change_ssao_res()

void change_ssao_res ( int w,
int h )

◆ change_dof_res()

void change_dof_res ( int w,
int h )

◆ change_bloom_res()

void change_bloom_res ( int w,
int h )

◆ UNDO_INIT()

void UNDO_INIT ( )

Initializes Undos inside of UNDOS to free state.

Definition at line 155 of file editor.c.

References Undo::free, Undo::id, MAX_UNDOS, Undo::next, Undo::prev, top_undo, UNDO_INIT(), and UNDOS.

Referenced by init(), and UNDO_INIT().

◆ clear_special_undo_bytes()

◆ clear_undo()

void clear_undo ( Undo * undo)

◆ destroy_undo()

void destroy_undo ( Undo * undo)

Definition at line 201 of file editor.c.

References clear_undo(), destroy_undo(), Undo::next, and Undo::prev.

Referenced by check_stack_size(), destroy_undo(), and find_empty_undo().

◆ find_last_undo()

Undo * find_last_undo ( )

Definition at line 221 of file editor.c.

References find_last_undo(), Undo::prev, undo_stack_idx, and UNDOS.

Referenced by find_empty_undo(), and find_last_undo().

◆ find_empty_undo()

◆ link_undo()

◆ check_stack_size()

◆ perform_newest_undo()

void perform_newest_undo ( )

Performs top-most Undo and moves the top-most pointer to the previous.

Definition at line 287 of file editor.c.

References execute_undo(), next_redo, perform_newest_undo(), Undo::prev, and top_undo.

Referenced by perform_newest_undo(), and process_input().

◆ perform_newest_redo()

void perform_newest_redo ( )

Performs top-most Redo (Undo->next) and moves pointers upward.

Definition at line 303 of file editor.c.

References execute_undo(), Undo::next, next_redo, perform_newest_redo(), and top_undo.

Referenced by perform_newest_redo(), and process_input().

◆ destroy_redo_history()

◆ push_nk_slider_undo()

◆ push_raw_bytes_undo()

◆ push_special_undo()

◆ push_special_undo_normal_bytes()

void push_special_undo_normal_bytes ( UndoStructure structure,
void * bytes,
size_t byte_size,
size_t byte_offset )

◆ create_undo_structure()

◆ create_singular_id_undo_structure()

UndoStructure create_singular_id_undo_structure ( UndoStructureType type,
int id,
UndoSpecial special )

◆ create_light_undo_structure()

UndoStructure create_light_undo_structure ( int id,
UndoSpecial special )

◆ copy_special_undo()

void copy_special_undo ( Undo * undo,
uint8_t *** special_bytes,
int ids[8] )

Definition at line 430 of file editor.c.

References Undo::byte_size, copy_special_undo(), and Undo::special_count.

Referenced by copy_special_undo().

◆ execute_non_special_undo()

◆ execute_light_undo()

◆ execute_globals_undo()

◆ create_editor_settings_undo_structure()

UndoStructure create_editor_settings_undo_structure ( UndoSpecial special)

◆ execute_editor_settings_undo()

◆ create_rprobe_undo_structure()

UndoStructure create_rprobe_undo_structure ( int id,
UndoSpecial special )

◆ execute_rprobe_undo()

◆ execute_lprobe_undo()

◆ execute_aprobe_undo()

◆ execute_aemitter_undo()

◆ execute_aportal_undo()

◆ execute_ui_menu_undo()

◆ execute_ui_element_undo()

◆ execute_ui_container_undo()

◆ execute_text_box_undo()

◆ execute_asset_instance_undo()

◆ execute_mesh_node_undo()

◆ execute_undo()

◆ store_into_nkslider()

void store_into_nkslider ( NKSlider * s,
void * bytes,
size_t byte_size )

Definition at line 1590 of file editor.c.

References NKSlider::byte_size, NKSlider::bytes, and store_into_nkslider().

Referenced by render_light_menu(), and store_into_nkslider().

◆ toggle_performance_overlay()

◆ update_performance_overlay()

void update_performance_overlay ( GLuint64 query_s[PQUERY_MAX])

Fills performance overlay with text based on current GPU profiling information.

Parameters
query_sThe result of glQueries for the current frame.

Definition at line 1635 of file editor.c.

References add_all_text_boxes_to_draw_buffer(), CAST_VEC, MENUS, move_text_box_to_origin(), PERFORMANCE_OVERLAY_MENU, PERFORMANCE_OVERLAY_TEXT_BOX_COUNT, PERFORMANCE_OVERLAY_TEXT_BOX_START, PQUERY_MAX, QUERY_NAMES, TextBox::text, UIMenu::text_boxes, time, and update_performance_overlay().

Referenced by main(), and update_performance_overlay().

◆ create_performance_overlay()

◆ nk_check_equivalency()

bool nk_check_equivalency ( void * a,
void * b,
size_t byte_size,
NKSlider * s,
bool * dirty )

◆ check_equivalencyv3()

bool check_equivalencyv3 ( vec3 * a,
vec3 b,
NKSlider * s,
bool * dirty )

◆ check_equivalencyv4()

bool check_equivalencyv4 ( vec4 * a,
vec4 b,
NKSlider * s,
bool * dirty )

◆ check_equivalencyf()

◆ check_equivalencyi()

bool check_equivalencyi ( int * a,
int b,
NKSlider * s,
bool * dirty )

◆ FILE_DIR_REGISTRY_INIT()

◆ load_filenames()

◆ load_rprobe_filenames()

void load_rprobe_filenames ( const char * folder_path)

Definition at line 1966 of file editor.c.

References load_rprobe_filenames(), rprobe_names, and rprobe_names_count.

Referenced by load_rprobe_filenames(), and render_main_menu().

◆ load_gltf_filenames()

void load_gltf_filenames ( const char * folder_path)

Definition at line 1987 of file editor.c.

References gltf_names, gltf_names_count, and load_gltf_filenames().

Referenced by load_gltf_filenames(), and render_main_menu().

◆ render_entity_menu()

◆ render_file_directory_dropdown()

◆ render_dropdown_labels()

void render_dropdown_labels ( int * selected,
char ** options,
int option_count )

◆ render_dropdown()

void render_dropdown ( const char * dropdown_name,
int * selected,
char ** options,
int option_count,
int x,
int y )

◆ mat3_rotation_x()

mat3 mat3_rotation_x ( float angle_radians)

Definition at line 2422 of file editor.c.

References mat3_rotation_x().

Referenced by mat3_rotation_x(), and render_obb_widget().

◆ mat3_rotation_y()

mat3 mat3_rotation_y ( float angle_radians)

Definition at line 2433 of file editor.c.

References mat3_rotation_y().

Referenced by mat3_rotation_y(), and render_obb_widget().

◆ mat3_rotation_z()

mat3 mat3_rotation_z ( float angle_radians)

Definition at line 2443 of file editor.c.

References mat3_rotation_z().

Referenced by mat3_rotation_z(), and render_obb_widget().

◆ obb_orthonormalize()

◆ render_ivec3_widget()

void render_ivec3_widget ( const char * name,
UndoStructureType undo_type,
int id,
ivec3 * vec,
NKSlider * sliders )

◆ render_pos_widget()

void render_pos_widget ( const char * name,
UndoStructureType undo_type,
int id,
vec3 * pos,
NKSlider * sliders )

◆ render_aabb_widget()

void render_aabb_widget ( const char * name,
AABB * aabb )

◆ render_mat4_widget()

◆ render_obb_widget()

◆ render_selection_menu()

◆ render_text_menu()

void render_text_menu ( )

Definition at line 3040 of file editor.c.

References add_all_text_boxes_to_draw_buffer(), TextBox::angle, TextBoxEditorMenu::angle, assign_text_box_to_container(), CAST_VEC, check_equivalencyf(), color, TextBox::color, TextBoxEditorMenu::color, container_is_valid(), UIMenu::containers, Vector::count, create_text_box(), create_undo_structure(), delete_text_box(), EDITOR_SETTINGS, TextBox::fill, TextBoxEditorMenu::fill, UIContainer::free, TextBox::id, UIContainer::id, UIMenu::id, TextBox::layer, TextBoxEditorMenu::layer, MAX_UI_CONTAINERS, MAX_UI_MENU_NAMES, TextBox::menu, menu_names, MENU_TEXT, MENUS, move_text_box_to_menu(), nk_check_equivalency(), NK_CTX, NUKLEAR_HOVERED, TextBox::parent_container, push_nk_slider_undo(), push_raw_bytes_undo(), push_special_undo(), remove_text_box_from_container(), render_dropdown(), render_text_menu(), TextBox::scale, TextBoxEditorMenu::scale, SCREEN_WIDTH, EditorSettings::selected_text_id, EditorSettings::selected_ui_menu_id, TextBox::shadow, TextBox::shadow_dir, TextBoxEditorMenu::shadow_dirx, TextBoxEditorMenu::shadow_diry, TextBox::shadow_dist, TextBoxEditorMenu::shadow_dist, tb_id_flags, tb_text_flags, TextBox::text, EditorSettings::text_box_drag_mode, UIMenu::text_boxes, TextBox::text_cap, text_id_buffer, TextBox::text_size, TextBoxEditorMenu::text_size, TEXTBOX_MENU, TextBox::translation, TextBoxEditorMenu::translation, TextBox::uID, UIContainer::uID, UIMenu::uID, UNDOSPECIAL_NONE, UNDOSTRUCT_TEXTBOX, UNDOTEXTBOX_CHANGE_CONTAINER, UNDOTEXTBOX_CHANGE_TEXT, UNDOTEXTBOX_CREATE_TEXT_BOX, UNDOTEXTBOX_DELETE_TEXT_BOX, UNDOTEXTBOX_REMOVE_FROM_CONTAINER, vec2_normalize(), vec4::w, vec2::x, vec4::x, vec2::y, vec4::y, and vec4::z.

Referenced by render_editor_menu(), and render_text_menu().

◆ render_ui_menu()

void render_ui_menu ( )

Definition at line 3424 of file editor.c.

References UIElement::action_callback, ACTION_CALLBACK_COUNT, ACTION_CALLBACKS, add_all_text_boxes_to_draw_buffer(), UILabel::align, align_text_box_label(), UIElement::angle, UIElementEditorMenu::angle, UIElement::as, assign_element_to_container(), UIElement::base_pos, UILabel::box, CAST_VEC, check_equivalencyf(), check_equivalencyi(), check_equivalencyv4(), color, UIElement::color, UIElementEditorMenu::color, compute_slider_bounds(), UIElement::container, container_is_valid(), UIMenu::containers, Vector::count, UIElementEditorMenu::cpad, create_text_box(), create_ui_container(), create_ui_element(), create_undo_structure(), UIElementEditorMenu::cscrollx, UIElementEditorMenu::cscrolly, DEFAULT_LABEL, DEFAULT_SLIDER, delete_text_box(), delete_ui_container(), delete_ui_element(), UISlider::dir, EDITOR_SETTINGS, element_cid_buffer, EditorSettings::element_drag_mode, element_id_buffer, UIMenu::elements, UIElement::fill, UIElementEditorMenu::fill, find_text_box_in_menu(), UIContainer::free, UIElement::free, UIElement::hover_callback, HOVER_CALLBACK_COUNT, HOVER_CALLBACKS, UICallback::id, UIContainer::id, UIElement::id, UIMenu::id, UIElement::interactable, JUSTIFY_MAX, JUSTIFY_NAMES, label_id_buffer, UIElement::layer, UIElementEditorMenu::layer, UISlider::len, UIContainer::mask, MAX_UI_CONTAINERS, MAX_UI_ELEMENTS, MAX_UI_MENU_NAMES, UISlider::max_val, UIElement::menu, menu_id_buffer, menu_names, MENU_UI, MENUS, UISlider::min_val, move_element_to_menu(), NK_CTX, NUKLEAR_HOVERED, UIContainer::padding, UIElement::parent_container, push_nk_slider_undo(), push_raw_bytes_undo(), push_special_undo(), push_special_undo_normal_bytes(), UIElement::radius, UIElementEditorMenu::radius, remove_element_from_container(), render_dropdown(), render_dropdown_labels(), render_ui_menu(), UIElement::scale, SCREEN_HEIGHT, UIContainer::scroll_dir, UISlider::scroll_scale, UIContainer::scrollbar, EditorSettings::selected_ui_action_id, EditorSettings::selected_ui_element_id, EditorSettings::selected_ui_hover_id, EditorSettings::selected_ui_menu_id, UIElement::shadow, UIElement::shadow_dir, UIElementEditorMenu::shadow_dirx, UIElementEditorMenu::shadow_diry, UIElement::shadow_dist, UIElementEditorMenu::shadow_dist, size, UIElement::size, UIElementEditorMenu::sizex, UIElementEditorMenu::sizey, UIElementEditorMenu::sliderlen, UIElementEditorMenu::slidermax, UIElementEditorMenu::slidermin, UIElementEditorMenu::sliderscrollscale, UIElementEditorMenu::sliderx, UIElementEditorMenu::slidery, UIElementEditorMenu::sx, UIElementEditorMenu::sy, TextBox::text, UIMenu::text_boxes, TextBox::text_cap, UIElement::translation, ui_cont_flags, ui_id_flags, UI_INTERACTABLE_LABEL, UI_INTERACTABLE_MAX, UI_INTERACTABLE_NAMES, UI_INTERACTABLE_SLIDER, ui_label_id_flags, ui_menu_id_flags, UIContainer::uID, UIElement::uID, UIMenu::uID, UIELEMENT_MENU, UNDOSPECIAL_NONE, UNDOSTRUCT_MENU, UNDOSTRUCT_UI_CONTAINER, UNDOSTRUCT_UI_ELEMENT, UNDOUICONTAINER_CHANGE_SCROLLBAR, UNDOUIELEMENT_CHANGE_CONTAINER, UNDOUIELEMENT_CREATE_CONTAINER, UNDOUIELEMENT_CREATE_ELEMENT, UNDOUIELEMENT_CREATE_LABEL, UNDOUIELEMENT_DELETE_CONTAINER, UNDOUIELEMENT_DELETE_ELEMENT, UNDOUIELEMENT_JUSTIFY_LABEL, UNDOUIELEMENT_REMOVE_FROM_CONTAINER, vec2_normalize(), UIElement::visible, vec4::w, UIContainer::wrap, UIElementEditorMenu::x, vec2::x, vec4::x, UIElementEditorMenu::y, vec2::y, vec4::y, and vec4::z.

Referenced by render_editor_menu(), and render_ui_menu().

◆ render_audio_menu()

void render_audio_menu ( )

Definition at line 4216 of file editor.c.

References AudioPortal::adjacent_portals, aportal_flags, aportal_name_buffer, AProbeEditorMenu::aportal_pos, aportal_registry, APROBE_MENU, aprobe_name_buffer, aprobe_registry, SceneData::APV_FILE, apv_flags, SceneData::APV_PATH, AProbeEditorMenu::apv_res, AUDIO_EMITTERS, Globals::audio_portals, EditorSettings::audio_probe_bounces, EditorSettings::audio_probe_iterations, EditorSettings::audio_probe_volume_overlay, SceneData::audio_probe_volumes, bake_audio_probe_volume(), AudioEmitter::base_volume, Vector::buffer, ProbeVolume::byte_offset, Vector::capacity, CAST_VEC, check_equivalencyf(), Vector::count, create_undo_structure(), FileDirectoryRegistry::current_selection, DEFAULT_APV_RES, destroy_emitter(), FileDirectoryRegistry::directory, EDITOR_SETTINGS, AProbeEditorMenu::emitter_pos, end_emitter(), GLOBALS, AudioEmitter::id, init_emitter(), init_new_audio_portal(), AudioEmitter::is_loaded, AudioEmitter::is_loop, AudioEmitter::is_occludable, load_aportals(), load_aprobes(), load_emitter(), mat3_identity(), MAX_AUDIO_EMITTERS, MENU_AUDIO, menu_names, FileDirectoryRegistry::names, NK_CTX, NUKLEAR_HOVERED, ProbeVolume::obb, AProbeEditorMenu::OBB_sliders, AudioEmitter::path, play_emitter(), AudioEmitter::pos, AudioPortal::pos, push_nk_slider_undo(), push_raw_bytes_undo(), push_special_undo(), recalculate_audio_portal_paths(), remove_audio_portal(), REMOVE_FROM_VEC, render_audio_menu(), render_file_directory_dropdown(), render_ivec3_widget(), render_obb_widget(), render_pos_widget(), reset_audio_pvs(), ProbeVolume::resolution, EditorSettings::reverb_wet, OBB::rot, save_aportals(), save_aprobes(), scene_apv_flags, scene_apv_name_buffer, scene_apv_registry, Globals::scene_data, SCREEN_WIDTH, EditorSettings::selected_audio_emitter_id, EditorSettings::selected_audio_portal_id, EditorSettings::selected_audio_probe_volume_id, ProbeVolume::size, AudioEmitter::sound_obj, sound_registry, UNDOAEMITTER_DELETE_EMITTER, UNDOAEMITTER_LOAD_SOUND_OBJ, UNDOAEMITTER_PLAY_EMITTER, UNDOAEMITTER_SPAWN, UNDOAEMITTER_STOP_EMITTER, UNDOAPORTAL_DELETE, UNDOAPORTAL_SPAWN, UNDOAPROBE_DELETE_APV, UNDOAPROBE_RESET_APV_SIZE, UNDOAPROBE_SPAWN_APV, UNDOSPECIAL_NONE, UNDOSTRUCT_AEMITTER, UNDOSTRUCT_APORTAL, UNDOSTRUCT_APROBE, vector_expand(), AProbeEditorMenu::volume, and EditorSettings::volume.

Referenced by render_audio_menu(), and render_editor_menu().

◆ render_lprobe_menu()

◆ render_main_menu()

void render_main_menu ( )

Definition at line 4932 of file editor.c.

References EditorSettings::ACES, add_all_meshes_to_buffer(), allocate_gbuffer(), allocate_gbuffer_msaa(), allocate_main_fbo(), asset_dir, Globals::assets, EditorSettings::BLOOM, BLOOM_HEIGHT, BLOOM_PYRAMID, BLOOM_WIDTH, MainEditorMenu::blur_radius, ComboLabel::buffer, Vector::buffer, build_uv_islands(), CAST_VEC, change_bloom_res(), change_dof_res(), change_fullscreen_option(), change_render_resolution(), change_ssao_res(), check_equivalencyf(), check_equivalencyi(), COC_FBO, Vector::count, create_undo_structure(), EditorSettings::current_debug_view, EditorSettings::current_fullscreen_option, FileDirectoryRegistry::current_selection, Framebuffer::depth_rbo, Framebuffer::depth_texture, EditorSettings::DOF, EditorSettings::DOF_focal_length, EditorSettings::DOF_fstop, DOF_HEIGHT, EditorSettings::DOF_max_blur_radius, EditorSettings::DOF_sensor_height, DOF_WIDTH, draw_dirty, DVIEW_MAX, DVIEW_NAMES, EDITOR_SETTINGS, Framebuffer::fbo, MainEditorMenu::focal_length, FSOPT_MAX, MainEditorMenu::fstop, EditorSettings::FULL_GBUFFER, FULLSCREEN_OPTION_NAMES, GBUFFER_FBO, GBUFFER_RESOLVE_FBO, GLOBALS, gltf_file_names_open, gltf_names, gltf_names_count, GPU_upload_scene_data(), Framebuffer::h, GLRenderbuffer::i, GLTexture::i, AssetInstance::id, init_lightmap_data(), init_new_asset_instance(), init_scene_bvh(), ComboLabel::item_count, LABEL_LEN, SceneData::lightmap_data, load_gltf(), load_gltf_filenames(), load_rprobe_filenames(), load_rprobes(), load_ui(), EditorSettings::LUT, MAIN_FBO, MAIN_MENU, MAIN_RESOLVE_FBO, EditorSettings::MBLUR, MENU_MAIN, menu_names, Globals::mesh_nodes, Globals::meshes, EditorSettings::MSAA, MSAA_OPTIONS, MSAA_SAMPLE_OPTIONS_MAX, Globals::msaa_samples, SceneData::name, FileDirectoryRegistry::names, NK_CTX, EditorSettings::NOISE, NUKLEAR_HOVERED, Asset::path, EditorSettings::pp_dview, PPDVIEW_MAX, PPDVIEW_NAMES, ComboLabel::ptrs, push_nk_slider_undo(), push_raw_bytes_undo(), push_special_undo(), SceneData::reflection_probes, render_dropdown(), render_file_directory_dropdown(), EditorSettings::render_framerate_target, RENDER_HEIGHT, render_main_menu(), RENDER_WIDTH, EditorSettings::res_height, MainEditorMenu::res_height, EditorSettings::res_width, MainEditorMenu::res_width, rprobe_dir, rprobe_file_names_open, rprobe_name_flags, rprobe_names, rprobe_names_count, save_ui(), save_vector(), Globals::scene_data, scene_file_name_flags, scene_load(), scene_load_volumes(), scene_name_flags, scene_registry, scene_save(), scene_save_volumes(), SCREEN_HEIGHT, SCREEN_WIDTH, ComboLabel::selected, EditorSettings::selected_asset_id, EditorSettings::selected_fullscreen_option, EditorSettings::selected_gltf_file_id, EditorSettings::selected_rprobe_file_id, MainEditorMenu::sensor_height, EditorSettings::SSAO, SSAO_FBO, SSAO_HEIGHT, SSAO_WIDTH, EditorSettings::SSR, EditorSettings::TAA, EditorSettings::UI, ui_name_flags, ui_registry, UNDOEDITORSETTINGS_BLOOM_RES, UNDOEDITORSETTINGS_DOF_RES, UNDOEDITORSETTINGS_FULLSCREENOPT, UNDOEDITORSETTINGS_HALFSIZE_EFFECTS, UNDOEDITORSETTINGS_RENDER_RES, UNDOEDITORSETTINGS_SCREEN_RES, UNDOEDITORSETTINGS_SSAO_RES, UNDOGLOBAL_SPAWN_ASSET_INSTANCE, UNDOSPECIAL_NONE, UNDOSTRUCT_EDITOR_SETTINGS, UNDOSTRUCT_GLOBAL, upload_lights(), upload_material_data(), Globals::vertex_layouts, view, EditorSettings::VSYNC, Framebuffer::w, and window.

Referenced by render_editor_menu(), and render_main_menu().

◆ render_mn_menu()

◆ render_material_menu()

◆ render_light_menu()

void render_light_menu ( )

Definition at line 5925 of file editor.c.

References ReflectionProbe::aabb, LightEditorMenu::aabbe_x, LightEditorMenu::aabbe_y, LightEditorMenu::aabbe_z, add_all_meshes_to_buffer(), EditorSettings::ao_iterations, LightEditorMenu::ao_iterations, EditorSettings::ao_threshold, LightEditorMenu::ao_threshold, bake_lightmap(), bake_reflection_probes(), Vector::buffer, build_light_bvh(), NKSlider::byte_size, NKSlider::bytes, calculate_aabb_bounds(), ReflectionProbe::capture_pos, CAST_VEC, AABB::center, LightEditorMenu::center_pos, check_equivalencyf(), check_equivalencyi(), check_equivalencyv3(), clamp(), LightEditorMenu::color_b, LightEditorMenu::color_g, LightEditorMenu::color_r, Light::cone_angle, LightEditorMenu::cone_angle, Vector::count, create_editor_settings_undo_structure(), create_entity(), create_light_undo_structure(), create_singular_id_undo_structure(), create_undo_structure(), ReflectionProbe::cubemap_idx, FileDirectoryRegistry::current_selection, UVIsland::currently_rasterizing, default_light, Light::dir, FileDirectoryRegistry::directory, EDITOR_SETTINGS, ENTITIES, Light::entity_id, EditorSettings::entity_menu_open, AABB::extents, ReflectionProbe::fade_margin, Entity::free, GLOBALS, GPU_upload_scene_data(), Entity::id, Light::intensity, LightEditorMenu::intensity, LightmapData::islands, LIGHT_MENU, light_name_buffer, light_name_flags, light_registry, Light::light_type, LightEditorMenu::light_type, SceneData::lightmap_data, lightmap_registry, Globals::lights, Globals::lights_dirty, EditorSettings::lm_aabb, LightEditorMenu::lm_aabbx, LightEditorMenu::lm_aabby, LightEditorMenu::lm_aabbz, LM_allocate_empty_mns(), EditorSettings::lm_iterations, LightEditorMenu::lm_iterations, lm_name_flags, LM_regenerate_texels(), load_lightmap_from_binary(), load_vector(), EditorSettings::mfactor, LightEditorMenu::mfactor, EditorSettings::mfactor_enabled, LightEditorMenu::mfactor_enabled, FileDirectoryRegistry::names, NK_CTX, NUKLEAR_HOVERED, EditorSettings::opening_menu, Light::penumbra, LightEditorMenu::penumbra, Light::pos, EditorSettings::probe_iterations, LightEditorMenu::probe_iterations, push_nk_slider_undo(), push_special_undo(), Light::radius, reallocate_rprobe_array(), SceneData::reflection_probes, REMOVE_FROM_VEC, render_file_directory_dropdown(), render_light_menu(), Light::rgb, LightEditorMenu::rp_aabbe_x, LightEditorMenu::rp_aabbe_y, LightEditorMenu::rp_aabbe_z, LightEditorMenu::rp_aabbx, LightEditorMenu::rp_aabby, LightEditorMenu::rp_aabbz, LightEditorMenu::rp_capposx, LightEditorMenu::rp_capposy, LightEditorMenu::rp_capposz, LightEditorMenu::rp_fade_x, LightEditorMenu::rp_fade_y, LightEditorMenu::rp_fade_z, LightEditorMenu::rx, save_lightmap_to_binary(), save_vector(), Globals::scene_data, SCREEN_HEIGHT, SCREEN_WIDTH, EditorSettings::selected_ent_id, EditorSettings::selected_light_id, EditorSettings::selected_r_probe, Light::sm_dirty, SPOT_LIGHT, store_into_nkslider(), LightEditorMenu::texels_per_unit, EditorSettings::texels_per_uv_unit, Light::threshold, LightEditorMenu::threshold, UNDOLIGHT_DELETE, UNDOLIGHT_SPAWN, UNDORPROBE_DELETE, UNDORPROBE_SPAWN, UNDOSPECIAL_NONE, UNDOSTRUCT_LIGHT, UNDOSTRUCT_RPROBE, upload_lights(), upload_material_data(), vec3_normalize(), vector_expand(), Globals::vertex_layouts, LightEditorMenu::x, vec3::x, LightEditorMenu::y, vec3::y, LightEditorMenu::z, and vec3::z.

Referenced by render_editor_menu(), and render_light_menu().

◆ render_asset_instance_menu()

◆ render_editor_menu()

void render_editor_menu ( )

Renders the editor menus.

Definition at line 6605 of file editor.c.

References aportal_flags, apv_flags, EditorSettings::asset_instance_menu_open, EditorSettings::audio_menu_open, CAST_VEC, Vector::count, EDITOR_SETTINGS, ENTITIES, EditorSettings::entity_menu_open, Entity::free, GLOBALS, Globals::keyboard_locked, EditorSettings::light_menu_open, light_name_flags, Globals::lights, lm_name_flags, EditorSettings::lprobe_menu_open, lpv_flags, EditorSettings::main_menu_open, EditorSettings::material_menu_open, Globals::materials, MAX_ASSET_INSTANCES, MAX_TEXT_BOXES, MAX_UI_ELEMENTS, MENU_AINST, MENU_AUDIO, MENU_ENT, MENU_LPROBE, MENU_MAIN, MENU_MATERIAL, MENU_MN, menu_names, MENU_TEXT, MENU_UI, MENUS, EditorSettings::mesh_node_menu_open, Globals::mesh_nodes, NK_CTX, NUKLEAR_HOVERED, render_asset_instance_menu(), render_audio_menu(), render_editor_menu(), render_entity_menu(), render_light_menu(), render_lprobe_menu(), render_main_menu(), render_material_menu(), render_mn_menu(), render_selection_menu(), render_text_menu(), render_ui_menu(), rprobe_name_flags, scene_apv_flags, scene_file_name_flags, scene_lpv_flags, scene_name_flags, EditorSettings::selected_asset_instance_id, EditorSettings::selected_ent_id, EditorSettings::selected_light_id, EditorSettings::selected_material_mn_id, EditorSettings::selected_mn_id, EditorSettings::selected_text_id, EditorSettings::selected_ui_element_id, EditorSettings::selected_ui_menu_id, EditorSettings::selection_menu_open, tb_cont_flags, tb_id_flags, tb_text_flags, EditorSettings::text_menu_open, ui_cont_flags, ui_id_flags, ui_label_id_flags, ui_menu_id_flags, EditorSettings::ui_menu_open, ui_name_flags, ui_parent_cont_flags, and ui_scrollbar_flags.

Referenced by main(), and render_editor_menu().

Variable Documentation

◆ LIGHT_MENU

LightEditorMenu LIGHT_MENU = {0}

Definition at line 35 of file editor.c.

Referenced by render_light_menu().

◆ MAIN_MENU

MainEditorMenu MAIN_MENU = {0}

Definition at line 36 of file editor.c.

Referenced by render_main_menu().

◆ LPROBE_MENU

LProbeEditorMenu LPROBE_MENU = {0}

Definition at line 37 of file editor.c.

Referenced by render_lprobe_menu().

◆ APROBE_MENU

AProbeEditorMenu APROBE_MENU = {0}

Definition at line 38 of file editor.c.

Referenced by render_audio_menu().

◆ UIELEMENT_MENU

UIElementEditorMenu UIELEMENT_MENU = {0}

Definition at line 39 of file editor.c.

Referenced by render_ui_menu().

◆ TEXTBOX_MENU

TextBoxEditorMenu TEXTBOX_MENU = {0}

Definition at line 40 of file editor.c.

Referenced by render_text_menu().

◆ AI_MENU

AssetInstanceEditorMenu AI_MENU = {0}

Definition at line 41 of file editor.c.

Referenced by render_asset_instance_menu().

◆ MN_MENU

MeshNodeEditorMenu MN_MENU = {0}

Definition at line 42 of file editor.c.

Referenced by render_mn_menu().

◆ gltf_names

char gltf_names[256][256]

Definition at line 46 of file editor.c.

Referenced by load_gltf_filenames(), and render_main_menu().

◆ gltf_names_count

int gltf_names_count = 0

Definition at line 47 of file editor.c.

Referenced by load_gltf_filenames(), and render_main_menu().

◆ rprobe_names

char rprobe_names[256][256]

Definition at line 49 of file editor.c.

Referenced by load_rprobe_filenames(), and render_main_menu().

◆ rprobe_names_count

int rprobe_names_count = 0

Definition at line 50 of file editor.c.

Referenced by load_rprobe_filenames(), and render_main_menu().

◆ scene_registry

◆ lightmap_registry [1/2]

◆ light_registry [1/2]

◆ sound_registry [1/2]

FileDirectoryRegistry sound_registry = {0}

Definition at line 55 of file editor.c.

Referenced by FILE_DIR_REGISTRY_INIT(), and render_audio_menu().

◆ aportal_registry [1/2]

◆ rprobe_registry [1/2]

FileDirectoryRegistry rprobe_registry = {0}

◆ lprobe_registry [1/2]

◆ aprobe_registry [1/2]

◆ scene_apv_registry [1/2]

◆ scene_lpv_registry

FileDirectoryRegistry scene_lpv_registry = {0}

Definition at line 61 of file editor.c.

Referenced by FILE_DIR_REGISTRY_INIT(), and render_lprobe_menu().

◆ ui_registry [1/2]

FileDirectoryRegistry ui_registry = {0}

Definition at line 62 of file editor.c.

Referenced by FILE_DIR_REGISTRY_INIT(), load_ui(), render_main_menu(), and save_ui().

◆ UNDOS

Undo UNDOS[MAX_UNDOS] = {0}

Definition at line 149 of file editor.c.

Referenced by find_empty_undo(), find_last_undo(), and UNDO_INIT().

◆ undo_stack_idx

int undo_stack_idx = 0

Definition at line 150 of file editor.c.

Referenced by find_last_undo().

◆ undo_stack_size

size_t undo_stack_size = 0

◆ top_undo

◆ next_redo

Undo* next_redo = NULL

Definition at line 153 of file editor.c.

Referenced by link_undo(), perform_newest_redo(), and perform_newest_undo().

◆ QUERY_NAMES

const char QUERY_NAMES[PQUERY_MAX][256]
Initial value:
=
{
"Cull",
"Point Light Shadows",
"Shadowmap",
"GBuffer",
"Depth of Field",
"SSAO",
"TAA",
"SSR",
"Bloom",
"Render",
"Postprocessing",
}

Definition at line 1600 of file editor.c.

Referenced by update_performance_overlay().

◆ gltf_file_names_open

nk_bool gltf_file_names_open = nk_false

Definition at line 2018 of file editor.c.

Referenced by render_main_menu().

◆ rprobe_file_names_open

nk_bool rprobe_file_names_open = nk_false

Definition at line 2019 of file editor.c.

Referenced by render_main_menu().

◆ target_types

const char target_types[4][256]
Initial value:
=
{
"FLT",
"V3",
"INT",
"BOOL"
}

Definition at line 2021 of file editor.c.

Referenced by render_entity_menu().

◆ menu_names

const char menu_names[][256]
Initial value:
=
{
"Main",
"Mesh Node",
"Material",
"Light Menu",
"Entity Menu",
"Text Menu",
"UI Menu",
"Audio Menu",
"LProbe Menu",
"AInst Menu"
}

The array for all editor menu names (to avoid Nuklear hashing problems).

Definition at line 2306 of file editor.c.

Referenced by handle_ui_selection_event(), process_sdl_event(), render_asset_instance_menu(), render_audio_menu(), render_editor_menu(), render_entity_menu(), render_lprobe_menu(), render_main_menu(), render_material_menu(), render_mn_menu(), render_text_menu(), and render_ui_menu().

◆ tb_id_flags

int tb_id_flags = NK_EDIT_INACTIVE

Definition at line 2972 of file editor.c.

Referenced by render_editor_menu(), and render_text_menu().

◆ tb_text_flags

int tb_text_flags = NK_EDIT_INACTIVE

Definition at line 2973 of file editor.c.

Referenced by render_editor_menu(), and render_text_menu().

◆ tb_cont_flags

int tb_cont_flags = NK_EDIT_INACTIVE

Definition at line 2974 of file editor.c.

Referenced by render_editor_menu().

◆ ui_menu_id_flags

int ui_menu_id_flags = NK_EDIT_INACTIVE

Definition at line 2975 of file editor.c.

Referenced by render_editor_menu(), and render_ui_menu().

◆ ui_id_flags

int ui_id_flags = NK_EDIT_INACTIVE

Definition at line 2976 of file editor.c.

Referenced by render_editor_menu(), and render_ui_menu().

◆ ui_parent_cont_flags

int ui_parent_cont_flags = NK_EDIT_INACTIVE

Definition at line 2977 of file editor.c.

Referenced by render_editor_menu().

◆ ui_cont_flags

int ui_cont_flags = NK_EDIT_INACTIVE

Definition at line 2978 of file editor.c.

Referenced by render_editor_menu(), and render_ui_menu().

◆ ui_scrollbar_flags

int ui_scrollbar_flags = NK_EDIT_INACTIVE

Definition at line 2979 of file editor.c.

Referenced by render_editor_menu().

◆ ui_label_id_flags

int ui_label_id_flags = NK_EDIT_INACTIVE

Definition at line 2980 of file editor.c.

Referenced by render_editor_menu(), and render_ui_menu().

◆ aportal_flags

int aportal_flags = NK_EDIT_INACTIVE

Definition at line 2981 of file editor.c.

Referenced by render_audio_menu(), and render_editor_menu().

◆ apv_flags

int apv_flags = NK_EDIT_INACTIVE

Definition at line 2982 of file editor.c.

Referenced by render_audio_menu(), and render_editor_menu().

◆ scene_apv_flags

int scene_apv_flags = NK_EDIT_INACTIVE

Definition at line 2983 of file editor.c.

Referenced by render_audio_menu(), render_editor_menu(), and render_lprobe_menu().

◆ lpv_flags

int lpv_flags = NK_EDIT_INACTIVE

Definition at line 2984 of file editor.c.

Referenced by render_editor_menu(), and render_lprobe_menu().

◆ scene_lpv_flags

int scene_lpv_flags = NK_EDIT_INACTIVE

Definition at line 2985 of file editor.c.

Referenced by render_editor_menu().

◆ scene_name_flags

int scene_name_flags = NK_EDIT_INACTIVE

Definition at line 2986 of file editor.c.

Referenced by render_editor_menu(), and render_main_menu().

◆ scene_file_name_flags

int scene_file_name_flags = NK_EDIT_INACTIVE

Definition at line 2987 of file editor.c.

Referenced by render_editor_menu(), and render_main_menu().

◆ ui_name_flags

int ui_name_flags = NK_EDIT_INACTIVE

Definition at line 2988 of file editor.c.

Referenced by render_editor_menu(), and render_main_menu().

◆ rprobe_name_flags

int rprobe_name_flags = NK_EDIT_INACTIVE

Definition at line 2989 of file editor.c.

Referenced by render_editor_menu(), and render_main_menu().

◆ light_name_flags

int light_name_flags = NK_EDIT_INACTIVE

Definition at line 2990 of file editor.c.

Referenced by render_editor_menu(), and render_light_menu().

◆ lm_name_flags

int lm_name_flags = NK_EDIT_INACTIVE

Definition at line 2991 of file editor.c.

Referenced by render_editor_menu(), and render_light_menu().

◆ aportal_name_buffer

char aportal_name_buffer[256]

Definition at line 2996 of file editor.c.

Referenced by render_audio_menu().

◆ light_name_buffer

char light_name_buffer[256]

Definition at line 2997 of file editor.c.

Referenced by render_light_menu().

◆ aprobe_name_buffer

char aprobe_name_buffer[256]

Definition at line 2998 of file editor.c.

Referenced by render_audio_menu().

◆ lprobe_name_buffer

char lprobe_name_buffer[256]

Definition at line 2999 of file editor.c.

Referenced by render_lprobe_menu().

◆ scene_apv_name_buffer

char scene_apv_name_buffer[256]

Definition at line 3000 of file editor.c.

Referenced by render_audio_menu().

◆ scene_lpv_name_buffer

char scene_lpv_name_buffer[256]

Definition at line 3001 of file editor.c.

Referenced by render_lprobe_menu().

◆ text_container_buffer

char text_container_buffer[256]

Definition at line 3037 of file editor.c.

◆ text_id_buffer

char text_id_buffer[256]

Definition at line 3038 of file editor.c.

Referenced by render_text_menu().

◆ menu_id_buffer

char menu_id_buffer[256]

Definition at line 3415 of file editor.c.

Referenced by render_ui_menu().

◆ element_id_buffer

char element_id_buffer[256]

Definition at line 3416 of file editor.c.

Referenced by render_ui_menu().

◆ element_parent_container_buffer

char element_parent_container_buffer[256]

Definition at line 3418 of file editor.c.

◆ element_cid_buffer

char element_cid_buffer[256]

Definition at line 3420 of file editor.c.

Referenced by render_ui_menu().

◆ scrollbar_buffer

char scrollbar_buffer[256]

Definition at line 3421 of file editor.c.

◆ label_id_buffer

char label_id_buffer[256]

Definition at line 3422 of file editor.c.

Referenced by render_ui_menu().

◆ MSAA_OPTIONS

const char* MSAA_OPTIONS[]
Initial value:
=
{
"2", "4", "8", "16"
}

Definition at line 4674 of file editor.c.

Referenced by render_main_menu().

◆ lightmap_registry [2/2]

◆ light_registry [2/2]

◆ sound_registry [2/2]

FileDirectoryRegistry sound_registry
extern

Definition at line 55 of file editor.c.

Referenced by FILE_DIR_REGISTRY_INIT(), and render_audio_menu().

◆ aportal_registry [2/2]

◆ rprobe_registry [2/2]

FileDirectoryRegistry rprobe_registry
extern

◆ lprobe_registry [2/2]

◆ aprobe_registry [2/2]

◆ scene_apv_registry [2/2]

◆ ui_registry [2/2]

FileDirectoryRegistry ui_registry
extern

Definition at line 62 of file editor.c.

Referenced by FILE_DIR_REGISTRY_INIT(), load_ui(), render_main_menu(), and save_ui().