The full view is now the default. While the renderer process covers the whole view (Channel::covering, set after each frame it presents), the adapter skips the client's renderer's clears and draws, decided per frame; the client's renderer still gets state and resources, and draws again as soon as the renderer process stops covering the view. The client's window no longer gets WS_CLIPCHILDREN: the client draws when its window gets WM_PAINT, which a window entirely covered by clipped children never gets (it fell to about one frame a second). The flip model swap chain shows above the client's drawing anyway. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
64e152de3c
commit
2d9da249fa
9 files changed
+74
-27
No files matched your search
+9
-3
@@ -1,7 +1,10 @@
|
||||
#pragma once
|
||||
// The adapter's engine: what the client draws with. Everything goes to the client's own Direct3D renderer, which
|
||||
// still draws the whole 3D view, and is recorded for the renderer process, which draws its part on top (the right
|
||||
// half for now, to compare). If the renderer process fails, the client's renderer carries on alone.
|
||||
// The adapter's engine: what the client draws with. Everything is recorded for the renderer process, which draws the
|
||||
// 3D view. The client's own Direct3D renderer gets everything too (state and resources: it still draws into render
|
||||
// targets and reads textures back, which the renderer process doesn't yet), but while the renderer process covers the
|
||||
// whole view, the client's renderer skips its frames' clears and draws. When the renderer process doesn't cover it
|
||||
// (it failed, or shows only part of the view, for comparing) the client's renderer draws everything, from the next
|
||||
// frame on.
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
@@ -63,10 +66,13 @@ public:
|
||||
|
||||
private:
|
||||
void setState(protocol::State state, std::uint32_t value);
|
||||
// Whether the client's renderer should draw this frame's clears and draws.
|
||||
[[nodiscard]] bool innerDraws() const { return !takenOver_; }
|
||||
|
||||
imvu::SharedPtr<imvu::PiRenderEngine> inner_;
|
||||
std::shared_ptr<Recorder> recorder_;
|
||||
std::uint64_t frames_ = 0;
|
||||
bool takenOver_ = false; // this frame is drawn by the renderer process only
|
||||
int foreignLogged_ = 0; // diagnostics: textures the client renderer made, render targets
|
||||
|
||||
// Diagnostics: what the client draws, summed over 300 frames and logged (the first few times).
|
||||
|
||||
Reference in new issue
Block a user