add flag to toggle tracy (disabled for now)
This commit is contained in:
@ -9,7 +9,6 @@
|
||||
#include <raylib.h>
|
||||
#include <raymath.h>
|
||||
#include <thread>
|
||||
#include <tracy/Tracy.hpp>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
@ -20,6 +19,10 @@
|
||||
#include <BS_thread_pool.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef TRACY
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
class Mass {
|
||||
public:
|
||||
Vector3 position;
|
||||
@ -116,10 +119,18 @@ class ThreadedPhysics {
|
||||
using Command = std::variant<AddMass, AddSpring, ClearGraph>;
|
||||
|
||||
struct PhysicsState {
|
||||
#ifdef TRACY
|
||||
TracyLockable(std::mutex, command_mtx);
|
||||
#else
|
||||
std::mutex command_mtx;
|
||||
#endif
|
||||
std::queue<Command> pending_commands;
|
||||
|
||||
#ifdef TRACY
|
||||
TracyLockable(std::mutex, data_mtx);
|
||||
#else
|
||||
std::mutex data_mtx;
|
||||
#endif
|
||||
std::condition_variable_any data_ready_cnd;
|
||||
std::condition_variable_any data_consumed_cnd;
|
||||
unsigned int ups = 0;
|
||||
|
||||
Reference in New Issue
Block a user