wip: integrating threaded decoupled physics
Current Issues: - HUGE memory leak - HUGE amount of needles copying - FillGraph() does thousands of lock_guards instead of one - Can no longer rely on new states appearing immediately - have to check each access - Physics run as fast as possible, no constant sim speed` - Irregular long freezes
This commit is contained in:
@ -61,25 +61,29 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
auto AllocateGraphInstancing(const MassSpringSystem &mass_springs) -> void;
|
||||
auto AllocateGraphInstancing(const std::vector<Mass> &masses) -> void;
|
||||
|
||||
auto
|
||||
ReallocateGraphInstancingIfNecessary(const MassSpringSystem &mass_springs)
|
||||
auto ReallocateGraphInstancingIfNecessary(const std::vector<Mass> &masses)
|
||||
-> void;
|
||||
|
||||
public:
|
||||
auto UpdateTextureSizes() -> void;
|
||||
|
||||
auto DrawMassSprings(const MassSpringSystem &mass_springs,
|
||||
const State ¤t_state, const State &starting_state,
|
||||
const std::unordered_set<State> &winning_states,
|
||||
const std::unordered_set<State> &visited_states) -> void;
|
||||
auto DrawMassSprings(
|
||||
const std::vector<Mass> &masses,
|
||||
const std::unordered_map<State, int> &state_masses,
|
||||
const std::vector<Spring> &springs,
|
||||
const std::unordered_map<std::pair<State, State>, int> state_springs,
|
||||
const State ¤t_state, const State &starting_state,
|
||||
const std::unordered_set<State> &winning_states,
|
||||
const std::unordered_set<State> &visited_states) -> void;
|
||||
|
||||
auto DrawKlotski(const State &state, int hov_x, int hov_y, int sel_x,
|
||||
int sel_y, int block_add_x, int block_add_y,
|
||||
const WinCondition win_condition) -> void;
|
||||
|
||||
auto DrawMenu(const MassSpringSystem &mass_springs, int current_preset,
|
||||
auto DrawMenu(const std::vector<Mass> &masses,
|
||||
const std::vector<Spring> &springs, int current_preset,
|
||||
const State ¤t_state,
|
||||
const std::unordered_set<State> &winning_states) -> void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user