载入中...
搜索中...
未找到
PixelWorldGraphics.cpp
浏览该文件的文档.
57PixelWorldAtlasRenderer& PixelWorldAtlasRenderer::operator=(PixelWorldAtlasRenderer&&) noexcept = default;
60 if (!world || !graphics) throw eve::Exception("PixelWorldAtlasRenderer::sync requires world and graphics");
146 throw eve::Exception("PixelWorldAtlasRenderer::drawDiagnostics requires world, graphics and positive scale");
209std::uint64_t PixelWorldAtlasRenderer::renderedRevision() const noexcept { return impl_->renderedRevision; }
210std::uint64_t PixelWorldAtlasRenderer::totalUploadedChunks() const noexcept { return impl_->totalUploadedChunks; }
211std::uint64_t PixelWorldAtlasRenderer::uploadCount() const noexcept { return impl_->uploadCount; }
215PixelWorldAtlasRenderer* PixelWorldGraphics::newRenderer(int originX, int originY, int width, int height) {
224 std::function<PixelWorldAtlasRenderer*()>([]() -> PixelWorldAtlasRenderer* { return nullptr; }),
std::map< std::shared_ptr< const std::vector< uint8_t > >, std::shared_ptr< DeviceBytes >, std::owner_less< std::shared_ptr< const std::vector< uint8_t > > > > uploads
Definition OnnxGpgpu.cpp:50
Definition Graphics.h:125
virtual void drawSolidRectRGBA(float x, float y, float w, float h, float r, float g, float b, float a=1.f)
Draws solid rect rgba.
Definition Graphics.cpp:1713
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:18
eve::Result< std::vector< PixelWorldPerformanceSample > > performanceSamples(std::uint64_t worldId, std::uint32_t limit=120) const
Copy up to the latest 256 simulation performance samples.
Definition PixelWorldControl.cpp:150
Sparse, chunked, deterministic 2D falling-material world.
Definition PixelWorld.h:224
Render-thread-affine RGBA atlas projection of a rectangular PixelWorld region. @ownership The rendere...
Definition PixelWorldGraphics.h:29
int drawDiagnostics(pixelworld::PixelWorld *world, graphics::Graphics *graphics, float scale)
Draw Chunk activity/temperature outlines and a bounded step-time graph.
Definition PixelWorldGraphics.cpp:143
std::uint64_t renderedRevision() const noexcept
Rendered revision.
Definition PixelWorldGraphics.cpp:209
std::uint64_t totalUploadedChunks() const noexcept
Total uploaded chunks.
Definition PixelWorldGraphics.cpp:210
PixelWorldAtlasRenderer(int originX, int originY, int width, int height)
Create a transparent atlas for [origin, origin + size). Throws on invalid size.
Definition PixelWorldGraphics.cpp:44
graphics::Texture * texture() const noexcept
Borrow the stable backend-owned atlas texture, or null before first sync. @ownership Graphics owns th...
Definition PixelWorldGraphics.cpp:204
int sync(pixelworld::PixelWorld *world, graphics::Graphics *graphics)
Patch changed CPU chunks and upload the atlas when its world revision advances.
Definition PixelWorldGraphics.cpp:59
~PixelWorldAtlasRenderer()
Pixel world atlas renderer.
Optional rendering satellite for the backend-neutral PixelWorld module.
Definition PixelWorldGraphics.h:88
PixelWorldAtlasRenderer * newRenderer(int originX, int originY, int width, int height)
Create a caller-owned atlas renderer for one world-space rectangle.
Definition PixelWorldGraphics.cpp:215
PixelWorldControlService & pixelWorldControlService()
Process-lifetime PixelWorld tooling registry.
Definition PixelWorldControl.cpp:31
MaterialId
Compact stable material identifier stored in each authoritative cell.
Definition PixelMaterial.h:16
@ Graphics
Definition Container.h:602
int originX
Definition PixelWorldGraphics.cpp:32
std::uint64_t totalUploadedChunks
Definition PixelWorldGraphics.cpp:39
int height
Definition PixelWorldGraphics.cpp:35
std::uint64_t uploadCount
Definition PixelWorldGraphics.cpp:40
std::uint64_t renderedRevision
Definition PixelWorldGraphics.cpp:38
graphics::Texture * texture
Definition PixelWorldGraphics.cpp:37
bool initialized
Definition PixelWorldGraphics.cpp:41
int originY
Definition PixelWorldGraphics.cpp:33
int width
Definition PixelWorldGraphics.cpp:34
std::vector< std::uint8_t > rgba
Definition PixelWorldGraphics.cpp:36