Fixed default config values

dev
Shariq Shah 6 years ago
parent 088dabdf7a
commit 7b84fbdc01
  1. 36
      assets/entities/Spot.symtres
  2. 18
      assets/entities/Suzanne.symtres
  3. 4
      src/game/renderer.c
  4. 14
      src/system/config_vars.c
  5. 2
      src/system/main.c
  6. 7
      src/system/platform.c
  7. 5
      todo.txt

@ -1,18 +1,18 @@
Entity
{
type : 5
inner_angle : 20.0000
falloff : 1.5000
light_type : 2
depth_bias : 0.0005
cast_shadow : false
intensity : 1.0000
color : 1.000 1.000 1.000
active : true
radius : 20.0000
outer_angle : 30.0000
name : Test_Light
pcf_enabled : false
valid : true
}
Entity
{
type : 5
inner_angle : 20.0000
falloff : 1.5000
light_type : 2
depth_bias : 0.0005
cast_shadow : false
intensity : 1.0000
color : 1.000 1.000 1.000
active : true
radius : 20.0000
outer_angle : 30.0000
name : Test_Light
pcf_enabled : false
valid : true
}

@ -1,9 +1,9 @@
Entity
{
type : 6
material : 0
geometry : suzanne.symbres
active : true
name : Suzanne_0
}
Entity
{
type : 6
material : 0
geometry : suzanne.symbres
active : true
name : Suzanne_0
}

@ -326,8 +326,8 @@ void renderer_render(struct Renderer* renderer, struct Scene* scene)
int width, height;
struct Game_State* game_state = game_state_get();
window_get_size(game_state->window, &width, &height);
glViewport(0, 0, width * 2, height * 2);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, width, height);
GL_CHECK(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
shader_bind(renderer->composition_shader);
int final_render_tex = active_camera->render_tex == -1 ? renderer->def_albedo_tex : active_camera->render_tex;
texture_bind(final_render_tex);

@ -16,19 +16,19 @@ void config_vars_init(struct Hashmap* cvars)
hashmap_int_set(cvars, "render_width", 1280);
hashmap_int_set(cvars, "render_height", 720);
hashmap_bool_set(cvars, "vsync_enabled", true);
hashmap_int_set(cvars, "fog_mode", 0);
hashmap_vec3_setf(cvars, "fog_color", 0.9f, 0.2f, 0.2f);
hashmap_int_set(cvars, "fog_mode", 1);
hashmap_vec3_setf(cvars, "fog_color", 0.17f, 0.49f, 0.63f);
hashmap_float_set(cvars, "fog_density", 0.1f);
hashmap_float_set(cvars, "fog_start_dist", 10.f);
hashmap_float_set(cvars, "fog_max_dist", 50.f);
hashmap_float_set(cvars, "fog_max_dist", 450.f);
hashmap_vec3_setf(cvars, "ambient_light", 0.1f, 0.1f, 0.1f);
hashmap_bool_set(cvars, "msaa_enabled", 1);
hashmap_bool_set(cvars, "msaa_enabled", true);
hashmap_int_set(cvars, "msaa_levels", 4);
hashmap_bool_set(cvars, "debug_draw_enabled", true);
hashmap_bool_set(cvars, "debug_draw_physics", true);
hashmap_bool_set(cvars, "debug_draw_enabled", false);
hashmap_bool_set(cvars, "debug_draw_physics", false);
hashmap_int_set(cvars, "video_driver_linux", VD_WAYLAND);
hashmap_int_set(cvars, "debug_draw_mode", 0);
hashmap_vec4_setf(cvars, "debug_draw_color", 1.f, 0.f, 0.f, 1.f);
hashmap_vec4_setf(cvars, "debug_draw_color", 0.8f, 0.4f, 0.1f, 1.f);
hashmap_float_set(cvars, "player_move_speed", 10.f);
hashmap_float_set(cvars, "player_move_speed_multiplier", 2.f);
hashmap_float_set(cvars, "player_turn_speed", 5.f);

@ -78,7 +78,7 @@ bool init(void)
int width = hashmap_int_get(cvars, "render_width");
int height = hashmap_int_get(cvars, "render_height");
int msaa = hashmap_bool_get(cvars, "msaa_enabled");
bool msaa = hashmap_bool_get(cvars, "msaa_enabled");
int msaa_levels = hashmap_int_get(cvars, "msaa_levels");
bool vsync = hashmap_bool_get(cvars, "vsync_enabled");
window = window_create("Symmetry", width, height, msaa, msaa_levels, vsync);

@ -91,6 +91,13 @@ struct Window* window_create(const char* title, int width, int height, int msaa,
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
log_message("Window created and initialized with opengl core context %d.%d", major, minor);
int msaa_recieved = 0, msaa_recieved_levels = 0;
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &msaa_recieved);
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &msaa_recieved_levels);
log_message("MSAA : %d MSAA Levels : %d", msaa_recieved, msaa_recieved_levels);
return new_window;
}

@ -1,6 +1,4 @@
Todo:
- Implement HiDPI support
- Implement/Fix copying libraries to executable folder after build completes on mac os
- Fix all sound related bugs before moving on and finish sound
serialization to file
- Finish mesh and material properties serialization to and from file
@ -82,6 +80,7 @@ Todo:
? Better handling incase assets folder is not found
- Write entity to/from file
- Ogg format loading and playback
- Implement HiDPI support
- Sound streaming
- Implment missing sound source properties (inner/outer cone, getting sound source data)
- Shadow maps
@ -105,6 +104,7 @@ Improvements:
- Improve picking and automatically improve everything in editor
- Improve culling
- Allow scaling on all axes at once
- Improve grid/immediate mode drawing by switching to glDrawElements instead of glDrawArrays.
Bugs:
- Better handling of wav format checking at load time
@ -316,3 +316,4 @@ Done:
* Moved MAX_LIGHTS shader definition from inside the shader to be dynamically defined and added to the shader code when it is compiled
to reduce inconsistencies
* Fixed symlink issue in genie for macos which interferes with fopen operations
* Implement/Fix copying libraries to executable folder after build completes on mac os

Loading…
Cancel
Save