feat: Temporarily disable service initialization in ServiceBasedApp and add GetCurrentCommandBuffer and GetGraphicsQueue methods in GraphicsService

This commit is contained in:
2026-01-04 13:54:02 +00:00
parent 1276381117
commit 899e4763f2
3 changed files with 25 additions and 1 deletions

View File

@@ -54,7 +54,8 @@ void ServiceBasedApp::Run() {
try {
// Initialize all services
lifecycleController_->InitializeAll();
// Temporarily disabled for testing
// lifecycleController_->InitializeAll();
// Create the window
auto windowService = registry_.GetService<services::IWindowService>();

View File

@@ -20,6 +20,9 @@ public:
BulletPhysicsService() = default;
~BulletPhysicsService() override;
// IInitializable interface
void Initialize() override { Initialize(btVector3(0, -9.8f, 0)); }
// IPhysicsService interface
void Initialize(const btVector3& gravity = btVector3(0, -9.8f, 0)) override;
void Shutdown() noexcept override;

View File

@@ -205,4 +205,24 @@ VkFormat GraphicsService::GetSwapchainFormat() const {
return swapchainService_->GetFormat();
}
VkCommandBuffer GraphicsService::GetCurrentCommandBuffer() const {
logging::TraceGuard trace("GraphicsService::GetCurrentCommandBuffer");
if (!initialized_) {
return VK_NULL_HANDLE;
}
return renderCommandService_->GetCurrentCommandBuffer();
}
VkQueue GraphicsService::GetGraphicsQueue() const {
logging::TraceGuard trace("GraphicsService::GetGraphicsQueue");
if (!initialized_) {
return VK_NULL_HANDLE;
}
return deviceService_->GetGraphicsQueue();
}
} // namespace sdl3cpp::services::impl