Skip to content

Commit

Permalink
Merge pull request #298 from Capital-Asterisk/session-rework
Browse files Browse the repository at this point in the history
Add `framework`, based on testapp
  • Loading branch information
Capital-Asterisk authored Sep 22, 2024
2 parents da9d3d4 + 29cae46 commit 1069fc0
Show file tree
Hide file tree
Showing 93 changed files with 7,636 additions and 6,859 deletions.
2 changes: 1 addition & 1 deletion src/adera/activescene/VehicleBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,4 @@ VehicleData VehicleBuilder::finalize_release()
return dataOut;
}

} // namespace testapp
} // namespace adera
2 changes: 1 addition & 1 deletion src/adera/activescene/VehicleBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,4 @@ VALUES_T& VehicleBuilder::node_values(NodeTypeId nodeType)
return rValues;
}

} // namespace testapp
} // namespace adera
1 change: 1 addition & 0 deletions src/adera/drawing/CameraController.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct ACtxCameraController
{
using EButtonControlIndex = osp::input::EButtonControlIndex;

ACtxCameraController() = default;
ACtxCameraController(osp::input::UserInputHandler &rInput)
: m_controls(&rInput)
, m_btnOrbit( m_controls.button_subscribe("cam_orbit"))
Expand Down
57 changes: 38 additions & 19 deletions src/osp/tasks/top_execute.h → src/adera_app/application.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Open Space Program
* Copyright © 2019-2022 Open Space Program Project
* Copyright © 2019-2024 Open Space Program Project
*
* MIT License
*
Expand All @@ -24,35 +24,54 @@
*/
#pragma once

#include "execute.h"
#include "tasks.h"
#include "top_tasks.h"
#include <osp/framework/framework.h>

#include <entt/core/any.hpp>

#include <vector>

namespace osp
namespace adera
{

struct MainLoopControl
{
bool doUpdate;
};

struct SceneLoopControl
{
bool doSceneUpdate;
};

void top_run_blocking(Tasks const& tasks, TaskGraph const& graph, TopTaskDataVec_t& rTaskData, ArrayView<entt::any> topData, ExecContext& rExec, WorkerContext worker = {});
struct WindowAppLoopControl
{
bool doResync;
bool doSync;
bool doRender;
};

struct TopExecWriteState
struct AppContexts
{
Tasks const &tasks;
TopTaskDataVec_t const &taskData;
TaskGraph const &graph;
ExecContext const &exec;
osp::fw::ContextId main;
osp::fw::ContextId window;
osp::fw::ContextId sceneRender;
osp::fw::ContextId universe;
osp::fw::ContextId scene;
};

struct TopExecWriteLog
struct FrameworkModify
{
Tasks const &tasks;
TopTaskDataVec_t const &taskData;
TaskGraph const &graph;
ExecContext const &exec;
struct Command
{
using Func_t = void(*)(osp::fw::Framework &rFW, osp::fw::ContextId ctx, entt::any userData);
entt::any userData;
osp::fw::ContextId ctx;
Func_t func;
};

std::vector<Command> commands;
};

std::ostream& operator<<(std::ostream& rStream, TopExecWriteState const& write);

std::ostream& operator<<(std::ostream& rStream, TopExecWriteLog const& write);

} // namespace testapp
} // namespace adera
Loading

0 comments on commit 1069fc0

Please sign in to comment.