Fixed long standing memory leak by using nk_buffer_clear each frame

dev
Shariq Shah 5 years ago
parent f2066acbbc
commit 815b39a08a
  1. 24
      assets/scenes/scene_1.symtres
  2. 2
      src/common/version.h
  3. 1
      src/game/gui.c
  4. 4
      todo.txt

@ -93,6 +93,30 @@ Entity
bounding_box_max : 0.500 0.500 0.500 bounding_box_max : 0.500 0.500 0.500
} }
Entity
{
type : 5
scale : 1.000 1.000 1.000
inner_angle : 20.0000
falloff : 0.9500
light_type : 2
depth_bias : 0.0005
rotation : 0.000 0.000 0.000 1.000
cast_shadow : false
intensity : 1.0000
color : 1.000 1.000 1.000
radius : 14.0000
position : -9.000 6.000 -42.000
flags : 1
outer_angle : 30.0000
name : Test_Light
archetype : spot
bounding_box_min : -0.500 -0.500 -0.500
pcf_enabled : false
valid : true
bounding_box_max : 0.500 0.500 0.500
}
Entity Entity
{ {
type : 6 type : 6

@ -4,7 +4,7 @@
/* Auto generated version file. DO NOT MODIFY */ /* Auto generated version file. DO NOT MODIFY */
#define SYMMETRY_VERSION_MAJOR 0 #define SYMMETRY_VERSION_MAJOR 0
#define SYMMETRY_VERSION_MINOR 3 #define SYMMETRY_VERSION_MINOR 3
#define SYMMETRY_VERSION_REVISION 372 #define SYMMETRY_VERSION_REVISION 373
#define SYMMETRY_VERSION_BRANCH "dev" #define SYMMETRY_VERSION_BRANCH "dev"
#endif #endif

@ -239,6 +239,7 @@ void gui_render(struct Gui* gui, enum nk_anti_aliasing AA)
offset += cmd->elem_count; offset += cmd->elem_count;
} }
nk_clear(&gui->context); nk_clear(&gui->context);
nk_buffer_clear(&gui->commands);
} }
shader_unbind(); shader_unbind();

@ -1,4 +1,5 @@
Todo: Todo:
- Fix frustum culling on player camera
- Don't save parent entity's transform when saving entity archetype. Only save the transformation values for children - Don't save parent entity's transform when saving entity archetype. Only save the transformation values for children
- Save case sensitive file names when scene entity entries - Save case sensitive file names when scene entity entries
- Disbale all player actions when scene cleared dialog or scene restart dialog are active - Disbale all player actions when scene cleared dialog or scene restart dialog are active
@ -430,4 +431,5 @@ Done:
* Memory utils that provide allocation tracking * Memory utils that provide allocation tracking
* Game End * Game End
* Save NONE when next_scene is not set and the scene is being saved * Save NONE when next_scene is not set and the scene is being saved
* Add player start entity that specifies where the player must start at the beginning of every level * Add player start entity that specifies where the player must start at the beginning of every level
* Fixed memory leak
Loading…
Cancel
Save