|
Space Sim
|
Go to the source code of this file.
Data Structures | |
| struct | Shader |
Functions | |
| void | init_random () |
| void | update_water_fft (float t) |
| Updates the water grid and FFTs it once per frame. | |
| bool | init (SDL_Window **window, SDL_GLContext *context) |
| struct Shader |
| void init_random | ( | ) |
Definition at line 114 of file init.c.
References Particle::acc, BODY_COUNT, GLOBALS, init_random(), MASS, Globals::mass_pow, Particle::mat, Globals::max_mass, Globals::min_mass, ParticleData::p, Particle::p_m, PARTICLE_SSBO, PD, power_law(), Globals::radius, radius, vec3_cross(), vec3_normalize(), vec3_scale(), Particle::vel, vec4::w, vec3::x, vec4::x, vec3::y, vec4::y, vec3::z, and vec4::z.
Referenced by display_main_menu(), init(), and init_random().
| bool init | ( | SDL_Window ** | window, |
| SDL_GLContext * | context ) |
Definition at line 659 of file init.c.
References FBMLayer::amp, PerlinLayer::amp, WarpLayer::amp, ATMOSPHERE_EBO, ATMOSPHERE_RES, ATMOSPHERE_VAO, ATMOSPHERE_VBO, BIT_REVERSAL_COMPUTE_SHADER, BLOOM2_FBO, BLOOM2_HEIGHT, BLOOM2_TEXTURE, BLOOM2_WIDTH, BLOOM_FBO, BLOOM_HEIGHT, BLOOM_TEXTURE, BLOOM_WIDTH, BLUR2_FBO, BLUR2_TEXTURE, BLUR_FBO, BLUR_TEXTURE, BOUNDS_COMPUTE_SHADER, BOUNDS_SSBO, CAM_UBO, CHUNK_DATA_FLAG, CHUNK_DATA_SSBO, CHUNK_WORLD_SIZE, CHUNK_ZERO_COMPUTE_SHADER, COM_COMPUTE_SHADER, COMPOSITE_DEPTH_TEXTURE, COMPOSITE_FBO, COMPOSITE_TEXTURE, create_compute_shader(), CUBEMAP_TEXTURE, DENSITY_SSBO, DENSITY_VERTEX_SSBO, DEPTH_TEXTURE, EDGE_TABLE, MarchingCubesData::EDGE_TABLE, EDGE_TO_VERTICES, MarchingCubesData::EDGE_TO_VERTICES, GPUChunk::emitted_chunks, EXP_LOOKUP_TEXTURE, PlanetData::fbm_count, PlanetData::fbm_layers, FBM_TEXTURE, FBM_TEXTURE_SIZE, FBMLayer::freq, PerlinLayer::freq, WarpLayer::freq0, WarpLayer::freq1, WarpLayer::freq2, FS_VAO, HISTORY_FBO, HISTORY_TEXTURE, ID_TEXTURE, init(), init_chunk_data(), init_globals(), init_random(), init_shaders(), init_water_grid(), load_cubemap(), load_texture(), LOD_DENSITY_SIZES, GPUChunk::lod_dist, LOD_RES, LOD_VERTEX_SIZES, LODMAX, MAIN_COMPUTE_SHADER, MAIN_FBO, MAIN_TEXTURE, MAIN_VAO, MAIN_VBO, MARCHING_CUBES_SSBO, MAX_CHUNKS, MAX_CHUNKS_LOD, MESH_EBO, MESH_RES, MESH_VAO, MESH_VBO, MORTON_COMPUTE_SHADER, MORTON_PING_SSBO, MORTON_SSBO, NEXT_COMPUTE_SHADER, NK_CTX, NODE_COUNTER_SSBO, NODE_SSBO, WarpLayer::offset0, WarpLayer::offset1, WarpLayer::offset2, PARTICLE_SSBO, PlanetData::perlin_count, PlanetData::perlin_layers, PERLIN_TEXTURE, PERLIN_TEXTURE_SIZE, PLANET_DATA, PLANET_DATA_SSBO, WaterVertex::pos, POS_COMPUTE_SHADER, POSTPROCESS_FBO, POSTPROCESS_TEXTURE, precompute_fbm_texture(), precompute_perlin_texture(), precompute_worley_texture(), RADIX_COMPUTE_SHADER, RADIX_FINAL_COMPUTE_SHADER, RADIX_GLOBAL_COMPUTE_SHADER, RADIX_SSBO, RENDER_UBO, res, ROCK_AO_TEXTURE, ROCK_DIFFUSE_TEXTURE, ROCK_NORMAL_TEXTURE, ROCK_SPECULAR_TEXTURE, SCREEN_HEIGHT, SCREEN_WIDTH, SHADOW_MAP_FBO, SHADOW_MAP_SIZE, SHADOW_MAP_TEXTURE, SKY_CUBEMAP, SKY_FBO, SKY_VAO, SKY_VBO, SPACE_CAM_UBO, SPAWN_COMPUTE_SHADER, SPHERE_TEXTURE, PlanetData::sun_color, PlanetData::sun_dir, TREE_COMPUTE_SHADER, TREE_COUNT_COMPUTE_SHADER, MarchingCubesData::TRIANGLE_TABLE, TRIANGLE_TABLE, PlanetData::warp_count, PlanetData::warp_layers, WATER_COMPUTE_SHADER, WATER_DATA, WATER_EBO, WATER_FFT_COMPUTE_SHADER, WATER_FFT_L, WATER_FFT_PING_TEXTURE, WATER_FFT_PING_TEXTURE_2, WATER_FFT_PONG_TEXTURE, WATER_FFT_PONG_TEXTURE_2, WATER_FFT_TEXTURE_SIZE, water_index_count, water_quad_count, WATER_RES, WATER_SSBO, WATER_VAO, WATER_VBO, WORLEY_TEXTURE, WORLEY_TEXTURE_SIZE, and ZERO_COMPUTE_SHADER.
|
extern |
Definition at line 41 of file main.c.
Referenced by init(), render(), and update_camera().
|
extern |
Definition at line 42 of file main.c.
Referenced by display_main_menu(), init(), render(), and update_camera().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 75 of file main.c.
Referenced by init(), render(), and render_sky_cubemap().
|
extern |
Definition at line 176 of file main.c.
Referenced by create_new_planet_mesh(), init_chunk_data(), and render_mesh_planet().
|
extern |
Definition at line 209 of file main.c.
Referenced by create_new_planet_mesh(), init(), and render_mesh_planet().
|
extern |
Definition at line 210 of file main.c.
Referenced by create_new_planet_mesh(), init(), and render_mesh_planet().
|
extern |
|
extern |
|
extern |
Definition at line 101 of file main.c.
Referenced by init(), render(), and update_water_fft().
|
extern |
Definition at line 102 of file main.c.
Referenced by init(), and update_water_fft().
|
extern |
Definition at line 103 of file main.c.
Referenced by init(), render(), and update_water_fft().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 92 of file main.c.
Referenced by create_new_planet_mesh(), init(), precompute_perlin_texture(), render(), and render_sky_cubemap().
|
extern |
Definition at line 91 of file main.c.
Referenced by init(), precompute_worley_texture(), and render_sky_cubemap().
|
extern |
Definition at line 93 of file main.c.
Referenced by create_new_planet_mesh(), init(), precompute_fbm_texture(), render(), and render_sky_cubemap().
|
extern |
|
extern |
Definition at line 109 of file main.c.
Referenced by init(), and render_sky_cubemap().
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 119 of file main.c.
Referenced by init_shadow_map_shader(), and render().
|
extern |
Definition at line 120 of file main.c.
Referenced by init_shadow_water_shader(), and render().
|
extern |
Definition at line 121 of file main.c.
Referenced by init_main_shader(), and render().
|
extern |
Definition at line 122 of file main.c.
Referenced by init_mesh_shader(), render(), and render_mesh_planet().
|
extern |
Definition at line 123 of file main.c.
Referenced by init_sky_shader(), and render().
|
extern |
Definition at line 124 of file main.c.
Referenced by init_water_shader(), and render().
|
extern |
|
extern |
Definition at line 126 of file main.c.
Referenced by init_postprocess_shader(), and render().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 132 of file main.c.
Referenced by init_atmosphere_shader(), and render_sky_cubemap().
|
extern |
Definition at line 134 of file main.c.
Referenced by init_clouds_shader(), and render_sky_cubemap().
|
extern |
Definition at line 133 of file main.c.
Referenced by init_atmosphere_from_space_shader(), and render_sky_from_outside_atmosphere().
|
extern |
Definition at line 137 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 138 of file main.c.
Referenced by create_new_planet_mesh(), and init_density_compute_shader().
|
extern |
Definition at line 139 of file main.c.
Referenced by create_new_planet_mesh(), and init_marching_cubes_compute_shader().
|
extern |
Definition at line 140 of file main.c.
Referenced by create_new_planet_mesh(), and init_indirect_compute_shader().
|
extern |
Definition at line 144 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 141 of file main.c.
Referenced by init(), and load_chunks().
|
extern |
Definition at line 145 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 146 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 147 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 148 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 149 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 150 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 151 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 152 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 154 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 156 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 158 of file main.c.
Referenced by init(), and update_water_fft().
|
extern |
Definition at line 160 of file main.c.
Referenced by fft_textures(), and init().
|
extern |
Definition at line 159 of file main.c.
Referenced by fft_textures(), and init().
|
extern |
|
extern |
|
extern |
Definition at line 184 of file main.c.
Referenced by init(), main(), render_sky_cubemap(), and render_sky_from_outside_atmosphere().
|
extern |
Definition at line 185 of file main.c.
Referenced by init(), main(), render_sky_cubemap(), and render_sky_from_outside_atmosphere().
|
extern |
|
extern |
Definition at line 202 of file main.c.
Referenced by init(), init_random(), look_at_selected_body(), and process_input().
|
extern |
Definition at line 207 of file main.c.
Referenced by init(), and sim_step().
|
extern |
Definition at line 215 of file main.c.
Referenced by init(), and load_chunks().
|
extern |
Definition at line 213 of file main.c.
Referenced by init(), and upload_param_to_ssbo().
|
extern |
Definition at line 69 of file main.c.
Referenced by init(), and load_chunks().
|
extern |
Definition at line 67 of file main.c.
Referenced by create_new_planet_mesh(), free_child(), free_current_parent(), free_parent(), init_chunk_data(), load_chunks(), and render_mesh_planet().
|
extern |
Definition at line 194 of file main.c.
Referenced by calc_density(), display_main_menu(), init(), and update_light_camera().
|
extern |
Definition at line 171 of file init.c.
Referenced by display_main_menu(), and process_input().
|
extern |
Definition at line 610 of file init.c.
Referenced by density_fn(), main(), precompute_perlin_texture(), and sample_density().
|
extern |
Definition at line 346 of file init.c.
Referenced by density_fn(), main(), precompute_fbm_texture(), and sample_fbm_density().
|
extern |
Definition at line 170 of file init.c.
Referenced by display_main_menu(), init(), and process_input().
|
extern |
Definition at line 1247 of file main.c.
Referenced by display_main_menu().
|
extern |
Definition at line 244 of file main.c.
Referenced by init_random().
|
extern |
Definition at line 112 of file init.c.
Referenced by init_random().
|
extern |
Definition at line 782 of file mesh.c.
Referenced by init_chunk_data(), and load_chunks().
|
extern |
Definition at line 783 of file mesh.c.
Referenced by init_chunk_data(), and load_chunks().
|
extern |
Definition at line 784 of file mesh.c.
Referenced by init_chunk_data(), and load_chunks().
|
extern |
Definition at line 260 of file main.c.
Referenced by display_main_menu(), load_chunks(), main(), process_input(), render_sky_cubemap(), and render_sky_from_outside_atmosphere().