You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
Allow to compile templates without physics servers
This commit is contained in:
@@ -38,12 +38,13 @@
|
||||
#include "servers/navigation_server_3d.h"
|
||||
#include "servers/rendering_server.h"
|
||||
|
||||
// 2D
|
||||
#ifndef PHYSICS_2D_DISABLED
|
||||
#include "servers/physics_server_2d.h"
|
||||
#endif // PHYSICS_2D_DISABLED
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
#include "servers/physics_server_3d.h"
|
||||
#endif // _3D_DISABLED
|
||||
#endif // PHYSICS_3D_DISABLED
|
||||
|
||||
Performance *Performance::singleton = nullptr;
|
||||
|
||||
@@ -203,27 +204,36 @@ double Performance::get_monitor(Monitor p_monitor) const {
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW);
|
||||
case PIPELINE_COMPILATIONS_SPECIALIZATION:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION);
|
||||
#ifndef PHYSICS_2D_DISABLED
|
||||
case PHYSICS_2D_ACTIVE_OBJECTS:
|
||||
return PhysicsServer2D::get_singleton()->get_process_info(PhysicsServer2D::INFO_ACTIVE_OBJECTS);
|
||||
case PHYSICS_2D_COLLISION_PAIRS:
|
||||
return PhysicsServer2D::get_singleton()->get_process_info(PhysicsServer2D::INFO_COLLISION_PAIRS);
|
||||
case PHYSICS_2D_ISLAND_COUNT:
|
||||
return PhysicsServer2D::get_singleton()->get_process_info(PhysicsServer2D::INFO_ISLAND_COUNT);
|
||||
#ifdef _3D_DISABLED
|
||||
case PHYSICS_3D_ACTIVE_OBJECTS:
|
||||
return 0;
|
||||
case PHYSICS_3D_COLLISION_PAIRS:
|
||||
return 0;
|
||||
case PHYSICS_3D_ISLAND_COUNT:
|
||||
return 0;
|
||||
#else
|
||||
case PHYSICS_2D_ACTIVE_OBJECTS:
|
||||
return 0;
|
||||
case PHYSICS_2D_COLLISION_PAIRS:
|
||||
return 0;
|
||||
case PHYSICS_2D_ISLAND_COUNT:
|
||||
return 0;
|
||||
#endif // PHYSICS_2D_DISABLED
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
case PHYSICS_3D_ACTIVE_OBJECTS:
|
||||
return PhysicsServer3D::get_singleton()->get_process_info(PhysicsServer3D::INFO_ACTIVE_OBJECTS);
|
||||
case PHYSICS_3D_COLLISION_PAIRS:
|
||||
return PhysicsServer3D::get_singleton()->get_process_info(PhysicsServer3D::INFO_COLLISION_PAIRS);
|
||||
case PHYSICS_3D_ISLAND_COUNT:
|
||||
return PhysicsServer3D::get_singleton()->get_process_info(PhysicsServer3D::INFO_ISLAND_COUNT);
|
||||
#endif // _3D_DISABLED
|
||||
#else
|
||||
case PHYSICS_3D_ACTIVE_OBJECTS:
|
||||
return 0;
|
||||
case PHYSICS_3D_COLLISION_PAIRS:
|
||||
return 0;
|
||||
case PHYSICS_3D_ISLAND_COUNT:
|
||||
return 0;
|
||||
#endif // PHYSICS_3D_DISABLED
|
||||
|
||||
case AUDIO_OUTPUT_LATENCY:
|
||||
return AudioServer::get_singleton()->get_output_latency();
|
||||
|
||||
Reference in New Issue
Block a user