The adapter starts one renderer process per client, with the first engine (again if it has exited), and attaches each engine's channel to it through a control section (protocol version 5: Control, the -attach event). The renderer process keeps a window, swap chain and scene per channel on one Direct3D device, takes the views' frames in turns, and closes a view when its engine does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6e4fe589e5
commit
8055099920
5 files changed
+404
-195
No files matched your search
@@ -7,7 +7,19 @@
|
||||
|
||||
namespace t5de::protocol {
|
||||
|
||||
inline constexpr std::uint32_t version = 4;
|
||||
inline constexpr std::uint32_t version = 5;
|
||||
|
||||
// One renderer process draws all of a client's 3D views. A shared memory section the adapter creates once per client
|
||||
// process, named by the renderer process's `--control <name>` argument, holds this; each engine's channel is named
|
||||
// "<name>-<n>", n counting from 0. Having created a channel, the adapter increments channels and sets the event
|
||||
// "<name>-attach" (auto-reset); the renderer process opens the channels it hasn't yet (those already gone are
|
||||
// skipped), and stops drawing a channel's view when its engine sets closing. It exits with the client.
|
||||
struct Control {
|
||||
std::uint32_t version;
|
||||
std::uint32_t channels; // channels created so far
|
||||
};
|
||||
|
||||
inline constexpr wchar_t attachEventSuffix[] = L"-attach";
|
||||
|
||||
// Which part of the client's 3D view the renderer process draws. Full is the default; the others are for comparing
|
||||
// with the client's renderer, which then draws the whole view under the renderer process's window.
|
||||
@@ -18,8 +30,8 @@ enum class View : std::uint32_t {
|
||||
Compare, // over the right half, the left half's scene: both renderers side by side, showing the same
|
||||
};
|
||||
|
||||
// A shared memory section the adapter creates for each engine, named by the renderer process's `--channel <name>`
|
||||
// argument: this header, then `capacity` bytes of data. The adapter sends the command stream (commands.hpp) through
|
||||
// A shared memory section the adapter creates for each engine (named as Control says): this header, then `capacity`
|
||||
// bytes of data. The adapter sends the command stream (commands.hpp) through
|
||||
// it in chunks: it waits for the event "<name>-consumed", writes a chunk and sets "<name>-ready"; the renderer
|
||||
// process copies the chunk out and sets "<name>-consumed" (both auto-reset; consumed starts set).
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user