载入中...
搜索中...
未找到

#include <Graphics.h>

类 eve::graphics::Graphics 继承关系图:
eve::IFramePresentation eve::graphics::IPostFX eve::graphics::ISolidRectRenderer eve::graphics::IResourceFactory eve::graphics::ICanvasTarget eve::graphics::ICanvasFactory eve::graphics::IGraphics3D eve::graphics::IGraphics2D eve::IWindowSurfaceHost eve::graphics::Canvas eve::Module eve::graphics::vulkan::Graphics eve::graphics::webgpu::Graphics

类

struct  DeferredFileTexture
 DeferredFileTexture public API. 更多...
 
struct  DisplayOutputSupport
 Surface present formats the current device/window can offer. 更多...
 
struct  EntityIdDraw
 Per-pixel mesh entity-ID pass. Renders each EntityIdDraw's mesh with the given flat idColor (RGB encodes a stable entity id) into an offscreen target using the same viewProj, then reads it back to CPU. Pixels not covered by any entity are (0,0,0,0). Caller owns the returned ImageData*. Returns nullptr when the backend does not support offscreen ID capture. 更多...
 

Public 类型

enum class  SceneColorDistortionStatus { Queued , Unavailable }
 Refract the resolved 3D scene color through a displacement texture. 更多...
 
enum class  Mesh3DSceneColorCaptureStatus {
  ExplicitOverride , Scheduled , Captured , HistoryReuse ,
  Unavailable
}
 Observable result of requesting a same-frame mesh SceneColor snapshot. 更多...
 
enum class  SceneToneMapping { None , Aces , Filmic }
 Final display mapping; None preserves linear color, Aces uses the fitted curve, and Filmic uses Rec.709/AP1. 更多...
 
enum class  DisplayOutputMode { Sdr , Auto , Hdr10 , ScRgb }
 Requested swapchain present preference. 更多...
 
enum class  DisplayColorSpace { Sdr , ScRgb , Hdr10 }
 Color space actually selected for the live swapchain. 更多...
 
using WindowDestroyedCallback = void(*)(void *userdata)
 Register a callback invoked when the native window is destroyed. Used by the UI backend to tear down its ImGui context; callbacks are cleared (and invoked) on onNativeWindowDestroyed().
 
using PresentOverlayFn = bool(*)(void *userdata, void *commandBuffer)
 Optional overlay drawn inside the swapchain render pass (before end). Used by declarative UI (ImGui). commandBuffer is a VkCommandBuffer as void*. Called with commandBuffer == nullptr as a probe: return true only when this frame has overlay draw data, so the backend can skip an empty UI pass.
 

Public 成员函数

 Module_REG (Graphics)
 
 Graphics ()
 Graphics.
 
 ~Graphics () override
 Graphics.
 
virtual void reset ()
 Resets the current color, background color, line style, and so forth.
 
virtual void clearScreen ()
 Script-friendly wrappers (r,g,b[,a] floats — no Color type in Squirrel).
 
virtual void setBackgroundColorRGBA (float r, float g, float b, float a=1.f)
 Sets the background color rgba.
 
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.
 
virtual void drawTexturedRectRGBA (Texture *texture, float x, float y, float w, float h, float r, float g, float b, float a=1.f)
 Draws textured rect rgba.
 
virtual void drawTexturedRectRotatedRGBA (Texture *texture, float cx, float cy, float w, float h, float degrees, float r, float g, float b, float a=1.f)
 绕矩形中心旋转 degrees 度(顺时针,屏幕 Y 向下)的贴图绘制。
 
virtual void drawSolidRect (float x, float y, float w, float h, float r, float g, float b, float a=1.f)
 RGBA-float overload matching the script-facing drawSolidRect name.
 
virtual void drawTexturedRect (Texture *texture, float x, float y, float w, float h, float r, float g, float b, float a=1.f)
 RGBA-float overload matching the script-facing drawTexturedRect name.
 
void renderSprites ()
 Draw all live Sprite2D entities into the current frame without presenting.
 
Renderable2D * newSprite2D ()
 Create a script-facing Sprite2D ECS entity. Call destroy() when done.
 
Texture * newTextureFromImageData (image::ImageData *data, bool repeatU=false, bool repeatV=false)
 Creates a texture from image data. @ownership Caller deletes unless documented otherwise.
 
Texture * newTextureFromImageData (image::ImageData *data, const TextureCreateInfo &info)
 Upload RGBA8 ImageData with mipmaps / filter / anisotropy options.
 
eve::Result< void > updateTextureFromImageData (Texture *texture, image::ImageData *data)
 Upload the current RGBA8 pixels of ImageData into an existing texture in place.
 
Texture * newTextureWithSampler (image::ImageData *data, bool repeatU, bool repeatV, bool generateMipmaps, float maxAnisotropy, const std::string &filter, const std::string &mipmap, float lodBias=0.f)
 Script-friendly texture create: filter = "linear"|"nearest", mipmap = "none"|"linear"|"nearest". generateMipmaps builds a full mip chain; maxAnisotropy > 1 enables anisotropic filtering.
 
virtual void setTextureSampler (Texture *texture, const std::string &filter, const std::string &mipmap, float maxAnisotropy, float lodBias)
 Update sampler state without re-uploading pixels (filter / mip / aniso / LOD bias). Script-facing name is setTextureSampler (see Graphics::expose); this string overload keeps the C++ name identical to the script API.
 
virtual void present ()=0
 Present.
 
virtual std::string getBackendName () const =0
 Renderer backend id used by sibling modules (e.g. Gpgpu).
 
virtual bool supportsRuntimeGlslCompilation () const
 Whether this backend and build can compile GLSL to SPIR-V at runtime.
 
std::weak_ptr< const void > resourceLifetime () const
 Observe this provider's resource lifetime without extending it.
 
Result< eve::Subscription > onResourcesRetiring (std::function< void()> callback) const
 Register cleanup before this provider destroys its GPU device/resources.
 
virtual bool supportsGBufferPost () const
 Whether gbuffer-based post-process shaders (AO, GI) can be created on this backend. Backends may use different shader source languages while preserving the same render-control contract.
 
virtual bool supportsDeferredLighting () const
 True when the backend can run Hybrid clustered deferred lighting.
 
virtual void drawDeferredLighting ()
 Fullscreen deferred lighting into the open scene-color pass. Samples GBuffer + clustered lights + CSM. No-op when unsupported or no GBuffer. Call after begin3DFrame with view/lighting/shadows/clustered state already set.
 
virtual bool supportsGpuDriven3D () const
 True when the backend can run GPU-driven opaque draws.
 
virtual bool supportsRayTracing () const
 True when the Vulkan device enabled the KHR ray-tracing path. WebGPU and software devices return false; screen-space reflections remain the portable path.
 
virtual RayTracingCaps rayTracingCaps () const
 Probed ray-tracing capabilities (empty when unsupported).
 
virtual bool gpuDrivenEnabled () const
 Whether the GPU-driven opaque path is currently enabled.
 
virtual void gpuDrivenSetEnabled (bool enabled)
 Enable/disable the GPU-driven opaque path (no-op when unsupported).
 
virtual uint32_t gpuDrivenMeshRecord (Mesh *mesh)
 GPU mesh-table slot for a mesh (kInvalidGpuDrivenSlot when not uploaded).
 
virtual uint32_t gpuDrivenMaterialRecord (Material *material)
 GPU material-table slot for a material (lazily created).
 
virtual Result< void > gpuDrivenReleaseMaterialRecord (Material *material)
 Release a lazily-created GPU material-table record.
 
virtual bool gpuDrivenMaterialUsable (Material *material)
 Whether a material can be shaded by the GPU-driven opaque path. Backends/drivers with descriptor-indexing limitations return false for materials that would hit the limitation; RenderSystem3D then falls back.
 
virtual uint32_t gpuDrivenReflectionProbeSlot (Texture *cubemap)
 Return/register a bindless cubemap slot for a GPU-driven local probe.
 
virtual bool supportsGpuParticles () const
 True when this backend supports resident compute + indirect particle draws.
 
virtual bool canSubmitGpuParticles () const
 True when the current frame topology can accept a GPU particle compute section.
 
virtual GpuParticleHandle createGpuParticleEmitter (std::uint32_t capacity)
 Allocate backend-owned resident state for one particle emitter.
 
virtual void releaseGpuParticleEmitter (GpuParticleHandle handle)
 Release a GPU particle emitter. Explicit release may wait for in-flight frames.
 
virtual void resetGpuParticleEmitter (GpuParticleHandle handle)
 Clear resident state before the next submitted frame.
 
virtual bool updateGpuParticleEmitter (GpuParticleHandle handle, const GpuParticleUpdate &update, const GpuParticleSpawn *spawns, std::uint32_t spawnCount)
 Upload one simulation step and optional spawn commands. @compatibility Preserves the established GPU-particle boolean submission contract.
 
virtual bool drawGpuParticleEmitter (GpuParticleHandle handle, const GpuParticleDraw &draw)
 Queue an indirect draw at the current 2D overlay position.
 
virtual GpuParticleStats getGpuParticleStats (GpuParticleHandle handle) const
 Return the latest fence-complete counters without waiting on the GPU.
 
virtual bool gpuDrivenSubmitOpaque (const GpuInstance *instances, uint32_t instanceCount)
 Upload + record GPU-driven opaque draws (call inside the open 3D frame). The backend sorts instances by (material, mesh), merges buckets and emits indirect draws itself; the caller only supplies the raw instance list.
 
virtual GpuResidentSubmitStatus gpuDrivenSubmitResident (const GpuResidentInstanceBatch &batch)
 Submit a GPU-authored, bucket-sorted GpuInstance buffer without CPU readback.
 
virtual bool gpuDrivenCullEnabled () const
 True when the stage-2 GPU cull chain will run this frame.
 
virtual bool gpuDrivenScenePassPending () const
 Scene pass opening deferred until after the compute cull section.
 
virtual bool gpuDrivenCullBegin (const GpuInstance *instances, uint32_t instanceCount)
 Upload sorted instances + bucket metadata for the cull chain.
 
virtual void gpuDrivenCullEmit (const glm::mat4 &viewProj, const glm::vec3 &eye, float fovYDeg, float nearZ, float farZ)
 Record the cull + emit compute dispatches for the current frame.
 
virtual void gpuDrivenOpenScenePass ()
 Open the scene color pass that begin3DFrame deferred (cull path).
 
virtual void gpuDrivenDrawOpaque ()
 Draw the opaque geometry with GPU-written indirect commands.
 
virtual bool gpuDrivenResolveWanted () const
 True when the stage-3 vis+resolve path should run this frame.
 
virtual void gpuDrivenRecordVisPass ()
 Record the GBuffer vis pass (opaque indirect draws write visID/visBary).
 
virtual void gpuDrivenResolve ()
 Record the fullscreen vis resolve inside the open scene color pass.
 
virtual std::uint32_t gpuDrivenVgUpload (const GpuVgAssetUpload &asset)
 Upload a virtual-geometry asset into the shared cluster pool.
 
virtual std::uint32_t gpuDrivenVgAssetId (Mesh *mesh) const
 VG asset id attached to a mesh (kInvalidGpuDrivenSlot when none).
 
virtual bool gpuDrivenVgAttachToMesh (Mesh *mesh, std::uint32_t vgAssetId)
 Attach an uploaded VG asset to a mesh (routes it to the VG path).
 
virtual bool gpuDrivenVgSetInstance (std::uint32_t vgAssetId, const glm::mat4 &model, std::uint32_t materialId)
 Register one instance of a VG asset this frame (model + material). The first instance per asset wins; returns false for unknown assets.
 
virtual void gpuDrivenVgComputeSection (const glm::mat4 &viewProj, const glm::vec3 &eye, float fovYDeg, float nearZ, float farZ)
 Record the HZB build + cull-params section (VG-only frames).
 
virtual void initWithWindow (void *nativeWindow)=0
 Bind to an existing native window (SDL_Window*) and create Vulkan device/swapchain. Must be called after the window exists (SDL_WINDOW_VULKAN).
 
virtual void initHeadless (int width, int height)
 Initialize the renderer without a window or swapchain (headless mode). Creates a GPU device and offscreen render targets; present() becomes a no-op. Rendering goes through Canvas + readback (newImageData / readPixels).
 
virtual bool isHeadless () const
 True when the renderer was initialized via initHeadless().
 
virtual void setViewportSize (int width, int height, int pixelwidth, int pixelheight)=0
 Sets the current graphics display viewport dimensions.
 
int getWidth () const
 Returns the width.
 
int getHeight () const
 Returns the height.
 
int getPixelWidth () const
 Returns the pixel width.
 
int getPixelHeight () const
 Returns the pixel height.
 
double getCurrentDPIScale () const
 Returns the current dpi scale.
 
double getScreenDPIScale () const
 Returns the screen dpi scale.
 
std::shared_ptr< PrimitiveScene > getPrimitiveScene () const noexcept
 Returns the authoritative persistent spatial-primitive scene.
 
virtual void drawSolidRect (float x, float y, float w, float h, const Color &color, BlendMode blend=BlendMode::Alpha)=0
 Internal immediate-mode helper used by RenderSystem / Batcher.
 
virtual void drawSolidRectRotated (float cx, float cy, float w, float h, float degrees, const Color &color, BlendMode blend=BlendMode::Alpha)=0
 Rotated solid quad degrees clockwise (screen Y-down) around (cx, cy).
 
virtual Texture * newTexture (int width, int height, const uint8_t *rgba, bool repeatU=false, bool repeatV=false)=0
 Creates a texture. @ownership Caller deletes unless documented otherwise.
 
virtual Texture * newTexture (int width, int height, const uint8_t *rgba, const TextureCreateInfo &info)=0
 Creates a texture. @ownership Caller deletes unless documented otherwise.
 
virtual Texture * newCubemap (int faceSize, const uint8_t *rgbaFaces)=0
 Create an RGBA8 cubemap from 6 faces packed as +X,-X,+Y,-Y,+Z,-Z (each faceSize×faceSize, total bytes = faceSize²×4×6). Owned by Graphics.
 
virtual Texture * newCubemap (int faceSize, const uint8_t *rgbaFaces, const TextureCreateInfo &info)=0
 Cubemap with GGX specular mips and final diffuse-irradiance mip.
 
virtual Texture * newHDRCubemap (int faceSize)
 Allocate a linear RGBA16F six-layer staging cubemap for runtime capture.
 
virtual bool copyHDRCanvasToCubemapFace (Canvas *source, Texture *cubemap, int face)
 Copy one RGBA16F Canvas into a staging cubemap base-level face.
 
virtual bool copyHDRCanvasesToCubemap (Canvas *const *sources, int faceCount, Texture *cubemap)
 Copy consecutive RGBA16F canvases into cubemap base-level faces.
 
virtual bool filterHDRReflectionCubemap (Texture *cubemap, int sampleCount=64)
 Generate GGX specular mips and final diffuse irradiance for an HDR cubemap. @compatibility Preserves the established backend boolean submission contract.
 
virtual Texture * newTexture (image::ImageData *data)=0
 Create texture from ImageData (RGBA8 required for now).
 
virtual Texture * newTexture (image::ImageData *data, const TextureCreateInfo &info)=0
 Create texture from ImageData with sampler / mipmap options.
 
virtual bool updateTexture (Texture *texture, int width, int height, const uint8_t *rgba)=0
 Replace an existing texture's pixels in place (pointer stays stable).
 
virtual eve::Result< void > updateTextureFromResidentRgba8 (Texture *texture, const GpuResidentBufferView &source, int width, int height)
 Copy a same-device resident RGBA8 buffer into an existing texture.
 
virtual eve::Result< void > updateTextureRegion (Texture *texture, int x, int y, int width, int height, std::span< const std::uint8_t > rgba, std::size_t bytesPerRow=0)=0
 Upload one tightly packed or row-strided RGBA8 rectangle into mip level zero.
 
virtual eve::Result< void > updateTextureRegions (Texture *texture, std::span< const TextureRegionUpload > regions)=0
 Validate then upload multiple independent mip-zero RGBA8 regions as one batch.
 
virtual void setTextureSampler (Texture *texture, const TextureSampler &sampler)=0
 Recreate the sampler for an existing texture (keeps image / mip chain). No-op when texture is null or not owned by this Graphics.
 
virtual float getMaxAnisotropy () const =0
 Device max supported anisotropy (1 if unsupported). Valid after initWithWindow.
 
virtual Texture * newTextureFromFile (const std::string &filename)=0
 Creates a texture from file. @ownership Caller deletes unless documented otherwise.
 
Texture * newTextureFromFileRepeated (const std::string &filename, bool repeatU, bool repeatV)
 Creates a texture from file repeated. @ownership Caller deletes unless documented otherwise.
 
void ensureFileTexturesReady ()
 Finish CPU decode and GPU upload for outstanding newTextureFromFile results. @thread Game/render thread that owns the device.
 
virtual bool reloadTextureFromFile (const std::string &filename)=0
 Reload a path-cached texture from disk in place (pointer stable). False if unbound.
 
virtual bool releaseTexture (Texture *texture)
 Eagerly releases a texture created by this Graphics.
 
virtual void drawTexturedRect (Texture *texture, float x, float y, float w, float h, const Color &color)=0
 Draws textured rect.
 
virtual void drawTexturedRectShader (Texture *texture, Shader *shader, float x, float y, float w, float h, const Color &color)=0
 Draw with an explicit Shader (nullptr = default textured pipeline).
 
virtual void drawTexturedRectUV (Texture *texture, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color)=0
 Draw a textured sub-rect (atlas / tile UVs). texture may be null → solid.
 
virtual void drawTexturedRectShaderUV (Texture *texture, Shader *shader, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0
 UV draw with an explicit Shader (nullptr = default textured pipeline).
 
virtual void drawTexturedRectShaderUVRotated (Texture *texture, Shader *shader, float cx, float cy, float w, float h, float degrees, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0
 UV draw rotated degrees clockwise (screen Y-down) around the rect center. texture may be null → solid. Shader nullptr = default textured pipeline.
 
virtual void drawTexturedRectShaderDepth (Texture *color, Texture *depth, Shader *shader, float x, float y, float w, float h, const Color &tint)=0
 Fullscreen/post draw sampling color at binding 0 and depth at binding 1 (hardware D32, .r = Vulkan NDC z). depth may be null → color is bound twice.
 
virtual void drawTexturedRectShaderDepthMotion (Texture *color, Texture *depth, Texture *motion, Shader *shader, float x, float y, float w, float h, const Color &tint)=0
 Post draw with color, depth/history and motion/reactive textures.
 
virtual void drawTexturedRectShader4 (Texture *color, Texture *depth, Texture *motion, Texture *extra, Shader *shader, float x, float y, float w, float h, const Color &tint)=0
 Post draw with four sampled textures at bindings 0, 1, 2 and 3.
 
virtual void drawTexturedRectShader5 (Texture *color, Texture *depth, Texture *motion, Texture *extra, Texture *specular, Shader *shader, float x, float y, float w, float h, const Color &tint)=0
 Post draw with five sampled textures at bindings 0 through 4.
 
virtual SceneColorDistortionStatus drawSceneColorDistortionUVRotated (Texture *displacement, float cx, float cy, float w, float h, float degrees, float u0, float v0, float u1, float v1, float strengthPixels, float opacity, bool rotatedUV=false)
 Draws scene color distortion uv rotated.
 
virtual void drawTexturedRectLitUV (Texture *albedo, Texture *normal, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color, BlendMode blend=BlendMode::Alpha)=0
 Lit 2D draw (albedo + normal map). Uses Lighting2DUBO from setLighting2D. normal may be null → treated as flat (0.5,0.5,1) only if a default normal tex exists.
 
virtual void drawTexturedRectLitUVRotated (Texture *albedo, Texture *normal, float cx, float cy, float w, float h, float degrees, float u0, float v0, float u1, float v1, const Color &color, BlendMode blend=BlendMode::Alpha)=0
 Lit 2D draw rotated degrees clockwise (screen Y-down) around (cx, cy). Fragment tangent frame is rebuilt from screen/UV derivatives so normal maps stay aligned with the rotated albedo.
 
virtual void setLighting2D (const Lighting2DUBO &ubo)=0
 Upload per-frame / per-canvas 2D lighting constants for subsequent lit draws.
 
Quad * newQuad (int x, int y, int w, int h)
 Pixel-space atlas rect. Caller owns Quad* (not tracked by Graphics).
 
virtual Mesh * newMeshFromAssimp (const ::aiMesh &mesh)=0
 Creates a mesh from assimp. @ownership Caller deletes unless documented otherwise.
 
virtual Mesh * newMeshFromAssimp (const ::aiMesh &mesh, const aiMatrix4x4 &worldTransform)=0
 Like newMeshFromAssimp, but bakes an Assimp node world transform into positions and transforms normals by the inverse-transpose of the upper 3x3. Required for hierarchical glTF/FBX scenes — raw aiMesh verts are in local space.
 
virtual Mesh * newMeshFromArrays (const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
 Upload a triangle mesh from packed CPU arrays. Owned by Graphics. posXYZ required (vertexCount*3). nrmXYZ/uvST may be null (flat normal / zero UV). indices required (indexCount, triangles).
 
virtual Mesh * newMeshFromArraysColored (const float *posXYZ, const float *nrmXYZ, const float *uvST, const float *colorRGBA, int vertexCount, const uint32_t *indices, int indexCount)=0
 Upload a triangle mesh with an optional packed RGBA color per vertex.
 
virtual std::optional< MeshBackendDescriptor > describeMesh (Mesh *mesh) const
 Describe a live mesh created by this Graphics backend.
 
virtual bool updateMeshVertices (Mesh *mesh, const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
 In-place update of a mesh's vertex/index data (CPU -> host-visible VBO). Mirrors bakeMeshMorph: the update synchronizes with in-flight GPU work, so prefer rebuilding only when content actually changes. The mesh's buffer is reused while it fits (stable GPU handle) and reallocated when the new size grows. Returns false when unsupported by a backend. posXYZ/nrmXYZ follow newMeshFromArrays layout (uvST may be null); indices/indexCount may be null/0 to keep the mesh's existing indices.
 
virtual bool setMeshSkinningData (Mesh *mesh, const uint16_t *joints4, const float *weights4, int vertexCount)
 Upload four joint indices and weights per vertex for built-in GPU skinning.
 
virtual bool bakeMeshMorph (Mesh *mesh)=0
 If mesh morph weights are dirty, bake blended positions and upload to the GPU VBO. Returns true when an upload happened. No-op when no morph data / not dirty / null.
 
virtual Mesh * newMeshSphere (int slices=32, int stacks=16)=0
 Procedural UV sphere (radius 1, Y-up). Owned by Graphics. slices = longitude divisions, stacks = latitude divisions.
 
virtual Mesh * newMeshCylinder (int slices=32, int stacks=1, bool caps=true)=0
 Procedural Y-up cylinder (radius 1, height 2 centered at origin). slices = longitude divisions; stacks = height bands; caps = include end discs. Owned by Graphics.
 
Mesh * newMeshCube (float size=1.f)
 Procedural cube (edge length size, centered at origin, outward CCW for RH Y-up), with per-face normals and a full 0..1 UV per face. Owned by Graphics.
 
virtual bool releaseMesh (Mesh *mesh)
 Eagerly releases a mesh created by this Graphics.
 
virtual void render3D ()
 Run RenderSystem3D (begin3DFrame + draw visible Renderable3D).
 
virtual void renderScene3DToCanvas (Canvas *canvas, Camera3D *camera)
 Preview-quality 3D pass into an offscreen Canvas (editor viewport): renders visible Renderable3D with camera into canvas, whose texture can then be shown inside a UI Viewport widget. See RenderSystem3D::renderToCanvas.
 
virtual void setDirectionalLight (float dx, float dy, float dz, float r=1.f, float g=1.f, float b=1.f)
 Sets the directional light.
 
virtual void drawScene3DRGBA (float x, float y, float w, float h, float r=1.f, float g=1.f, float b=1.f, float a=1.f)
 Composite this frame's 3D scene color into a rect (screen or active Canvas). Call after render3D(); order vs drawSolidRect / drawTexturedRect is preserved. If never called, present() still blits the 3D scene fullscreen under 2D. RGB is blitted opaque (scene A is linear depth, not transparency).
 
void drawScene3D (float x, float y, float w, float h)
 Script-friendly 4-arg form (simplesquirrel does not apply C++ defaults).
 
virtual void drawCanvasRGBA (Canvas *canvas, float x, float y, float w, float h, float r=1.f, float g=1.f, float b=1.f, float a=1.f)
 Draw a Canvas color buffer as a textured rect (same batch order as other 2D).
 
void drawCanvas (Canvas *canvas, float x, float y, float w, float h)
 Draws a Canvas with opaque white tint (script-friendly defaults).
 
virtual void pushValidationScope ()=0
 Backend hooks so the platform-independent render3D() can wrap its work in a GPU validation error scope (used on WebGPU to catch early device errors).
 
virtual void popValidationScope ()=0
 Pops validation scope.
 
Material * newMaterial ()
 Create a Material asset (shading model + textures + PBR knobs). Caller owns Material*; not tracked by Graphics.
 
RenderControl * getRenderControl ()
 Shared compilable 3D render control (features → pass list + GBuffer). Owned by Graphics; valid for the module lifetime.
 
virtual void beginGBufferPass (int width, int height)=0
 Depth/normal(/albedo) fill pass for mid/post effects. One-shot submit (like shadow); call before begin3DFrame when enabled. After endGBufferPass, textures are available via getRenderControl()->getGBuffer().
 
virtual void drawMeshGBuffer (Mesh *mesh, const glm::mat4 &mvp, const glm::mat4 &model, float nearZ, float farZ, Texture *albedo=nullptr, float tintR=1.f, float tintG=1.f, float tintB=1.f, float motionX=0.f, float motionY=0.f, float roughness=0.45f, float metallic=0.f)=0
 Draws mesh g buffer.
 
virtual void drawMeshGBufferAlpha (Mesh *mesh, const glm::mat4 &mvp, const glm::mat4 &model, float nearZ, float farZ, Texture *albedo=nullptr, float tintR=1.f, float tintG=1.f, float tintB=1.f, float motionX=0.f, float motionY=0.f, float roughness=0.45f, float metallic=0.f)=0
 GBuffer fill with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): same outputs as drawMeshGBuffer, but transparent texels are discarded so depth/normal follow the silhouette. No-op on backends without the alpha pipeline (WebGPU).
 
virtual void endGBufferPass ()=0
 Ends g buffer pass.
 
virtual void begin3DFrame ()=0
 Begin a 3D frame: shadow/gbuffer (if pending) then a sampleable scene color pass (color+depth). Leaves the pass open for drawMesh and a following RenderSystem::render (2D). Does not present. flushToSwapchain resolves the scene color (FXAA when "aa" is on) into the swapchain, then draws 2D overlays. Soft-fails (no throw) when the swapchain cannot be acquired yet — check had3DThisFrame().
 
virtual void begin3DFrameToCanvas (Canvas *canvas)=0
 Open a 3D render pass targeting an offscreen Canvas (color + depth) at the canvas size. Uses setMesh3DViewProj/View/CameraPos/Env as the camera. Draw meshes with drawMeshShader, then call end3DFrameToCanvas(). The canvas texture then holds the rendered scene (e.g. a planar reflection). Unsupported if canvas is not an offscreen canvas (screen).
 
virtual void end3DFrameToCanvas ()=0
 Ends 3 d frame to canvas.
 
virtual float getLastOffscreen3DGpuDurationMs () const
 Return the GPU timestamp duration of the most recently completed offscreen 3D pass, in milliseconds. Zero means unavailable.
 
virtual void setMesh3DViewProj (const glm::mat4 &viewProj)=0
 Sets the mesh 3 d view proj.
 
virtual void setMesh3DView (const glm::mat4 &view)=0
 Camera view matrix for subsequent drawMesh (view-space depth / CSM select).
 
virtual void setMesh3DClip (float nearZ, float farZ)=0
 Near/far used to pack linear depth into scene color A (SSGI).
 
virtual Texture * getSceneColorTexture ()
 Sampleable 3D color target for the current frame (RGB = lit, A = linear depth). Valid after begin3DFrame until present; nullptr when 3D did not run offscreen.
 
virtual Texture * getSceneLinearDepthTexture ()
 Sampleable scene linear depth in [0,1], or nullptr when unavailable.
 
virtual image::ImageData * renderEntityIdMask (const std::vector< EntityIdDraw > &draws, const glm::mat4 &viewProj, int w, int h)
 Renders entity id mask.
 
virtual image::ImageData * readGBufferToImageData (const std::string &attachment)
 Read a G-buffer attachment back to CPU as RGBA8. name is one of "depth" (RGBA8 linear depth), "normal" (world normal*0.5+0.5), "albedo". Valid only after a G-buffer or entity-ID offscreen pass filled it. Caller owns the returned ImageData*. Returns nullptr when unsupported.
 
virtual image::ImageData * readDecalLayerToImageData (const std::string &attachment)
 Read back a DecalLayer attachment ("albedo" | "normal" | "params") to CPU. Renders the pending G-buffer + decal passes in one immediate submit first, so it also works headless (no swapchain). Nullptr when unsupported or no resources.
 
virtual void drawMesh (Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint)=0
 Draw one mesh with model matrix. Requires begin3DFrame() (or an open swapchain pass).
 
virtual void drawMeshShader (Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint, Shader *shader)=0
 Draw mesh with an explicit Mesh3D Shader (nullptr = default PBR pipeline).
 
virtual Result< void > drawMeshShaderInstances (Mesh &mesh, Shader &shader, const glm::mat4 &model, const Color &tint, std::uint32_t first, std::uint32_t count)
 Draw a checked range from a resource shader's immutable instance matrix buffer. @ownership Mesh and Shader remain Graphics-owned; references are borrowed only for this call. @lifetime GPU copies remain alive through submission under Graphics resource ownership. @thread Render thread, inside an open 3D pass; no script callbacks or reentrancy.
 
virtual void setMesh3DNormalTexture (Texture *normal)=0
 Optional normal map for the next drawMesh / drawMeshShader (nullptr = flat).
 
virtual void setMesh3DPackedNormalMask (bool enabled)=0
 Interpret normal texture RG as tangent XY, B as AO and A as smoothness for terrain surfaces.
 
virtual void setMesh3DHeightTexture (Texture *height)=0
 Optional height map for parallax (R channel; nullptr = flat / off).
 
virtual void setMesh3DVirtualTexture (bool enabled, int pageCountX, int pageCountY, int atlasSlotsX, int atlasSlotsY, float borderFraction)=0
 Configure page-table sampling for the next mesh draw.
 
virtual void setMesh3DSceneDepth (Texture *depth)=0
 Optional scene hardware depth (G-buffer hwDepth, Vulkan NDC z) bound to mesh3d shader binding 7. X-ray mesh shaders sample it to discard visible (non-occluded) fragments. nullptr falls back to a placeholder.
 
virtual void setMesh3DSceneColor (Texture *color)=0
 Optional completed scene-color snapshot for custom mesh shaders.
 
virtual Mesh3DSceneColorCaptureStatus captureMesh3DSceneColor ()
 Make opaque scene color available to subsequent refractive mesh draws.
 
virtual void setMesh3DMaterial (float metallic, float roughness)=0
 Metallic (0..1) and roughness (0..1) for the next default mesh draw.
 
virtual Result< void > setMesh3DPbrSurface (const PbrSurface *surface)
 Copy a validated extended surface for subsequent draws; null resets to legacy shading.
 
virtual void setMesh3DSurface (SurfaceMode mode, BlendMode blend, bool depthWrite, bool doubleSided, float alphaCutoff, const std::string &alphaTechnique="cutoff")=0
 Select pipeline state for subsequent mesh draws.
 
virtual void setMesh3DTexCellBomb (float cellScale, float strength, float rotAmount=1.f)=0
 Texture cell bombing for the next default mesh draw (breaks tiling). cellScale: cells per UV unit (typical 2..16). strength: 0=off, 1=full. rotAmount: 0..1 per-cell rotation scale (default 1).
 
virtual void setMesh3DParallax (float scale, float minLayers=8.f, float maxLayers=32.f)=0
 Parallax occlusion mapping for the next default mesh draw. scale: UV displacement strength (0=off). Typical 0.02..0.08. minLayers / maxLayers: adaptive POM ray-march steps (more when glancing).
 
virtual void setMesh3DLodDither (float weight, bool reverse, bool enabled)=0
 Set opaque LOD dither coverage for the next default mesh draw. Render-thread only.
 
virtual void setMesh3DLighting (const Lighting3DPack &pack)=0
 Per-frame ambient + up to 8 lights packed into Mesh3DUBO.
 
virtual void setCloudShadows (float strength, float worldCell, float time, float windSpeed, float windAngle, float coverage, float detail)=0
 Dynamic cloud shadows cast on the ground by the default PBR mesh path. strength 0 disables (no change to rendering). time advances wind drift. Packed into Mesh3DUBO.cloud / cloudWind and consumed by mesh3d shaders.
 
virtual void setMesh3DClusteredLighting (const ClusteredLightingUpload &upload)=0
 Enable clustered forward path for subsequent default mesh draws (SSBO light lists). Pass upload.active=false (or empty) to disable and return to the ≤8 UBO path.
 
virtual void setMesh3DClusteredActive (bool active)=0
 Cheap per-draw toggle for the already-uploaded clustered light table. Unlike setMesh3DClusteredLighting it never re-uploads SSBO data, so the per-frame clustered build happens exactly once per camera.
 
virtual void setMesh3DSSAO (float intensity)=0
 Sets the screen-space ambient-occlusion strength applied in the forward mesh pass. 0 disables SSAO (default).
 
virtual void setMesh3DLight (const glm::vec3 &dir, const glm::vec3 &color)=0
 Directional light for subsequent drawMesh calls (world-space direction toward surface).
 
virtual void setMesh3DCameraPos (const glm::vec3 &eye)=0
 Camera eye used by mesh shaders that need view/rim (stored in Mesh3DUBO).
 
virtual void drawVoxelFaceInstances (const uint32_t *packed, int count, float originX, float originY, float originZ, const std::string &faceDir, Texture *atlas, int tilesPerRow=16, const uint32_t *ao=nullptr)=0
 Instanced voxel face rectangles (32-bit packed instances). ao: optional per-instance ambient-occlusion words (2 bits per corner, 0..3, shader corner order); null → full bright. faceDir: "posX"|"negX"|"posY"|"negY"|"posZ"|"negZ" (also "+x"/"-x"/…). Requires begin3DFrame(); uses viewProj from setMesh3DViewProj. atlas may be null → white; tilesPerRow subdivides atlas for texture indices.
 
virtual bool supportsDecal () const
 True when the backend can render the screen-space decal layer (box-projected decals writing albedo/normal/params targets that mesh3d.frag samples before lighting). Vulkan uses SPIR-V and WebGPU uses the native WGSL decal pipeline.
 
virtual void beginDecalPass (int width, int height)=0
 Open the decal pass (reads G-buffer hwDepth + normal, writes the screen-space DecalLayer targets). Call after endGBufferPass and before begin3DFrame; draws are queued by drawDecal and recorded into the frame's command buffer together with the swapchain pass.
 
virtual void setDecalCamera (const glm::mat4 &viewProj, float nearZ, float farZ)=0
 Per-frame camera constants for the decal pass (world-space reconstruction from the G-buffer depth). Call once per pass.
 
virtual void drawDecal (const glm::mat4 &model, Texture *albedo, Texture *normal, Texture *params, const float uvRect[4], float fade, float normalStrength, float roughnessStrength, float metalStrength, float emissiveStrength, int blendMode=0, int projectionMode=0, float blendSharpness=4.f, float parallaxScale=0.f, float parallaxMinLayers=8.f, float parallaxMaxLayers=24.f, float edgeFadeWidth=0.06f)=0
 Queue one box-projected decal draw. model maps the unit decal box ([-0.5, 0.5]^3, +Z = decal forward) into world space; uvRect selects the atlas region [x, y, w, h]; fade scales the coverage (lifetime fade in/out); normalStrength / roughnessStrength / metalStrength / emissiveStrength gate the per-channel blend in mesh3d.frag.
 
virtual void endDecalPass ()=0
 Ends decal pass.
 
virtual void setMesh3DEnv (Texture *cube, float intensity)=0
 Specular IBL environment for subsequent default mesh draws. cube must be from newCubemap (or nullptr → black / intensity 0). intensity is packed into Mesh3DUBO lightColor.w.
 
virtual void setMesh3DEnvProbe (const glm::vec3 &center, const glm::vec3 &extent)=0
 Box projection bounds for the active environment; zero extent disables it.
 
virtual void setMesh3DReflectionProbes (const ReflectionProbeUpload &upload)=0
 Upload the two dominant local reflection probes for subsequent mesh draws.
 
virtual Result< void > setSceneToneMapping (SceneToneMapping mode)
 Set final scene display mapping on the graphics/render thread.
 
virtual SceneToneMapping getSceneToneMapping () const
 Return the current final display mapping; graphics/render thread only.
 
virtual Result< void > setDisplayOutputMode (DisplayOutputMode mode)
 Request a present color space on the graphics/render thread.
 
virtual DisplayOutputMode getDisplayOutputMode () const
 Return the requested present preference.
 
virtual Result< void > setDisplayHdrCalibration (float paperWhiteNits, float peakNits)
 Set paper-white and peak luminance used by HDR present encoding.
 
virtual float getDisplayPaperWhiteNits () const
 Paper-white luminance in nits for HDR present encoding.
 
virtual float getDisplayPeakNits () const
 Peak luminance in nits for HDR present encoding.
 
virtual DisplayColorSpace getActiveDisplayColorSpace () const
 Color space of the live swapchain after the last rebuild.
 
virtual bool isDisplayHdrActive () const
 True when the live swapchain is scRGB or HDR10.
 
virtual Result< DisplayOutputSupport > queryDisplayOutputSupport () const
 Query which present formats the current surface can offer.
 
virtual Result< void > setScenePhotographicVignette (float intensity)
 Set cosine-fourth photographic vignette intensity in [0,1].
 
virtual float getScenePhotographicVignette () const
 Return photographic vignette intensity; render thread only.
 
virtual void setSceneExposure (float exposure)=0
 Set linear exposure multiplier used by the final scene tone-map resolve.
 
virtual float getSceneExposure () const =0
 Current linear manual exposure multiplier.
 
virtual void setSceneColorFilter (const glm::vec3 &color)=0
 Set a non-negative linear RGB multiplier applied during final HDR exposure.
 
virtual glm::vec3 getSceneColorFilter () const =0
 Current linear RGB multiplier applied during final HDR exposure.
 
virtual void setSceneLiftGammaGain (const glm::vec3 &lift, const glm::vec3 &inverseGamma, const glm::vec3 &gain)=0
 Set pre-tonemap HDR lift, inverse-gamma and gain coefficients.
 
virtual glm::vec3 getSceneLift () const =0
 Current pre-tonemap lift coefficients.
 
virtual glm::vec3 getSceneInverseGamma () const =0
 Current pre-tonemap inverse-gamma coefficients.
 
virtual glm::vec3 getSceneGain () const =0
 Current pre-tonemap gain coefficients.
 
virtual void setSceneTransitionFx (float vignette, float vignetteSmoothness, float lensDistortion, float lensScale)=0
 Set final-composite vignette and radial lens distortion strengths in [0,1].
 
virtual float getSceneTransitionVignette () const =0
 Return the final-composite vignette strength.
 
virtual float getSceneTransitionVignetteSmoothness () const =0
 Return the final-composite vignette smoothness.
 
virtual float getSceneTransitionLensDistortion () const =0
 Return the final-composite radial lens-distortion strength.
 
virtual float getSceneTransitionLensScale () const =0
 Return the final-composite lens scaling factor.
 
virtual void setSceneAutoExposure (bool enabled, float minEV, float maxEV)=0
 Configure log-average scene auto exposure and its EV clamp range.
 
virtual bool getSceneAutoExposure () const =0
 Whether automatic exposure is active.
 
virtual float getSceneAutoExposureMinEV () const =0
 Minimum automatic exposure EV.
 
virtual float getSceneAutoExposureMaxEV () const =0
 Maximum automatic exposure EV.
 
virtual void setSceneBloom (float intensity, float threshold)=0
 Configure final HDR bloom intensity and linear threshold.
 
virtual float getSceneBloomIntensity () const =0
 Current final-scene bloom intensity.
 
virtual float getSceneBloomThreshold () const =0
 Current linear HDR bloom threshold.
 
virtual void setSceneDepthOfField (float focusDistance, float maxBlurPx, float focusRange, float nearZ, float farZ)=0
 Configure final-scene Gaussian depth-of-field.
 
virtual float getSceneDofFocusDistance () const =0
 Returns the scene dof focus distance.
 
virtual float getSceneDofMaxBlur () const =0
 Returns the scene dof max blur.
 
virtual float getSceneDofFocusRange () const =0
 Returns the scene dof focus range.
 
virtual float getSceneDofNearZ () const =0
 Returns the scene dof near z.
 
virtual float getSceneDofFarZ () const =0
 Returns the scene dof far z.
 
virtual void setMesh3DShadows (const ShadowUpload &upload)=0
 Upload CSM constants for subsequent default mesh draws (active=false disables).
 
virtual void setMesh3DShadowReceive (bool receive)=0
 Per-draw: when false, shadow sampling is forced off for the next mesh draw.
 
virtual void setMesh3DSkinInfluenceLimit (SkinInfluenceLimit count)=0
 Limit GPU skinning to the strongest one, two or four vertex influences.
 
virtual void beginShadowPass (int cascadeIndex)=0
 Depth-only shadow pass for one cascade layer (0..2). Draws are recorded into the next begin3DFrame command buffer (ping-pong map per frame slot). Call before begin3DFrame.
 
virtual void drawMeshShadow (Mesh *mesh, const glm::mat4 &lightMVP, bool doubleSided=true)=0
 Queue an opaque shadow caster.
 
virtual void drawMeshShadowAlpha (Mesh *mesh, const glm::mat4 &lightMVP, Texture *albedo=nullptr, bool doubleSided=true, float lodWeight=1.f, bool lodFadeReverse=false, bool lodDither=false)=0
 Shadow pass draw with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): transparent texels of albedo are discarded so the slice casts a silhouette shadow instead of a solid quad. Requires an active shadow pass (beginShadowPass).
 
virtual void endShadowPass ()=0
 Ends shadow pass.
 
bool consumeFrameHad3D ()
 True after begin3DFrame until present completes.
 
bool had3DThisFrame () const
 Had 3 d this frame.
 
Color getBackgroundColor () const
 Returns the background color.
 
void setBackgroundColor (const Color &c)
 Sets the background color.
 
virtual void setScreenReadbackEnabled (bool enabled)
 When true, each present copies the swapchain to a CPU buffer for getPixel/newImageData. Default false — full-frame readback is expensive; enable only for tests / tools.
 
bool isScreenReadbackEnabled () const
 True when screen readback enabled.
 
bool saveFramePng (const std::string &path)
 Save the last presented frame to a PNG at path. Enables screen readback if needed. Returns false if no presented frame is available or encoding fails.
 
virtual bool beginFrameReadback (const std::string &path)
 Queue an asynchronous readback of the current frame to a PNG file.
 
virtual int frameReadbackStatus () const
 Async readback state: 0=idle, 1=pending, 2=done, 3=failed.
 
virtual void setVSync (bool enabled)
 Prefer uncapped present (IMMEDIATE/MAILBOX) when false, vsync (MAILBOX/FIFO) when true. Takes effect on the next swapchain recreate.
 
bool isVSync () const
 True when v sync.
 
void setVSyncCount (int count) override
 Sets the v sync count.
 
int getVSyncCount () const noexcept override
 Returns the v sync count.
 
virtual void setMsaaSamples (int samples)
 Hardware MSAA sample count for the 3D scene color pass (0 disables, then 2/4/8 are used when the device supports them). 0 or 1 mean no MSAA. Takes effect on the next begin3DFrame.
 
virtual int getMsaaSamples () const
 Returns the msaa samples.
 
void setActive (bool active) override
 Pause/resume presenting (Android background / foreground).
 
bool isActive () const
 True when active.
 
virtual void markSwapchainDirty ()
 Request swapchain recreation on next present/begin3DFrame.
 
void requestSurfaceRecreate () override
 Request recreation of the platform render surface on the next frame (Android background/foreground destroys the native window). Safe to call from a non-render thread; the actual work happens on the render thread.
 
virtual void onNativeWindowDestroyed ()
 Called by the Window module when the native window backing the render surface is destroyed (window close / recreation). Backends that keep a platform surface tied to the native window must drop it here so the next initWithWindow() rebuilds it against a fresh window — even when SDL hands back the same pointer for the recreated window.
 
void clearPresentOverlay ()
 Drop the present overlay callback (window gone; re-register on UI init).
 
void addWindowDestroyedCallback (WindowDestroyedCallback cb, void *userdata)
 Adds window destroyed callback.
 
void setPresentOverlay (PresentOverlayFn fn, void *userdata)
 Sets the present overlay.
 
PresentOverlayFn getPresentOverlay () const
 Returns the present overlay.
 
void * getPresentOverlayUser () const
 Returns the present overlay user.
 
Font * newFont (font::FontData *data, std::string charset=Font::defaultCharset())
 Build a GPU font (glyph atlas texture) from decoded font data. Rasterizes charset (UTF-8, default: printable ASCII) up front; Codepoints outside it still advance in drawText() but aren't drawn. Caller owns Font* (not tracked by Graphics — unlike newTexture / newMesh / newShader handles, which Graphics owns).
 
virtual void setFont (Font *font)
 Optional shared font used by legacy consumers; nullptr = none set.
 
Font * getFont () const
 Returns the font.
 
virtual void print (const std::string &text, float x, float y, const Color &color=Color(1.f, 1.f, 1.f, 1.f), float scale=1.f)
 Draw UTF-8 text with the font selected by setFont().
 
virtual void drawText (Font *font, const std::string &text, float x, float y, const Color &color=Color(1.f, 1.f, 1.f, 1.f), float scale=1.f)
 Draw UTF-8 text with an explicitly supplied GPU font.
 
void drawTextRGBA (Font *font, const std::string &text, float x, float y, float r, float g, float b, float a, float scale=1.f)
 Script-friendly UTF-8 text drawing overload using RGBA components.
 
void printRGBA (const std::string &text, float x, float y, float r, float g, float b, float a, float scale=1.f)
 Script-friendly stateful print overload using RGBA components.
 
virtual void setShader (Shader *shader)
 Sets the shader.
 
virtual void setShader ()
 Sets the shader.
 
Shader * getShader () const
 Returns the shader.
 
virtual Shader * newShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0
 Create a custom 2D shader from SPIR-V words (vert + frag). Owned by Graphics. Vertex stage may be empty → uses the default textured vertex shader.
 
virtual Shader * newShaderFromSpvFile (const std::string &vertPath, const std::string &fragPath)=0
 Load SPIR-V from files via Filesystem (empty vertPath → default textured vert).
 
Shader * newShaderFromSpvFile (const std::string &fragPath)
 Creates a shader from spv file. @ownership Caller deletes unless documented otherwise.
 
virtual Shader * newShader (const std::string &vertGlsl, const std::string &fragGlsl)=0
 Compile GLSL source with the engine's build-time GLSL compiler. Empty vertGlsl → default textured vert. Windows builds link the Vulkan SDK's shaderc archive; hosts without it fall back to an external glslc on PATH. Throws if compilation fails.
 
Shader * newShader (const std::string &fragGlsl)
 Creates a shader. @ownership Caller deletes unless documented otherwise.
 
virtual Shader * newShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl)=0
 Create a 2D custom shader from WGSL source (WebGPU backend). Empty vert → default textured vertex shader. The fragment WGSL declares the shared 2D bindings (color texture 0, depth texture 1, sampler 2, depth sampler 3, Externals UBO 4) and vs_main/fs_main entry points. Vulkan throws (uses SPIR-V via newShaderFromSpv).
 
virtual Result< void > replaceShaderFromSpv (Shader &shader, const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0
 Transactionally replace an existing shader with SPIR-V stages.
 
virtual Result< void > replaceMeshShaderResources (Shader &shader, const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv, const ShaderResourceInputs &resources)
 Replace a mesh program and its immutable set-1 resources atomically.
 
virtual Result< void > replaceShaderFromWgsl (Shader &shader, const std::string &vertWgsl, const std::string &fragWgsl)=0
 Transactionally replace an existing shader with WGSL stages.
 
virtual Result< void > replaceShaderFromGlsl (Shader &shader, const std::string &vertGlsl, const std::string &fragGlsl)=0
 Compile GLSL and transactionally replace an existing shader.
 
virtual Shader * newMeshShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0
 Create a Mesh3D custom shader (MeshVertex + Frame UBO + albedo). Empty vert → default mesh3d.vert. Owned by Graphics.
 
virtual Shader * newMeshShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl)=0
 Create a Mesh3D custom shader from WGSL source (WebGPU backend). The WGSL must declare the engine's Frame UBO (group 0 binding 0) and the shared mesh3d bindings (albedo 1, normal 2, env 3, shadow UBO 4, shadow depth 5, height 6, main sampler 7, shadow compare sampler 8, scene depth 9). Vulkan throws (uses SPIR-V via newMeshShaderFromSpv).
 
virtual Shader * newMeshShader (const std::string &vertGlsl, const std::string &fragGlsl)=0
 Creates a mesh shader. @ownership Caller deletes unless documented otherwise.
 
virtual eve::Result< void > configureMeshShaderSurface (Shader &, BlendMode, bool, bool)
 Prepare a custom mesh shader's blend, depth and culling state.
 
virtual eve::Result< void > configureMeshShaderRaster (Shader &shader, const MeshShaderRasterState &state)
 Transactionally configure an owned ordinary mesh shader's raster state.
 
Shader * newMeshShaderVF (const std::string &vertGlsl, const std::string &fragGlsl)
 Creates a Mesh3D shader from separate vertex and fragment GLSL sources.
 
Shader * newMeshShader (const std::string &fragGlsl)
 Creates a mesh shader. @ownership Caller deletes unless documented otherwise.
 
virtual Shader * newHairShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0
 Hair/fur card shader (alpha blend + Kajiya-Kay). Empty vert → mesh3d_hair.vert. Owned by Graphics.
 
virtual Shader * newHairShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl)=0
 Create an alpha-blended hair/card shader from WGSL on WebGPU.
 
Shader * newHairShader ()
 Built-in hair shader with default anisotropic parameters.
 
Mesh * newHairCardMesh (float width=0.12f, float height=0.45f)
 Procedural upright hair/fur card mesh (root at origin, height +Y, face +Z). @ownership Owned by Graphics.
 
Material * newHairCardMaterial (Texture *albedo=nullptr)
 Material preconfigured for hair cards (transparent, double-sided, hair shader). @ownership Caller owns the Material*; shader is owned by Graphics.
 
virtual bool releaseShader (Shader *shader)
 Eagerly releases a shader created by this Graphics.
 
Shader * newGrassShader ()
 t3ssel8r-style grass billboard shader (alpha test + shadow two-tone). Owned by Graphics. See grass:: / GrassField.
 
Shader * newTreeWindShader ()
 Create a backend-native tree wind shader using the default Mesh3D PBR fragment stage.
 
GrassField * newGrassField ()
 Dense + sparse stylized grass field. Caller owns GrassField*; its Mesh / Shader / Texture are owned by Graphics.
 
hair::GroomInstance * newGroomInstance ()
 High-quality groom/hair instance (UE GroomComponent analogue). See graphics/hair/ and docs/dev/毛发Groom子系统设计.md. @ownership Caller owns the returned GroomInstance*; its Mesh / Shader / Texture remain owned by Graphics. @lifetime Returned instance is valid until the caller deletes it; Graphics must outlive draws that use its GPU resources.
 
Waterfall * newWaterfall ()
 Flowing waterfall (falling water sheet) with sky reflection, downward velocity streaks and animated foam at the top lip and bottom splash pool. Caller owns Waterfall*; its Mesh / Shader are owned by Graphics.
 
Water * newWater ()
 Dynamic water surface (sky reflection + animated edge waves + middle drop ripples). Caller owns Water*; its Mesh / Shader are owned by Graphics.
 
Result< void > configureFoliageWind (Material *material, float directionX, float directionZ, float strength, float bending, float bendingSpeed, float branch, float branchSpeed, float flutter, float flutterSpeed, float fadeDistance, float bendFactor)
 Apply a source-derived foliage wind profile using graphics-owned shared field textures. The first successful call uploads one 1x1x9 neutral motion array and one deterministic 4x4 noise texture; subsequent calls reuse them. Existing PBR textures and translucency remain unchanged.
 
ReflectionProbeCapture * newReflectionProbeCapture ()
 Create an incremental six-face HDR reflection-probe capture. @ownership The caller owns the returned capture object.
 
ReflectionProbeRegistry * newReflectionProbeRegistry ()
 Create a scene-level automatic reflection-probe selector. @ownership The caller owns the returned registry.
 
virtual Canvas * newCanvas (int width, int height)=0
 Create an offscreen render target (sampleable). Owned by Graphics.
 
virtual Canvas * newHDRCanvas (int width, int height)=0
 Create an engine-internal linear RGBA16F post-process target.
 
virtual void setCanvas (Canvas *canvas)=0
 nullptr or this → screen. Switching flushes pending draws to the previous target.
 
void setCanvas ()
 Sets the canvas.
 
virtual bool isCanvasActive () const =0
 True when canvas active.
 
virtual Canvas * getCanvas () const =0
 Returns the canvas.
 
Volumetric * newVolumetric ()
 Volumetric light + fog (screenspace / raymarch / fog). Caller owns Volumetric*; its Shaders are owned by Graphics.
 
DepthOfField * newDepthOfField ()
 Create a caller-owned depth-aware depth-of-field compositor.
 
AmbientOcclusion * newAmbientOcclusion ()
 Screen-space ambient occlusion (ssao / hbao / gtao). Caller owns AmbientOcclusion*; its Shaders are owned by Graphics.
 
Outline * newOutline ()
 Screen-space model outline (t3ssel8r-style) from GBuffer depth + normal. Caller owns Outline*; its Shader is owned by Graphics.
 
AlphaMask * newAlphaMask ()
 Create a script-owned reusable two-texture alpha-mask compositor.
 
MapFog * newMapFog ()
 Create a script-owned SLG / large-map war-fog overlay (dual cloud + mask). @lifetime Caller owns the MapFog*; its Shader is owned by Graphics.
 
GlobalIllumination * newGlobalIllumination ()
 Screen-space single-bounce GI. Caller owns GlobalIllumination*; its Shaders are owned by Graphics.
 
ScreenSpaceReflection * newScreenSpaceReflection ()
 Screen-space reflections (ray-marched over scene color + hw depth). Caller owns ScreenSpaceReflection*; its Shader is owned by Graphics.
 
AmbientOcclusion * pipelineAmbientOcclusion ()
 Pipeline-owned AO / GI / AA used by RenderSystem3D when features "ao" / "gi" / "aa" are enabled. Created on first use; Graphics owns them.
 
GlobalIllumination * pipelineGlobalIllumination ()
 Pipeline global illumination.
 
ScreenSpaceReflection * pipelineScreenSpaceReflection ()
 Pipeline screen space reflection.
 
AntiAliasing * pipelineAntiAliasing ()
 Pipeline anti aliasing.
 
Bloom * pipelineBloom ()
 Pipeline-owned linear-HDR bloom pyramid, created on first use. @lifetime Returned effect remains valid until Graphics shutdown.
 
DepthOfField * pipelineDepthOfField ()
 Pipeline-owned Gaussian depth-of-field, created on first use. @lifetime Returned effect remains valid until Graphics shutdown.
 
Exposure * pipelineExposure ()
 Pipeline-owned GPU exposure metering and eye adaptation. @lifetime Returned effect remains valid until Graphics shutdown.
 
DepthPyramid * pipelineDepthPyramid ()
 Pipeline-owned shared min/max depth hierarchy for screen-space effects. @lifetime Returned effect remains valid until Graphics shutdown.
 
Texture * prepareFinalSceneTexture (Texture *scene, Texture *motion=nullptr)
 Build the shared linear-HDR AA, DOF, bloom, and exposure result for final ACES. @lifetime Returned texture is Graphics-owned and valid for the current target allocation.
 
Canvas * pipelineReflectionComposite (int width, int height)
 Return a reusable HDR target for composing screen-space lighting. @lifetime Returned canvas is Graphics-owned and valid for the current target allocation.
 
void setFinalSceneTexture (Texture *texture)
 Override the HDR source consumed by the next backend scene resolve.
 
Texture * takeFinalSceneTexture ()
 Consume and clear the per-frame HDR scene resolve override. @lifetime Returned texture is borrowed and retains its original owner's lifetime.
 
Outline * pipelineOutline ()
 Pipeline-owned Outline used by RenderSystem3D when the "outline" feature is on.
 
AntiAliasing * newAntiAliasing ()
 Classic image-space AA (FXAA / SMAA / SSAA / NFAA). Caller owns AntiAliasing*; its Shaders are owned by Graphics.
 
virtual void draw (Drawable *drawable, const glm::mat4 &m)
 Draws .
 
virtual void drawOcclusion (Drawable *drawable, const glm::mat4 &m)
 Volumetric occlusion helpers (shadow-pass analogue for light shafts). drawOcclusion skips drawables with castOcclusion=false.
 
virtual void drawOcclusionSolid (float x, float y, float w, float h)
 Draws occlusion solid.
 
virtual void drawOcclusionTexture (Texture *texture, float x, float y, float w, float h)
 Draws occlusion texture.
 
void points (const std::vector< glm::vec2 > &positions, const std::vector< Color > &colors)
 Draws a series of points at the specified positions.
 
void polyline (const glm::mat4 *vertices, size_t count)
 Draws a series of lines connecting the given vertices.
 
void rectangle (std::string mode, float x, float y, float w, float h)
 Draws a rectangle.
 
void rectangle (std::string mode, float x, float y, float w, float h, float rx, float ry, int points)
 Variant of rectangle that draws a rounded rectangle.
 
void rectangle (std::string mode, float x, float y, float w, float h, float rx, float ry)
 Rectangle.
 
void circle (std::string mode, float x, float y, float radius, int points)
 Draws a circle using the specified arguments.
 
void circle (std::string mode, float x, float y, float radius)
 Circle.
 
void ellipse (std::string mode, float x, float y, float a, float b, int points)
 Draws an ellipse using the specified arguments.
 
void ellipse (std::string mode, float x, float y, float a, float b)
 Ellipse.
 
void arc (std::string mode, std::string arcmode, float x, float y, float radius, float angle1, float angle2, int points)
 Draws an arc using the specified arguments.
 
void arc (std::string mode, std::string arcmode, float x, float y, float radius, float angle1, float angle2)
 Arc.
 
void polygon (std::string mode, const std::vector< glm::vec2 > &vertices, bool skipLastFilledVertex=true)
 Draws a polygon with an arbitrary number of vertices.
 
void push (bool all)
 Pushes .
 
void pop ()
 Pops .
 
const glm::mat4 & getTransform () const
 Returns the transform.
 
const glm::mat4 & getProjection () const
 Returns the projection.
 
void rotate (float r)
 Rotate.
 
void scale (float x, float y=1.0f)
 Scale.
 
void translate (float x, float y)
 Translate.
 
void origin ()
 Origin.
 
glm::vec2 transformPoint (glm::vec2 point)
 Transform point.
 
glm::vec2 inverseTransformPoint (glm::vec2 point)
 Inverse transform point.
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 
- Public 成员函数 继承自 eve::graphics::Canvas
 Canvas ()
 Constructs a Canvas.
 
 ~Canvas () override
 Releases Canvas resources.
 
virtual Texture * getTexture ()=0
 Sampleable color buffer; screen Canvas returns nullptr.
 
virtual void clear (std::optional< Color > color, std::optional< int > stencil, std::optional< double > depth)=0
 Clears .
 
virtual Color getPixel (int x, int y)=0
 Returns the pixel.
 
virtual image::ImageData * newImageData ()=0
 Creates a image data. @ownership Caller deletes unless documented otherwise.
 
virtual image::ImageData * newHDRImageData ()
 Copy an HDR Canvas as linear RGBA16F without tone mapping.
 
virtual void draw (Canvas *C, const glm::mat4 &matrix) const =0
 Draws .
 
virtual void draw (Graphics *gfx, const glm::mat4 &matrix) const=0
 Draws the object with the specified transformation matrix.
 
- Public 成员函数 继承自 eve::graphics::Drawable
virtual ~Drawable ()
 Releases Drawable resources.
 
bool getCastOcclusion () const
 When false, skipped by Graphics::drawOcclusion / volumetric occluder passes.
 
void setCastOcclusion (bool cast)
 Sets the cast occlusion.
 
virtual void drawOcclusion (Graphics *gfx, const glm::mat4 &matrix) const
 Draw as an opaque black silhouette for volumetric occlusion maps (screen-space god rays / light shafts). Default is a no-op; Texture / Mesh override with 2D black rects (alpha preserved for textures).
 
- Public 成员函数 继承自 eve::IWindowSurfaceHost
virtual ~IWindowSurfaceHost ()=default
 I window surface host.
 
- Public 成员函数 继承自 eve::graphics::IGraphics2D
virtual ~IGraphics2D ()=default
 Releases IGraphics2D resources.
 
virtual void drawPrimitiveCanvas (const PrimitiveCanvas2D &canvas)=0
 Resolves and queues one frame-local primitive Canvas.
 
- Public 成员函数 继承自 eve::graphics::IGraphics3D
virtual ~IGraphics3D ()=default
 Releases IGraphics3D resources.
 
virtual void drawPrimitiveScene (const PrimitiveSceneCanvas3D &canvas)=0
 Submits an owning frame-local primitive canvas into the active 3D pass.
 
- Public 成员函数 继承自 eve::graphics::ICanvasFactory
virtual ~ICanvasFactory ()=default
 Releases ICanvasFactory resources.
 
- Public 成员函数 继承自 eve::graphics::ICanvasTarget
virtual ~ICanvasTarget ()=default
 Releases ICanvasTarget resources.
 
- Public 成员函数 继承自 eve::graphics::IResourceFactory
virtual ~IResourceFactory ()=default
 Releases IResourceFactory resources.
 
virtual Result< Texture * > newTextureMipChain (uint32_t width, uint32_t height, uint32_t levels, std::span< const uint8_t > rgba)
 Upload complete explicit linear RGBA8 mips without regenerating pixels.
 
virtual Result< Texture * > newTextureArrayRgba16f (uint32_t width, uint32_t height, uint32_t layers, std::span< const uint16_t > rgbaHalf)
 Upload a sampled 2D array of tightly packed linear RGBA16F texels.
 
virtual Result< Texture * > newTexture3DRgba8 (uint32_t width, uint32_t height, uint32_t depth, std::span< const uint8_t > rgba)
 Upload one tightly packed linear RGBA8 3D sampled texture.
 
virtual ResultRef< Texture > newSharedTexture (image::ImageData *data, const std::string &contentKey)
 Reuse or upload immutable RGBA8 pixels under a caller-provided content key.
 
- Public 成员函数 继承自 eve::graphics::ISolidRectRenderer
virtual ~ISolidRectRenderer ()=default
 Releases ISolidRectRenderer resources.
 
- Public 成员函数 继承自 eve::graphics::IPostFX
virtual ~IPostFX ()=default
 Releases IPostFX resources.
 
- Public 成员函数 继承自 eve::IFramePresentation
virtual ~IFramePresentation ()=default
 Releases IFramePresentation resources.
 

Protected 成员函数

void requestFileImageDecode (const std::string &key)
 Request file image decode.
 
bool fileTextureSourceExists (const std::string &filename) const
 File texture source exists.
 
void dropDeferredFileTexture (Texture *texture)
 Drop deferred file texture.
 
virtual bool uploadDeferredFileTexture (Texture *texture, image::ImageData *data)
 Uploads deferred file texture.
 
Shader * prepareSceneColorResolveShader (Texture *scene)
 FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha).
 
void retireResourceLifetime () const
 Retire resource lifetime.
 

Protected 属性

std::vector< DeferredFileTexture > deferredFileTextures_
 
bool realizingFileTextures_ = false
 
int width = 0
 
int height = 0
 
int pixelWidth = 0
 
int pixelHeight = 0
 
Color backgroundColor {0.1f, 0.1f, 0.12f, 1.0f}
 
bool frameHad3D = false
 
bool recordingEngine3D_ = false
 True while RenderSystem3D is submitting (AO / engine overlays).
 
bool screenReadbackEnabled = false
 
bool vsyncEnabled = true
 
int presentationVSyncCount_ =1
 
DisplayOutputMode displayOutputMode_ = DisplayOutputMode::Sdr
 
DisplayColorSpace activeDisplayColorSpace_ = DisplayColorSpace::Sdr
 
float displayPaperWhiteNits_ = 200.f
 
float displayPeakNits_ = 1000.f
 
bool graphicsActive = true
 
int msaaSamples = 4
 
PresentOverlayFn presentOverlayFn_ = nullptr
 
void * presentOverlayUser_ = nullptr
 
std::vector< std::pair< WindowDestroyedCallback, void * > > windowDestroyedCallbacks_
 
Shader * currentShader = nullptr
 
Font * currentFont = nullptr
 
std::unique_ptr< RenderControl > renderControl_
 
std::shared_ptr< PrimitiveScene > primitiveScene_
 
std::unique_ptr< AmbientOcclusion > pipelineAO_
 
std::unique_ptr< GlobalIllumination > pipelineGI_
 
std::unique_ptr< ScreenSpaceReflection > pipelineSSR_
 
std::unique_ptr< AntiAliasing > pipelineAA_
 
std::unique_ptr< Bloom > pipelineBloom_
 
std::unique_ptr< DepthOfField > pipelineDof_
 
std::unique_ptr< Exposure > pipelineExposure_
 
bool sceneDepthOfFieldEnabled_ = false
 
float sceneDepthOfFieldFocusDistance_ = 10.f
 
float sceneDepthOfFieldFocusRange_ = 5.f
 
float sceneDepthOfFieldMaximumBlurPixels_ = 8.f
 
float sceneDepthOfFieldNearPlane_ = 0.1f
 
float sceneDepthOfFieldFarPlane_ = 100.f
 
std::unique_ptr< DepthPyramid > pipelineDepthPyramid_
 
Canvas * spatialAAResolve_ = nullptr
 
int spatialAAResolveWidth_ = 0
 
int spatialAAResolveHeight_ = 0
 
Canvas * reflectionComposite_ = nullptr
 
int reflectionCompositeWidth_ = 0
 
int reflectionCompositeHeight_ = 0
 
Texture * finalSceneTexture_ = nullptr
 
Texture * foliageWindMotionTexture_ = nullptr
 
Texture * foliageWindNoiseTexture_ = nullptr
 
std::unique_ptr< Outline > pipelineOutline_
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::IWindowSurfaceHost
static constexpr const char * capabilityName = "IWindowSurfaceHost"
 
- 静态 Public 属性 继承自 eve::IFramePresentation
static constexpr const char * capabilityName = "eve.frame-presentation"
 

详细描述

在文件 Graphics.h 第 115 行定义.

成员类型定义说明

◆ PresentOverlayFn

using eve::graphics::Graphics::PresentOverlayFn = bool (*)(void *userdata, void *commandBuffer)

Optional overlay drawn inside the swapchain render pass (before end). Used by declarative UI (ImGui). commandBuffer is a VkCommandBuffer as void*. Called with commandBuffer == nullptr as a probe: return true only when this frame has overlay draw data, so the backend can skip an empty UI pass.

在文件 Graphics.h 第 1606 行定义.

◆ WindowDestroyedCallback

using eve::graphics::Graphics::WindowDestroyedCallback = void (*)(void *userdata)

Register a callback invoked when the native window is destroyed. Used by the UI backend to tear down its ImGui context; callbacks are cleared (and invoked) on onNativeWindowDestroyed().

在文件 Graphics.h 第 1594 行定义.

成员枚举类型说明

◆ DisplayColorSpace

Color space actually selected for the live swapchain.

枚举值
Sdr 
ScRgb 
Hdr10 

在文件 Graphics.h 第 1329 行定义.

◆ DisplayOutputMode

Requested swapchain present preference.

枚举值
Sdr 
Auto 
Hdr10 
ScRgb 

在文件 Graphics.h 第 1327 行定义.

◆ Mesh3DSceneColorCaptureStatus

Observable result of requesting a same-frame mesh SceneColor snapshot.

枚举值
ExplicitOverride 
Scheduled 
Captured 
HistoryReuse 
Unavailable 

在文件 Graphics.h 第 1168 行定义.

◆ SceneColorDistortionStatus

Refract the resolved 3D scene color through a displacement texture.

The displacement texture stores a signed screen-space offset in red/green and coverage in alpha. Returns false when no resolved scene color is available for the current frame.

枚举值
Queued 
Unavailable 

在文件 Graphics.h 第 793 行定义.

◆ SceneToneMapping

Final display mapping; None preserves linear color, Aces uses the fitted curve, and Filmic uses Rec.709/AP1.

枚举值
None 
Aces 
Filmic 

在文件 Graphics.h 第 1325 行定义.

构造及析构函数说明

◆ Graphics()

eve::graphics::Graphics::Graphics ( )

◆ ~Graphics()

eve::graphics::Graphics::~Graphics ( )
override

成员函数说明

◆ addWindowDestroyedCallback()

void eve::graphics::Graphics::addWindowDestroyedCallback ( WindowDestroyedCallback  cb,
void *  userdata 
)
inline

Adds window destroyed callback.

在文件 Graphics.h 第 1596 行定义.

被这些函数引用 eve::ui::ImGuiBackend::init().

◆ arc() [1/2]

void eve::graphics::Graphics::arc ( std::string  mode,
std::string  arcmode,
float  x,
float  y,
float  radius,
float  angle1,
float  angle2 
)

Arc.

◆ arc() [2/2]

void eve::graphics::Graphics::arc ( std::string  mode,
std::string  arcmode,
float  x,
float  y,
float  radius,
float  angle1,
float  angle2,
int  points 
)

Draws an arc using the specified arguments.

参数
drawmodeThe mode of drawing (line/filled).
arcmodeThe type of arc.
xX-coordinate.
yY-coordinate.
radiusRadius of the arc.
angle1The angle at which the arc begins.
angle2The angle at which the arc terminates.
pointsNumber of points to use to draw the arc.

◆ bakeMeshMorph()

virtual bool eve::graphics::Graphics::bakeMeshMorph ( Mesh *  mesh)
pure virtual

If mesh morph weights are dirty, bake blended positions and upload to the GPU VBO. Returns true when an upload happened. No-op when no morph data / not dirty / null.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ begin3DFrame()

virtual void eve::graphics::Graphics::begin3DFrame ( )
pure virtual

Begin a 3D frame: shadow/gbuffer (if pending) then a sampleable scene color pass (color+depth). Leaves the pass open for drawMesh and a following RenderSystem::render (2D). Does not present. flushToSwapchain resolves the scene color (FXAA when "aa" is on) into the swapchain, then draws 2D overlays. Soft-fails (no throw) when the swapchain cannot be acquired yet — check had3DThisFrame().

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ begin3DFrameToCanvas()

virtual void eve::graphics::Graphics::begin3DFrameToCanvas ( Canvas *  canvas)
pure virtual

Open a 3D render pass targeting an offscreen Canvas (color + depth) at the canvas size. Uses setMesh3DViewProj/View/CameraPos/Env as the camera. Draw meshes with drawMeshShader, then call end3DFrameToCanvas(). The canvas texture then holds the rendered scene (e.g. a planar reflection). Unsupported if canvas is not an offscreen canvas (screen).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::renderToCanvas().

◆ beginDecalPass()

virtual void eve::graphics::Graphics::beginDecalPass ( int  width,
int  height 
)
pure virtual

Open the decal pass (reads G-buffer hwDepth + normal, writes the screen-space DecalLayer targets). Call after endGBufferPass and before begin3DFrame; draws are queued by drawDecal and recorded into the frame's command buffer together with the swapchain pass.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ beginFrameReadback()

virtual bool eve::graphics::Graphics::beginFrameReadback ( const std::string &  path)
inlinevirtual

Queue an asynchronous readback of the current frame to a PNG file.

返回
True when the readback was queued (WebGPU browser backend); poll frameReadbackStatus() for completion. Default false elsewhere.

被 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1517 行定义.

引用了 path.

◆ beginGBufferPass()

virtual void eve::graphics::Graphics::beginGBufferPass ( int  width,
int  height 
)
pure virtual

Depth/normal(/albedo) fill pass for mid/post effects. One-shot submit (like shadow); call before begin3DFrame when enabled. After endGBufferPass, textures are available via getRenderControl()->getGBuffer().

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ beginShadowPass()

virtual void eve::graphics::Graphics::beginShadowPass ( int  cascadeIndex)
pure virtual

Depth-only shadow pass for one cascade layer (0..2). Draws are recorded into the next begin3DFrame command buffer (ping-pong map per frame slot). Call before begin3DFrame.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ canSubmitGpuParticles()

virtual bool eve::graphics::Graphics::canSubmitGpuParticles ( ) const
inlinevirtual

True when the current frame topology can accept a GPU particle compute section.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 321 行定义.

◆ captureMesh3DSceneColor()

virtual Mesh3DSceneColorCaptureStatus eve::graphics::Graphics::captureMesh3DSceneColor ( )
inlinevirtual

Make opaque scene color available to subsequent refractive mesh draws.

Backends may capture immediately or defer the split until command encoding. An explicit texture installed by setMesh3DSceneColor takes precedence. A HistoryReuse is observable quality degradation because it is not same-frame data.

返回
Capture disposition for the current render frame. @thread Render-thread affine; call immediately before the first refractive draw. @reentrancy Does not invoke scripts or caller callbacks.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1181 行定义.

◆ circle() [1/2]

void eve::graphics::Graphics::circle ( std::string  mode,
float  x,
float  y,
float  radius 
)

Circle.

◆ circle() [2/2]

void eve::graphics::Graphics::circle ( std::string  mode,
float  x,
float  y,
float  radius,
int  points 
)

Draws a circle using the specified arguments.

参数
modeThe mode of drawing (line/filled).
xX-coordinate.
yY-coordinate.
radiusRadius of the circle.
pointsNumber of points to use to draw the circle.

◆ clearPresentOverlay()

void eve::graphics::Graphics::clearPresentOverlay ( )
inline

Drop the present overlay callback (window gone; re-register on UI init).

在文件 Graphics.h 第 1584 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::onNativeWindowDestroyed().

◆ clearScreen()

void eve::graphics::Graphics::clearScreen ( )
virtual

Script-friendly wrappers (r,g,b[,a] floats — no Color type in Squirrel).

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1709 行定义.

◆ configureFoliageWind()

Result< void > eve::graphics::Graphics::configureFoliageWind ( Material *  material,
float  directionX,
float  directionZ,
float  strength,
float  bending,
float  bendingSpeed,
float  branch,
float  branchSpeed,
float  flutter,
float  flutterSpeed,
float  fadeDistance,
float  bendFactor 
)

Apply a source-derived foliage wind profile using graphics-owned shared field textures. The first successful call uploads one 1x1x9 neutral motion array and one deterministic 4x4 noise texture; subsequent calls reuse them. Existing PBR textures and translucency remain unchanged.

返回
Failure before material publication, or a validated object-motion snapshot. @ownership Material is borrowed; Graphics owns both shared textures until shutdown. @thread Render thread only; synchronous and callback-free. @cost First call performs two tiny GPU uploads; later calls copy one material snapshot.

在文件 GraphicsFoliage.cpp 第 8 行定义.

引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), foliageWindMotionTexture_, foliageWindNoiseTexture_, eve::InvalidArgument, layer, material, eve::graphics::IResourceFactory::newTextureArrayRgba16f(), newTextureFromImageData(), eve::image::ImageData::setPixel(), strength, value, x , 以及 y.

◆ configureMeshShaderRaster()

virtual eve::Result< void > eve::graphics::Graphics::configureMeshShaderRaster ( Shader &  shader,
const MeshShaderRasterState &  state 
)
inlinevirtual

Transactionally configure an owned ordinary mesh shader's raster state.

参数
shaderGraphics-owned shader; borrowed synchronously, ownership unchanged.
stateValue snapshot copied on success; never retained by reference.
返回
Success, Unsupported, or a validation/build failure leaving prior state intact.

Render thread only, outside submission. Does not invoke callbacks. State

  • survives program/resource replacement and render-target recreation until shader release.

Failure.

Error.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1847 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::Unsupported.

被这些函数引用 eve::graphics::exposeShaderScriptBindings() , 以及 eve::graphics::SkyAtmospherePass::prepare().

◆ configureMeshShaderSurface()

virtual eve::Result< void > eve::graphics::Graphics::configureMeshShaderSurface ( Shader &  ,
BlendMode  ,
bool  ,
bool   
)
inlinevirtual

Prepare a custom mesh shader's blend, depth and culling state.

返回
Success, Unsupported, or a structured validation failure.
注解
Render thread only, before submission. Shader ownership is unchanged. Failure preserves existing pipelines. Does not invoke callbacks.

Error.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1830 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::Unsupported.

被这些函数引用 eve::avatar::buildVrmSurface(), eve::graphics::exposeShaderScriptBindings(), eve::graphics::newWaterShader() , 以及 eve::graphics::SkyAtmospherePass::prepare().

◆ consumeFrameHad3D()

bool eve::graphics::Graphics::consumeFrameHad3D ( )
inline

True after begin3DFrame until present completes.

在文件 Graphics.h 第 1486 行定义.

引用了 v.

◆ copyHDRCanvasesToCubemap()

virtual bool eve::graphics::Graphics::copyHDRCanvasesToCubemap ( Canvas *const *  sources,
int  faceCount,
Texture *  cubemap 
)
inlinevirtual

Copy consecutive RGBA16F canvases into cubemap base-level faces.

Backends may override this to encode all copies in one submission. The default preserves compatibility by dispatching the single-face API.

参数
sourcesArray of source canvases, one per destination face.
faceCountNumber of entries in sources; must be between 1 and 6.
cubemapDestination HDR cubemap.
返回
True when every requested face copy was submitted. @compatibility Preserves the established backend boolean submission contract.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 590 行定义.

被这些函数引用 eve::graphics::ReflectionProbeCapture::stageCapturedFaces().

◆ copyHDRCanvasToCubemapFace()

virtual bool eve::graphics::Graphics::copyHDRCanvasToCubemapFace ( Canvas *  source,
Texture *  cubemap,
int  face 
)
inlinevirtual

Copy one RGBA16F Canvas into a staging cubemap base-level face.

返回
True when the GPU copy was submitted. @compatibility Preserves the established backend boolean submission contract.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 572 行定义.

引用了 source.

◆ createGpuParticleEmitter()

virtual GpuParticleHandle eve::graphics::Graphics::createGpuParticleEmitter ( std::uint32_t  capacity)
inlinevirtual

Allocate backend-owned resident state for one particle emitter.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 324 行定义.

引用了 capacity , 以及 eve::graphics::kInvalidGpuParticleHandle.

◆ describeMesh()

virtual std::optional< MeshBackendDescriptor > eve::graphics::Graphics::describeMesh ( Mesh *  mesh) const
inlinevirtual

Describe a live mesh created by this Graphics backend.

参数
meshBorrowed mesh handle returned by this backend.
返回
Backend layout facts, or empty for an unknown/foreign handle.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 859 行定义.

引用了 mesh.

◆ draw()

void eve::graphics::Graphics::draw ( Drawable *  drawable,
const glm::mat4 &  m 
)
virtual

Draws .

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1692 行定义.

引用了 eve::graphics::Drawable::draw() , 以及 m.

◆ drawCanvas()

void eve::graphics::Graphics::drawCanvas ( Canvas *  canvas,
float  x,
float  y,
float  w,
float  h 
)
inline

Draws a Canvas with opaque white tint (script-friendly defaults).

在文件 Graphics.h 第 958 行定义.

引用了 h, w, x , 以及 y.

◆ drawCanvasRGBA()

void eve::graphics::Graphics::drawCanvasRGBA ( Canvas *  canvas,
float  x,
float  y,
float  w,
float  h,
float  r = 1.f,
float  g = 1.f,
float  b = 1.f,
float  a = 1.f 
)
virtual

Draw a Canvas color buffer as a textured rect (same batch order as other 2D).

实现了 eve::graphics::IGraphics3D.

在文件 Graphics.cpp 第 241 行定义.

引用了 a, b, drawTexturedRect(), g, eve::graphics::Canvas::getTexture(), h, r, w, x , 以及 y.

◆ drawDecal()

virtual void eve::graphics::Graphics::drawDecal ( const glm::mat4 &  model,
Texture *  albedo,
Texture *  normal,
Texture *  params,
const float  uvRect[4],
float  fade,
float  normalStrength,
float  roughnessStrength,
float  metalStrength,
float  emissiveStrength,
int  blendMode = 0,
int  projectionMode = 0,
float  blendSharpness = 4.f,
float  parallaxScale = 0.f,
float  parallaxMinLayers = 8.f,
float  parallaxMaxLayers = 24.f,
float  edgeFadeWidth = 0.06f 
)
pure virtual

Queue one box-projected decal draw. model maps the unit decal box ([-0.5, 0.5]^3, +Z = decal forward) into world space; uvRect selects the atlas region [x, y, w, h]; fade scales the coverage (lifetime fade in/out); normalStrength / roughnessStrength / metalStrength / emissiveStrength gate the per-channel blend in mesh3d.frag.

参数
blendMode0 = premultiplied over, 1 = additive (emissive).
projectionMode0 = planar, 1 = local triplanar, 2 = spherical, 3 = world-aligned triplanar.
blendSharpnessTriplanar normal-weight exponent (ignored when planar).
parallaxScalePOM depth in normalized decal UV units; zero disables POM.
parallaxMinLayersMinimum POM samples at a perpendicular view.
parallaxMaxLayersMaximum POM samples at a grazing view.
edgeFadeWidthNormalized projection-volume edge feather in [0, 0.49].

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::decal::DecalManager::drawAll().

◆ drawDeferredLighting()

virtual void eve::graphics::Graphics::drawDeferredLighting ( )
inlinevirtual

Fullscreen deferred lighting into the open scene-color pass. Samples GBuffer + clustered lights + CSM. No-op when unsupported or no GBuffer. Call after begin3DFrame with view/lighting/shadows/clustered state already set.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 252 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ drawGpuParticleEmitter()

virtual bool eve::graphics::Graphics::drawGpuParticleEmitter ( GpuParticleHandle  handle,
const GpuParticleDraw &  draw 
)
inlinevirtual

Queue an indirect draw at the current 2D overlay position.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 347 行定义.

引用了 draw , 以及 handle.

◆ drawMesh()

virtual void eve::graphics::Graphics::drawMesh ( Mesh *  mesh,
const glm::mat4 &  model,
Texture *  texture,
const Color &  tint 
)
pure virtual

◆ drawMeshGBuffer()

virtual void eve::graphics::Graphics::drawMeshGBuffer ( Mesh *  mesh,
const glm::mat4 &  mvp,
const glm::mat4 &  model,
float  nearZ,
float  farZ,
Texture *  albedo = nullptr,
float  tintR = 1.f,
float  tintG = 1.f,
float  tintB = 1.f,
float  motionX = 0.f,
float  motionY = 0.f,
float  roughness = 0.45f,
float  metallic = 0.f 
)
pure virtual

Draws mesh g buffer.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ drawMeshGBufferAlpha()

virtual void eve::graphics::Graphics::drawMeshGBufferAlpha ( Mesh *  mesh,
const glm::mat4 &  mvp,
const glm::mat4 &  model,
float  nearZ,
float  farZ,
Texture *  albedo = nullptr,
float  tintR = 1.f,
float  tintG = 1.f,
float  tintB = 1.f,
float  motionX = 0.f,
float  motionY = 0.f,
float  roughness = 0.45f,
float  metallic = 0.f 
)
pure virtual

GBuffer fill with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): same outputs as drawMeshGBuffer, but transparent texels are discarded so depth/normal follow the silhouette. No-op on backends without the alpha pipeline (WebGPU).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ drawMeshShader()

◆ drawMeshShaderInstances()

virtual Result< void > eve::graphics::Graphics::drawMeshShaderInstances ( Mesh &  mesh,
Shader &  shader,
const glm::mat4 &  model,
const Color &  tint,
std::uint32_t  first,
std::uint32_t  count 
)
inlinevirtual

Draw a checked range from a resource shader's immutable instance matrix buffer. @ownership Mesh and Shader remain Graphics-owned; references are borrowed only for this call. @lifetime GPU copies remain alive through submission under Graphics resource ownership. @thread Render thread, inside an open 3D pass; no script callbacks or reentrancy.

参数
firstFirst matrix record; visible to the vertex shader as gl_InstanceIndex.
countNumber of records; zero is a validated no-op.
返回
Failure before recording when unsupported, stale, or out of range.

Failure.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1116 行定义.

引用了 count, first, mesh, model, shader , 以及 tint.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ drawMeshShadow()

virtual void eve::graphics::Graphics::drawMeshShadow ( Mesh *  mesh,
const glm::mat4 &  lightMVP,
bool  doubleSided = true 
)
pure virtual

Queue an opaque shadow caster.

参数
meshBorrowed for this frame.
lightMVPLight transform.
doubleSidedTrue disables face culling; false culls back faces.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::drawShadow(), eve::graphics::RenderSystem3D::render() , 以及 eve::fluids::VolumeFluidShadowCaster::update().

◆ drawMeshShadowAlpha()

virtual void eve::graphics::Graphics::drawMeshShadowAlpha ( Mesh *  mesh,
const glm::mat4 &  lightMVP,
Texture *  albedo = nullptr,
bool  doubleSided = true,
float  lodWeight = 1.f,
bool  lodFadeReverse = false,
bool  lodDither = false 
)
pure virtual

Shadow pass draw with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): transparent texels of albedo are discarded so the slice casts a silhouette shadow instead of a solid quad. Requires an active shadow pass (beginShadowPass).

参数
doubleSidedTrue disables face culling; false culls back faces.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::drawShadow() , 以及 eve::graphics::RenderSystem3D::render().

◆ drawOcclusion()

void eve::graphics::Graphics::drawOcclusion ( Drawable *  drawable,
const glm::mat4 &  m 
)
virtual

Volumetric occlusion helpers (shadow-pass analogue for light shafts). drawOcclusion skips drawables with castOcclusion=false.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1696 行定义.

引用了 eve::graphics::Drawable::drawOcclusion(), eve::graphics::Drawable::getCastOcclusion() , 以及 m.

被这些函数引用 eve::graphics::Volumetric::drawOccluder().

◆ drawOcclusionSolid()

void eve::graphics::Graphics::drawOcclusionSolid ( float  x,
float  y,
float  w,
float  h 
)
virtual

Draws occlusion solid.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1700 行定义.

引用了 h, w, x , 以及 y.

被这些函数引用 eve::graphics::Volumetric::drawOccluders2D(), eve::graphics::Volumetric::drawOccluderSolid() , 以及 eve::graphics::Mesh::drawOcclusion().

◆ drawOcclusionTexture()

void eve::graphics::Graphics::drawOcclusionTexture ( Texture *  texture,
float  x,
float  y,
float  w,
float  h 
)
virtual

Draws occlusion texture.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1704 行定义.

引用了 h, w, x , 以及 y.

被这些函数引用 eve::graphics::Volumetric::drawOccluders2D(), eve::graphics::Volumetric::drawOccluderTexture() , 以及 eve::graphics::Texture::drawOcclusion().

◆ drawScene3D()

void eve::graphics::Graphics::drawScene3D ( float  x,
float  y,
float  w,
float  h 
)
inline

Script-friendly 4-arg form (simplesquirrel does not apply C++ defaults).

在文件 Graphics.h 第 952 行定义.

引用了 h, w, x , 以及 y.

◆ drawScene3DRGBA()

void eve::graphics::Graphics::drawScene3DRGBA ( float  x,
float  y,
float  w,
float  h,
float  r = 1.f,
float  g = 1.f,
float  b = 1.f,
float  a = 1.f 
)
virtual

Composite this frame's 3D scene color into a rect (screen or active Canvas). Call after render3D(); order vs drawSolidRect / drawTexturedRect is preserved. If never called, present() still blits the 3D scene fullscreen under 2D. RGB is blitted opaque (scene A is linear depth, not transparency).

实现了 eve::graphics::IGraphics3D.

在文件 Graphics.cpp 第 229 行定义.

引用了 a, b, drawTexturedRectShaderUV(), g, getSceneColorTexture(), h, eve::Opaque, r, scene, w, x , 以及 y.

◆ drawSceneColorDistortionUVRotated()

virtual SceneColorDistortionStatus eve::graphics::Graphics::drawSceneColorDistortionUVRotated ( Texture *  displacement,
float  cx,
float  cy,
float  w,
float  h,
float  degrees,
float  u0,
float  v0,
float  u1,
float  v1,
float  strengthPixels,
float  opacity,
bool  rotatedUV = false 
)
inlinevirtual

Draws scene color distortion uv rotated.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 796 行定义.

被这些函数引用 eve::graphics::RenderSystem::drawItems().

◆ drawSolidRect() [1/2]

virtual void eve::graphics::Graphics::drawSolidRect ( float  x,
float  y,
float  w,
float  h,
const Color &  color,
BlendMode  blend = BlendMode::Alpha 
)
pure virtual

Internal immediate-mode helper used by RenderSystem / Batcher.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ drawSolidRect() [2/2]

◆ drawSolidRectRGBA()

void eve::graphics::Graphics::drawSolidRectRGBA ( float  x,
float  y,
float  w,
float  h,
float  r,
float  g,
float  b,
float  a = 1.f 
)
virtual

Draws solid rect rgba.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1713 行定义.

引用了 a, b, g, h, r, w, x , 以及 y.

被这些函数引用 eve::pixelworld_graphics::PixelWorldAtlasRenderer::drawDiagnostics().

◆ drawSolidRectRotated()

virtual void eve::graphics::Graphics::drawSolidRectRotated ( float  cx,
float  cy,
float  w,
float  h,
float  degrees,
const Color &  color,
BlendMode  blend = BlendMode::Alpha 
)
pure virtual

Rotated solid quad degrees clockwise (screen Y-down) around (cx, cy).

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem::drawItems() , 以及 eve::graphics::vulkan::Graphics::drawTexturedRectLitUVRotated().

◆ drawText()

void eve::graphics::Graphics::drawText ( Font *  font,
const std::string &  text,
float  x,
float  y,
const Color &  color = Color(1.f, 1.f, 1.f, 1.f),
float  scale = 1.f 
)
virtual

Draw UTF-8 text with an explicitly supplied GPU font.

参数
fontBorrowed non-null font created by this Graphics instance; it is retained only for this call and must remain valid until the call returns.
textBorrowed UTF-8 text, retained only for this call.
xLeft edge in the current canvas coordinate space.
yTop edge in the current canvas coordinate space.
colorGlyph tint and opacity.
scaleUniform text scale; 1 uses the decoded font pixel size.
异常
eve::Exceptionif font is nullptr.
注解
Render-thread only. The call is synchronous and does not invoke callbacks.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1897 行定义.

引用了 code, color, eve::graphics::Font::findGlyph(), g, eve::graphics::Font::getBaseline(), eve::graphics::Font::getData(), eve::graphics::Font::getTexture(), eve::graphics::nextCodepointUtf8(), eve::debug::rtBind(), eve::debug::rtDraw(), scale, text, x , 以及 y.

被这些函数引用 eve::card::printCentered().

◆ drawTextRGBA()

void eve::graphics::Graphics::drawTextRGBA ( Font *  font,
const std::string &  text,
float  x,
float  y,
float  r,
float  g,
float  b,
float  a,
float  scale = 1.f 
)
inline

Script-friendly UTF-8 text drawing overload using RGBA components.

参数
fontBorrowed non-null font created by this Graphics instance; valid for the duration of the call.
textUTF-8 text to draw.
xLeft edge in the current canvas coordinate space.
yTop edge in the current canvas coordinate space.
rRed color component.
gGreen color component.
bBlue color component.
aAlpha color component.
scaleUniform text scale.
异常
eve::Exceptionif font is nullptr.
注解
Render-thread only. The call retains no arguments and invokes no callbacks.

Draws text.

在文件 Graphics.h 第 1674 行定义.

引用了 a, b, g, r, scale, text, x , 以及 y.

◆ drawTexturedRect() [1/2]

virtual void eve::graphics::Graphics::drawTexturedRect ( Texture *  texture,
float  x,
float  y,
float  w,
float  h,
const Color &  color 
)
pure virtual

Draws textured rect.

Draw a textured quad (full UV 0..1). texture may be null → solid. Uses currentShader when set (or per-call override via drawTexturedRectShader).

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ drawTexturedRect() [2/2]

void eve::graphics::Graphics::drawTexturedRect ( Texture *  texture,
float  x,
float  y,
float  w,
float  h,
float  r,
float  g,
float  b,
float  a = 1.f 
)
virtual

RGBA-float overload matching the script-facing drawTexturedRect name.

在文件 Graphics.cpp 第 1732 行定义.

引用了 a, b, g, h, r, w, x , 以及 y.

被这些函数引用 eve::stylize::StyleChain::apply(), eve::stylize_editing::StylizeRecipeRuntime::apply() , 以及 drawCanvasRGBA().

◆ drawTexturedRectLitUV()

virtual void eve::graphics::Graphics::drawTexturedRectLitUV ( Texture *  albedo,
Texture *  normal,
float  x,
float  y,
float  w,
float  h,
float  u0,
float  v0,
float  u1,
float  v1,
const Color &  color,
BlendMode  blend = BlendMode::Alpha 
)
pure virtual

Lit 2D draw (albedo + normal map). Uses Lighting2DUBO from setLighting2D. normal may be null → treated as flat (0.5,0.5,1) only if a default normal tex exists.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem::drawItems().

◆ drawTexturedRectLitUVRotated()

virtual void eve::graphics::Graphics::drawTexturedRectLitUVRotated ( Texture *  albedo,
Texture *  normal,
float  cx,
float  cy,
float  w,
float  h,
float  degrees,
float  u0,
float  v0,
float  u1,
float  v1,
const Color &  color,
BlendMode  blend = BlendMode::Alpha 
)
pure virtual

Lit 2D draw rotated degrees clockwise (screen Y-down) around (cx, cy). Fragment tangent frame is rebuilt from screen/UV derivatives so normal maps stay aligned with the rotated albedo.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem::drawItems().

◆ drawTexturedRectRGBA()

void eve::graphics::Graphics::drawTexturedRectRGBA ( Texture *  texture,
float  x,
float  y,
float  w,
float  h,
float  r,
float  g,
float  b,
float  a = 1.f 
)
virtual

Draws textured rect rgba.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1717 行定义.

引用了 a, b, g, h, r, w, x , 以及 y.

◆ drawTexturedRectRotatedRGBA()

void eve::graphics::Graphics::drawTexturedRectRotatedRGBA ( Texture *  texture,
float  cx,
float  cy,
float  w,
float  h,
float  degrees,
float  r,
float  g,
float  b,
float  a = 1.f 
)
virtual

绕矩形中心旋转 degrees 度(顺时针,屏幕 Y 向下)的贴图绘制。

在文件 Graphics.cpp 第 1722 行定义.

引用了 a, eve::Alpha, b, cx, cy, degrees, g, h, r , 以及 w.

◆ drawTexturedRectShader()

virtual void eve::graphics::Graphics::drawTexturedRectShader ( Texture *  texture,
Shader *  shader,
float  x,
float  y,
float  w,
float  h,
const Color &  color 
)
pure virtual

Draw with an explicit Shader (nullptr = default textured pipeline).

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::stylize::StylePass::apply() , 以及 eve::graphics::vulkan::Graphics::drawTexturedRectShaderDepth().

◆ drawTexturedRectShader4()

virtual void eve::graphics::Graphics::drawTexturedRectShader4 ( Texture *  color,
Texture *  depth,
Texture *  motion,
Texture *  extra,
Shader *  shader,
float  x,
float  y,
float  w,
float  h,
const Color &  tint 
)
pure virtual

Post draw with four sampled textures at bindings 0, 1, 2 and 3.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::ScreenSpaceReflection::applyFromScene().

◆ drawTexturedRectShader5()

virtual void eve::graphics::Graphics::drawTexturedRectShader5 ( Texture *  color,
Texture *  depth,
Texture *  motion,
Texture *  extra,
Texture *  specular,
Shader *  shader,
float  x,
float  y,
float  w,
float  h,
const Color &  tint 
)
pure virtual

Post draw with five sampled textures at bindings 0 through 4.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ drawTexturedRectShaderDepth()

virtual void eve::graphics::Graphics::drawTexturedRectShaderDepth ( Texture *  color,
Texture *  depth,
Shader *  shader,
float  x,
float  y,
float  w,
float  h,
const Color &  tint 
)
pure virtual

◆ drawTexturedRectShaderDepthMotion()

virtual void eve::graphics::Graphics::drawTexturedRectShaderDepthMotion ( Texture *  color,
Texture *  depth,
Texture *  motion,
Shader *  shader,
float  x,
float  y,
float  w,
float  h,
const Color &  tint 
)
pure virtual

◆ drawTexturedRectShaderUV()

virtual void eve::graphics::Graphics::drawTexturedRectShaderUV ( Texture *  texture,
Shader *  shader,
float  x,
float  y,
float  w,
float  h,
float  u0,
float  v0,
float  u1,
float  v1,
const Color &  color,
bool  rotatedUV = false,
BlendMode  blend = BlendMode::Alpha 
)
pure virtual

◆ drawTexturedRectShaderUVRotated()

virtual void eve::graphics::Graphics::drawTexturedRectShaderUVRotated ( Texture *  texture,
Shader *  shader,
float  cx,
float  cy,
float  w,
float  h,
float  degrees,
float  u0,
float  v0,
float  u1,
float  v1,
const Color &  color,
bool  rotatedUV = false,
BlendMode  blend = BlendMode::Alpha 
)
pure virtual

UV draw rotated degrees clockwise (screen Y-down) around the rect center. texture may be null → solid. Shader nullptr = default textured pipeline.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem::drawItems().

◆ drawTexturedRectUV()

virtual void eve::graphics::Graphics::drawTexturedRectUV ( Texture *  texture,
float  x,
float  y,
float  w,
float  h,
float  u0,
float  v0,
float  u1,
float  v1,
const Color &  color 
)
pure virtual

Draw a textured sub-rect (atlas / tile UVs). texture may be null → solid.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::vulkan::Graphics::drawTexturedRect().

◆ drawVoxelFaceInstances()

virtual void eve::graphics::Graphics::drawVoxelFaceInstances ( const uint32_t *  packed,
int  count,
float  originX,
float  originY,
float  originZ,
const std::string &  faceDir,
Texture *  atlas,
int  tilesPerRow = 16,
const uint32_t *  ao = nullptr 
)
pure virtual

Instanced voxel face rectangles (32-bit packed instances). ao: optional per-instance ambient-occlusion words (2 bits per corner, 0..3, shader corner order); null → full bright. faceDir: "posX"|"negX"|"posY"|"negY"|"posZ"|"negZ" (also "+x"/"-x"/…). Requires begin3DFrame(); uses viewProj from setMesh3DViewProj. atlas may be null → white; tilesPerRow subdivides atlas for texture indices.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::voxel::VoxelWorld::drawVisible().

◆ dropDeferredFileTexture()

void eve::graphics::Graphics::dropDeferredFileTexture ( Texture *  texture)
protected

◆ ellipse() [1/2]

void eve::graphics::Graphics::ellipse ( std::string  mode,
float  x,
float  y,
float  a,
float  b 
)

Ellipse.

◆ ellipse() [2/2]

void eve::graphics::Graphics::ellipse ( std::string  mode,
float  x,
float  y,
float  a,
float  b,
int  points 
)

Draws an ellipse using the specified arguments.

参数
modeThe mode of drawing (line/filled).
xX-coordinate of center
yY-coordinate of center
aRadius in x-direction
bRadius in y-direction
pointsNumber of points to use to draw the circle.

◆ end3DFrameToCanvas()

virtual void eve::graphics::Graphics::end3DFrameToCanvas ( )
pure virtual

Ends 3 d frame to canvas.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ endDecalPass()

virtual void eve::graphics::Graphics::endDecalPass ( )
pure virtual

Ends decal pass.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ endGBufferPass()

virtual void eve::graphics::Graphics::endGBufferPass ( )
pure virtual

Ends g buffer pass.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ endShadowPass()

virtual void eve::graphics::Graphics::endShadowPass ( )
pure virtual

◆ ensureFileTexturesReady()

void eve::graphics::Graphics::ensureFileTexturesReady ( )

Finish CPU decode and GPU upload for outstanding newTextureFromFile results. @thread Game/render thread that owns the device.

备注
Called automatically from size queries, 2D flush, and present.

在文件 Graphics.cpp 第 1796 行定义.

引用了 g, eve::ResourceManager::getInstance(), pending, realizingFileTextures_ , 以及 resources.

被这些函数引用 eve::graphics::vulkan::Graphics::begin3DFrame(), eve::graphics::vulkan::Graphics::begin3DFrameToCanvas(), eve::graphics::webgpu::Graphics::present(), eve::graphics::vulkan::Graphics::reloadTextureFromFile(), eve::graphics::webgpu::Graphics::reloadTextureFromFile() , 以及 eve::graphics::vulkan::Graphics::setTextureSampler().

◆ fileTextureSourceExists()

bool eve::graphics::Graphics::fileTextureSourceExists ( const std::string &  filename) const
protected

File texture source exists.

在文件 Graphics.cpp 第 1774 行定义.

引用了 info.

被这些函数引用 eve::graphics::vulkan::Graphics::newTextureFromFile() , 以及 eve::graphics::webgpu::Graphics::newTextureFromFile().

◆ filterHDRReflectionCubemap()

virtual bool eve::graphics::Graphics::filterHDRReflectionCubemap ( Texture *  cubemap,
int  sampleCount = 64 
)
inlinevirtual

Generate GGX specular mips and final diffuse irradiance for an HDR cubemap. @compatibility Preserves the established backend boolean submission contract.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 601 行定义.

被这些函数引用 eve::graphics::ReflectionProbeCapture::filterAndPublish().

◆ frameReadbackStatus()

virtual int eve::graphics::Graphics::frameReadbackStatus ( ) const
inlinevirtual

Async readback state: 0=idle, 1=pending, 2=done, 3=failed.

被 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1522 行定义.

◆ getActiveDisplayColorSpace()

Graphics::DisplayColorSpace eve::graphics::Graphics::getActiveDisplayColorSpace ( ) const
virtual

Color space of the live swapchain after the last rebuild.

在文件 DisplayOutput.cpp 第 42 行定义.

引用了 activeDisplayColorSpace_.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ getBackendName()

◆ getBackgroundColor()

Color eve::graphics::Graphics::getBackgroundColor ( ) const
inline

Returns the background color.

在文件 Graphics.h 第 1494 行定义.

被这些函数引用 eve::graphics::RenderSystem::drawItems().

◆ getCanvas()

virtual Canvas * eve::graphics::Graphics::getCanvas ( ) const
pure virtual

Returns the canvas.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::Outline::apply(), eve::stylize::StylePass::apply(), eve::stylize::StyleChain::apply(), eve::stylize_editing::StylizeRecipeRuntime::apply(), eve::graphics::Bloom::apply(), eve::graphics::Exposure::apply(), eve::graphics::DepthOfField::apply(), eve::graphics::Volumetric::applyFogTo(), eve::graphics::AmbientOcclusion::applyFromDepthTo(), eve::graphics::GlobalIllumination::applyFromDepthTo(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::ScreenSpaceReflection::applyFromScene(), eve::graphics::GlobalIllumination::applyFromSceneTo(), eve::graphics::Volumetric::applyFromSceneTo(), eve::graphics::ScreenSpaceReflection::applyFromSceneTo(), eve::graphics::Volumetric::applyFroxel(), eve::graphics::Volumetric::applyFroxelTo(), eve::graphics::AmbientOcclusion::applyOverlayTo(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::AntiAliasing::applyTemporalRect(), eve::graphics::Outline::applyTo(), eve::graphics::AntiAliasing::applyTo(), eve::stylize::StylePass::applyTo(), eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::Volumetric::beginOcclusionMapFromSceneLights2D(), eve::graphics::AmbientOcclusion::blurTo(), eve::graphics::DepthPyramid::build(), eve::graphics::Bloom::build(), eve::graphics::AmbientOcclusion::computeTo(), eve::graphics::Volumetric::projectDirectionalCookie(), eve::graphics::Volumetric::rayMarchTo(), eve::graphics::RenderSystem3D::render(), eve::graphics::Volumetric::renderCloudsTo(), eve::graphics::AntiAliasing::resolveTemporal(), eve::graphics::Volumetric::scatterFromSceneLights2D() , 以及 eve::graphics::Volumetric::scatterTo().

◆ getCurrentDPIScale()

double eve::graphics::Graphics::getCurrentDPIScale ( ) const
inline

Returns the current dpi scale.

在文件 Graphics.h 第 511 行定义.

引用了 width.

◆ getDisplayOutputMode()

Graphics::DisplayOutputMode eve::graphics::Graphics::getDisplayOutputMode ( ) const
virtual

Return the requested present preference.

在文件 DisplayOutput.cpp 第 39 行定义.

引用了 displayOutputMode_.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ getDisplayPaperWhiteNits()

float eve::graphics::Graphics::getDisplayPaperWhiteNits ( ) const
virtual

Paper-white luminance in nits for HDR present encoding.

在文件 DisplayOutput.cpp 第 40 行定义.

引用了 displayPaperWhiteNits_.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ getDisplayPeakNits()

float eve::graphics::Graphics::getDisplayPeakNits ( ) const
virtual

Peak luminance in nits for HDR present encoding.

在文件 DisplayOutput.cpp 第 41 行定义.

引用了 displayPeakNits_.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ getFont()

Font * eve::graphics::Graphics::getFont ( ) const
inlinevirtual

◆ getGpuParticleStats()

virtual GpuParticleStats eve::graphics::Graphics::getGpuParticleStats ( GpuParticleHandle  handle) const
inlinevirtual

Return the latest fence-complete counters without waiting on the GPU.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 354 行定义.

引用了 handle.

◆ getHeight()

◆ getLastOffscreen3DGpuDurationMs()

virtual float eve::graphics::Graphics::getLastOffscreen3DGpuDurationMs ( ) const
inlinevirtual

Return the GPU timestamp duration of the most recently completed offscreen 3D pass, in milliseconds. Zero means unavailable.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1030 行定义.

被这些函数引用 eve::graphics::ReflectionProbeCapture::filterAndPublish(), eve::graphics::ReflectionProbeCapture::stageCapturedFaces(), eve::graphics::ReflectionProbeCapture::tick() , 以及 eve::graphics::ReflectionProbeCapture::update().

◆ getMaxAnisotropy()

virtual float eve::graphics::Graphics::getMaxAnisotropy ( ) const
pure virtual

Device max supported anisotropy (1 if unsupported). Valid after initWithWindow.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getMsaaSamples()

virtual int eve::graphics::Graphics::getMsaaSamples ( ) const
inlinevirtual

Returns the msaa samples.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1543 行定义.

◆ getPixelHeight()

int eve::graphics::Graphics::getPixelHeight ( ) const
inline

Returns the pixel height.

在文件 Graphics.h 第 508 行定义.

被这些函数引用 eve::graphics::ScreenSpaceReflection::getReflectionCanvas() , 以及 eve::graphics::RenderSystem3D::render().

◆ getPixelWidth()

int eve::graphics::Graphics::getPixelWidth ( ) const
inline

Returns the pixel width.

在文件 Graphics.h 第 506 行定义.

被这些函数引用 eve::graphics::ScreenSpaceReflection::getReflectionCanvas() , 以及 eve::graphics::RenderSystem3D::render().

◆ getPresentOverlay()

PresentOverlayFn eve::graphics::Graphics::getPresentOverlay ( ) const
inline

Returns the present overlay.

在文件 Graphics.h 第 1613 行定义.

◆ getPresentOverlayUser()

void * eve::graphics::Graphics::getPresentOverlayUser ( ) const
inline

Returns the present overlay user.

在文件 Graphics.h 第 1615 行定义.

被这些函数引用 eve::ui::ImGuiBackend::shutdown().

◆ getPrimitiveScene()

std::shared_ptr< PrimitiveScene > eve::graphics::Graphics::getPrimitiveScene ( ) const
inlinenoexcept

Returns the authoritative persistent spatial-primitive scene.

返回
Shared owner used by long-lived script proxies and the renderer. @ownership The Graphics module and returned shared pointer co-own the scene. @thread Mutation is restricted to the graphics owner thread.

在文件 Graphics.h 第 521 行定义.

被这些函数引用 eve::graphics::exposePrimitiveScriptBindings() , 以及 eve::graphics::RenderSystem3D::render().

◆ getProjection()

const glm::mat4 & eve::graphics::Graphics::getProjection ( ) const

Returns the projection.

◆ getRenderControl()

RenderControl * eve::graphics::Graphics::getRenderControl ( )

Shared compilable 3D render control (features → pass list + GBuffer). Owned by Graphics; valid for the module lifetime.

在文件 Graphics.cpp 第 254 行定义.

引用了 renderControl_.

被这些函数引用 eve::graphics::vulkan::Graphics::endGBufferPass(), eve::graphics::webgpu::Graphics::endGBufferPass(), eve::graphics::RenderSystem3D::render() , 以及 eve::decal::Decal::setEnabled().

◆ getSceneAutoExposure()

virtual bool eve::graphics::Graphics::getSceneAutoExposure ( ) const
pure virtual

Whether automatic exposure is active.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneAutoExposureMaxEV()

virtual float eve::graphics::Graphics::getSceneAutoExposureMaxEV ( ) const
pure virtual

Maximum automatic exposure EV.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneAutoExposureMinEV()

virtual float eve::graphics::Graphics::getSceneAutoExposureMinEV ( ) const
pure virtual

Minimum automatic exposure EV.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneBloomIntensity()

virtual float eve::graphics::Graphics::getSceneBloomIntensity ( ) const
pure virtual

Current final-scene bloom intensity.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneBloomThreshold()

virtual float eve::graphics::Graphics::getSceneBloomThreshold ( ) const
pure virtual

Current linear HDR bloom threshold.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneColorFilter()

virtual glm::vec3 eve::graphics::Graphics::getSceneColorFilter ( ) const
pure virtual

Current linear RGB multiplier applied during final HDR exposure.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneColorTexture()

virtual Texture * eve::graphics::Graphics::getSceneColorTexture ( )
inlinevirtual

Sampleable 3D color target for the current frame (RGB = lit, A = linear depth). Valid after begin3DFrame until present; nullptr when 3D did not run offscreen.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1047 行定义.

被这些函数引用 drawScene3DRGBA(), eve::graphics::vulkan::Graphics::drawSceneColorDistortionUVRotated() , 以及 eve::graphics::RenderSystem3D::render().

◆ getSceneDofFarZ()

virtual float eve::graphics::Graphics::getSceneDofFarZ ( ) const
pure virtual

Returns the scene dof far z.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneDofFocusDistance()

virtual float eve::graphics::Graphics::getSceneDofFocusDistance ( ) const
pure virtual

Returns the scene dof focus distance.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneDofFocusRange()

virtual float eve::graphics::Graphics::getSceneDofFocusRange ( ) const
pure virtual

Returns the scene dof focus range.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneDofMaxBlur()

virtual float eve::graphics::Graphics::getSceneDofMaxBlur ( ) const
pure virtual

Returns the scene dof max blur.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneDofNearZ()

virtual float eve::graphics::Graphics::getSceneDofNearZ ( ) const
pure virtual

Returns the scene dof near z.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneExposure()

virtual float eve::graphics::Graphics::getSceneExposure ( ) const
pure virtual

Current linear manual exposure multiplier.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneGain()

virtual glm::vec3 eve::graphics::Graphics::getSceneGain ( ) const
pure virtual

Current pre-tonemap gain coefficients.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneInverseGamma()

virtual glm::vec3 eve::graphics::Graphics::getSceneInverseGamma ( ) const
pure virtual

Current pre-tonemap inverse-gamma coefficients.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneLift()

virtual glm::vec3 eve::graphics::Graphics::getSceneLift ( ) const
pure virtual

Current pre-tonemap lift coefficients.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneLinearDepthTexture()

virtual Texture * eve::graphics::Graphics::getSceneLinearDepthTexture ( )
inlinevirtual

Sampleable scene linear depth in [0,1], or nullptr when unavailable.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1049 行定义.

◆ getScenePhotographicVignette()

virtual float eve::graphics::Graphics::getScenePhotographicVignette ( ) const
inlinevirtual

Return photographic vignette intensity; render thread only.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1387 行定义.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ getSceneToneMapping()

virtual SceneToneMapping eve::graphics::Graphics::getSceneToneMapping ( ) const
inlinevirtual

Return the current final display mapping; graphics/render thread only.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1347 行定义.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings() , 以及 setSceneToneMapping().

◆ getSceneTransitionLensDistortion()

virtual float eve::graphics::Graphics::getSceneTransitionLensDistortion ( ) const
pure virtual

Return the final-composite radial lens-distortion strength.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneTransitionLensScale()

virtual float eve::graphics::Graphics::getSceneTransitionLensScale ( ) const
pure virtual

Return the final-composite lens scaling factor.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneTransitionVignette()

virtual float eve::graphics::Graphics::getSceneTransitionVignette ( ) const
pure virtual

Return the final-composite vignette strength.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getSceneTransitionVignetteSmoothness()

virtual float eve::graphics::Graphics::getSceneTransitionVignetteSmoothness ( ) const
pure virtual

Return the final-composite vignette smoothness.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ getScreenDPIScale()

double eve::graphics::Graphics::getScreenDPIScale ( ) const
inline

Returns the screen dpi scale.

在文件 Graphics.h 第 513 行定义.

◆ getShader()

Shader * eve::graphics::Graphics::getShader ( ) const
inlinevirtual

Returns the shader.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.h 第 1704 行定义.

◆ getTransform()

const glm::mat4 & eve::graphics::Graphics::getTransform ( ) const

Returns the transform.

◆ getVSyncCount()

int eve::graphics::Graphics::getVSyncCount ( ) const
inlineoverridevirtualnoexcept

Returns the v sync count.

实现了 eve::IFramePresentation.

在文件 Graphics.h 第 1534 行定义.

◆ getWidth()

◆ gpuDrivenCullBegin()

virtual bool eve::graphics::Graphics::gpuDrivenCullBegin ( const GpuInstance *  instances,
uint32_t  instanceCount 
)
inlinevirtual

Upload sorted instances + bucket metadata for the cull chain.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 394 行定义.

引用了 instanceCount , 以及 instances.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenCullEmit()

virtual void eve::graphics::Graphics::gpuDrivenCullEmit ( const glm::mat4 &  viewProj,
const glm::vec3 &  eye,
float  fovYDeg,
float  nearZ,
float  farZ 
)
inlinevirtual

Record the cull + emit compute dispatches for the current frame.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 401 行定义.

引用了 eye , 以及 viewProj.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenCullEnabled()

virtual bool eve::graphics::Graphics::gpuDrivenCullEnabled ( ) const
inlinevirtual

True when the stage-2 GPU cull chain will run this frame.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 388 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenDrawOpaque()

virtual void eve::graphics::Graphics::gpuDrivenDrawOpaque ( )
inlinevirtual

Draw the opaque geometry with GPU-written indirect commands.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 414 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenEnabled()

virtual bool eve::graphics::Graphics::gpuDrivenEnabled ( ) const
inlinevirtual

Whether the GPU-driven opaque path is currently enabled.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 268 行定义.

◆ gpuDrivenMaterialRecord()

virtual uint32_t eve::graphics::Graphics::gpuDrivenMaterialRecord ( Material *  material)
inlinevirtual

GPU material-table slot for a material (lazily created).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 280 行定义.

引用了 eve::graphics::kInvalidGpuDrivenSlot , 以及 material.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::prepareGpuDriven() , 以及 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenMaterialUsable()

virtual bool eve::graphics::Graphics::gpuDrivenMaterialUsable ( Material *  material)
inlinevirtual

Whether a material can be shaded by the GPU-driven opaque path. Backends/drivers with descriptor-indexing limitations return false for materials that would hit the limitation; RenderSystem3D then falls back.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 304 行定义.

引用了 material.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::prepareGpuDriven() , 以及 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenMeshRecord()

virtual uint32_t eve::graphics::Graphics::gpuDrivenMeshRecord ( Mesh *  mesh)
inlinevirtual

GPU mesh-table slot for a mesh (kInvalidGpuDrivenSlot when not uploaded).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 274 行定义.

引用了 eve::graphics::kInvalidGpuDrivenSlot , 以及 mesh.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::prepareGpuDriven() , 以及 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenOpenScenePass()

virtual void eve::graphics::Graphics::gpuDrivenOpenScenePass ( )
inlinevirtual

Open the scene color pass that begin3DFrame deferred (cull path).

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 411 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenRecordVisPass()

virtual void eve::graphics::Graphics::gpuDrivenRecordVisPass ( )
inlinevirtual

Record the GBuffer vis pass (opaque indirect draws write visID/visBary).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 424 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenReflectionProbeSlot()

virtual uint32_t eve::graphics::Graphics::gpuDrivenReflectionProbeSlot ( Texture *  cubemap)
inlinevirtual

Return/register a bindless cubemap slot for a GPU-driven local probe.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 310 行定义.

引用了 eve::graphics::kInvalidGpuDrivenSlot.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenReleaseMaterialRecord()

virtual Result< void > eve::graphics::Graphics::gpuDrivenReleaseMaterialRecord ( Material *  material)
inlinevirtual

Release a lazily-created GPU material-table record.

参数
materialMaterial previously passed to gpuDrivenMaterialRecord; null is invalid.
返回
Success when removed or already absent; Unsupported when the backend owns no table. @thread Graphics thread only, outside an open frame submission. @lifetime The caller may destroy the material after this call succeeds.

Failure.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 292 行定义.

引用了 material.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::prepareGpuDriven().

◆ gpuDrivenResolve()

virtual void eve::graphics::Graphics::gpuDrivenResolve ( )
inlinevirtual

Record the fullscreen vis resolve inside the open scene color pass.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 427 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenResolveWanted()

virtual bool eve::graphics::Graphics::gpuDrivenResolveWanted ( ) const
inlinevirtual

True when the stage-3 vis+resolve path should run this frame.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 421 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenScenePassPending()

virtual bool eve::graphics::Graphics::gpuDrivenScenePassPending ( ) const
inlinevirtual

Scene pass opening deferred until after the compute cull section.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 391 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenSetEnabled()

virtual void eve::graphics::Graphics::gpuDrivenSetEnabled ( bool  enabled)
inlinevirtual

Enable/disable the GPU-driven opaque path (no-op when unsupported).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 271 行定义.

引用了 enabled.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenSubmitOpaque()

virtual bool eve::graphics::Graphics::gpuDrivenSubmitOpaque ( const GpuInstance *  instances,
uint32_t  instanceCount 
)
inlinevirtual

Upload + record GPU-driven opaque draws (call inside the open 3D frame). The backend sorts instances by (material, mesh), merges buckets and emits indirect draws itself; the caller only supplies the raw instance list.

返回
false when the backend cannot service the request (caller falls back).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 365 行定义.

引用了 instanceCount , 以及 instances.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::asset_procgen::submitTerrainVegetation().

◆ gpuDrivenSubmitResident()

virtual GpuResidentSubmitStatus eve::graphics::Graphics::gpuDrivenSubmitResident ( const GpuResidentInstanceBatch &  batch)
inlinevirtual

Submit a GPU-authored, bucket-sorted GpuInstance buffer without CPU readback.

参数
batchBorrowed buffer view and O(bucket) draw metadata. The producer retains the native buffer until the current frame fence completes.
返回
Structured status; unsupported backends never perform a hidden CPU fallback. @thread Render/submission thread, while the 3D frame accepts opaque draws.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 378 行定义.

◆ gpuDrivenVgAssetId()

virtual std::uint32_t eve::graphics::Graphics::gpuDrivenVgAssetId ( Mesh *  mesh) const
inlinevirtual

VG asset id attached to a mesh (kInvalidGpuDrivenSlot when none).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 440 行定义.

引用了 eve::graphics::kInvalidGpuDrivenSlot , 以及 mesh.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenVgAttachToMesh()

virtual bool eve::graphics::Graphics::gpuDrivenVgAttachToMesh ( Mesh *  mesh,
std::uint32_t  vgAssetId 
)
inlinevirtual

Attach an uploaded VG asset to a mesh (routes it to the VG path).

在文件 Graphics.h 第 446 行定义.

引用了 mesh.

◆ gpuDrivenVgComputeSection()

virtual void eve::graphics::Graphics::gpuDrivenVgComputeSection ( const glm::mat4 &  viewProj,
const glm::vec3 &  eye,
float  fovYDeg,
float  nearZ,
float  farZ 
)
inlinevirtual

Record the HZB build + cull-params section (VG-only frames).

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 467 行定义.

引用了 eye , 以及 viewProj.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenVgSetInstance()

virtual bool eve::graphics::Graphics::gpuDrivenVgSetInstance ( std::uint32_t  vgAssetId,
const glm::mat4 &  model,
std::uint32_t  materialId 
)
inlinevirtual

Register one instance of a VG asset this frame (model + material). The first instance per asset wins; returns false for unknown assets.

@compatibility Legacy boolean facade over backend submission status.

Gpu driven vg set instance.

在文件 Graphics.h 第 458 行定义.

引用了 model.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ gpuDrivenVgUpload()

virtual std::uint32_t eve::graphics::Graphics::gpuDrivenVgUpload ( const GpuVgAssetUpload &  asset)
inlinevirtual

Upload a virtual-geometry asset into the shared cluster pool.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 434 行定义.

引用了 eve::graphics::kInvalidGpuDrivenSlot.

◆ had3DThisFrame()

bool eve::graphics::Graphics::had3DThisFrame ( ) const
inline

Had 3 d this frame.

在文件 Graphics.h 第 1491 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ initHeadless()

void eve::graphics::Graphics::initHeadless ( int  width,
int  height 
)
virtual

Initialize the renderer without a window or swapchain (headless mode). Creates a GPU device and offscreen render targets; present() becomes a no-op. Rendering goes through Canvas + readback (newImageData / readPixels).

参数
widthLogical viewport width in pixels (must be > 0).
heightLogical viewport height in pixels (must be > 0).
异常
eve::Exceptionwhen the backend does not support headless init, or when graphics is already initialized.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.cpp 第 1477 行定义.

引用了 height , 以及 width.

◆ initWithWindow()

virtual void eve::graphics::Graphics::initWithWindow ( void *  nativeWindow)
pure virtual

Bind to an existing native window (SDL_Window*) and create Vulkan device/swapchain. Must be called after the window exists (SDL_WINDOW_VULKAN).

实现了 eve::IWindowSurfaceHost.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ inverseTransformPoint()

glm::vec2 eve::graphics::Graphics::inverseTransformPoint ( glm::vec2  point)

Inverse transform point.

◆ isActive()

bool eve::graphics::Graphics::isActive ( ) const
inline

True when active.

在文件 Graphics.h 第 1551 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::present().

◆ isCanvasActive()

virtual bool eve::graphics::Graphics::isCanvasActive ( ) const
pure virtual

True when canvas active.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ isDisplayHdrActive()

bool eve::graphics::Graphics::isDisplayHdrActive ( ) const
virtual

True when the live swapchain is scRGB or HDR10.

在文件 DisplayOutput.cpp 第 45 行定义.

引用了 activeDisplayColorSpace_ , 以及 Sdr.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ isHeadless()

virtual bool eve::graphics::Graphics::isHeadless ( ) const
inlinevirtual

True when the renderer was initialized via initHeadless().

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 494 行定义.

◆ isScreenReadbackEnabled()

bool eve::graphics::Graphics::isScreenReadbackEnabled ( ) const
inline

True when screen readback enabled.

在文件 Graphics.h 第 1504 行定义.

◆ isVSync()

bool eve::graphics::Graphics::isVSync ( ) const
inline

True when v sync.

在文件 Graphics.h 第 1530 行定义.

◆ markSwapchainDirty()

virtual void eve::graphics::Graphics::markSwapchainDirty ( )
inlinevirtual

Request swapchain recreation on next present/begin3DFrame.

在文件 Graphics.h 第 1554 行定义.

◆ Module_REG()

eve::graphics::Graphics::Module_REG ( Graphics  )

◆ newAlphaMask()

AlphaMask * eve::graphics::Graphics::newAlphaMask ( )

Create a script-owned reusable two-texture alpha-mask compositor.

在文件 Graphics.cpp 第 1494 行定义.

◆ newAmbientOcclusion()

AmbientOcclusion * eve::graphics::Graphics::newAmbientOcclusion ( )
virtual

Screen-space ambient occlusion (ssao / hbao / gtao). Caller owns AmbientOcclusion*; its Shaders are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1491 行定义.

◆ newAntiAliasing()

AntiAliasing * eve::graphics::Graphics::newAntiAliasing ( )
virtual

Classic image-space AA (FXAA / SMAA / SSAA / NFAA). Caller owns AntiAliasing*; its Shaders are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1611 行定义.

◆ newCanvas()

virtual Canvas * eve::graphics::Graphics::newCanvas ( int  width,
int  height 
)
pure virtual

Create an offscreen render target (sampleable). Owned by Graphics.

实现了 eve::graphics::ICanvasFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newCubemap() [1/2]

virtual Texture * eve::graphics::Graphics::newCubemap ( int  faceSize,
const uint8_t *  rgbaFaces 
)
pure virtual

Create an RGBA8 cubemap from 6 faces packed as +X,-X,+Y,-Y,+Z,-Z (each faceSize×faceSize, total bytes = faceSize²×4×6). Owned by Graphics.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::daynight::DayNight::update().

◆ newCubemap() [2/2]

virtual Texture * eve::graphics::Graphics::newCubemap ( int  faceSize,
const uint8_t *  rgbaFaces,
const TextureCreateInfo &  info 
)
pure virtual

Cubemap with GGX specular mips and final diffuse-irradiance mip.

@ownership Pixels remain caller-owned; result is Graphics-owned. @lifetime Pixels are call-only; result lives until released.

Creates a cubemap. @ownership Caller deletes unless documented otherwise.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newDepthOfField()

DepthOfField * eve::graphics::Graphics::newDepthOfField ( )

Create a caller-owned depth-aware depth-of-field compositor.

在文件 Graphics.cpp 第 1489 行定义.

◆ newFont()

Font * eve::graphics::Graphics::newFont ( font::FontData *  data,
std::string  charset = Font::defaultCharset() 
)
virtual

Build a GPU font (glyph atlas texture) from decoded font data. Rasterizes charset (UTF-8, default: printable ASCII) up front; Codepoints outside it still advance in drawText() but aren't drawn. Caller owns Font* (not tracked by Graphics — unlike newTexture / newMesh / newShader handles, which Graphics owns).

实现了 eve::graphics::IResourceFactory.

在文件 Graphics.cpp 第 1887 行定义.

◆ newGlobalIllumination()

GlobalIllumination * eve::graphics::Graphics::newGlobalIllumination ( )
virtual

Screen-space single-bounce GI. Caller owns GlobalIllumination*; its Shaders are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1498 行定义.

◆ newGrassField()

GrassField * eve::graphics::Graphics::newGrassField ( )
virtual

Dense + sparse stylized grass field. Caller owns GrassField*; its Mesh / Shader / Texture are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1623 行定义.

◆ newGrassShader()

Shader * eve::graphics::Graphics::newGrassShader ( )
virtual

t3ssel8r-style grass billboard shader (alpha test + shadow two-tone). Owned by Graphics. See grass:: / GrassField.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1619 行定义.

◆ newGroomInstance()

hair::GroomInstance * eve::graphics::Graphics::newGroomInstance ( )

High-quality groom/hair instance (UE GroomComponent analogue). See graphics/hair/ and docs/dev/毛发Groom子系统设计.md. @ownership Caller owns the returned GroomInstance*; its Mesh / Shader / Texture remain owned by Graphics. @lifetime Returned instance is valid until the caller deletes it; Graphics must outlive draws that use its GPU resources.

在文件 Graphics.cpp 第 1625 行定义.

◆ newHairCardMaterial()

Material * eve::graphics::Graphics::newHairCardMaterial ( Texture *  albedo = nullptr)

Material preconfigured for hair cards (transparent, double-sided, hair shader). @ownership Caller owns the Material*; shader is owned by Graphics.

在文件 Graphics.cpp 第 1617 行定义.

引用了 albedo.

◆ newHairCardMesh()

Mesh * eve::graphics::Graphics::newHairCardMesh ( float  width = 0.12f,
float  height = 0.45f 
)

Procedural upright hair/fur card mesh (root at origin, height +Y, face +Z). @ownership Owned by Graphics.

在文件 Graphics.cpp 第 1615 行定义.

引用了 height , 以及 width.

◆ newHairShader()

Shader * eve::graphics::Graphics::newHairShader ( )

Built-in hair shader with default anisotropic parameters.

在文件 Graphics.cpp 第 1613 行定义.

◆ newHairShaderFromSpv()

virtual Shader * eve::graphics::Graphics::newHairShaderFromSpv ( const std::vector< uint32_t > &  vertSpv,
const std::vector< uint32_t > &  fragSpv 
)
pure virtual

Hair/fur card shader (alpha blend + Kajiya-Kay). Empty vert → mesh3d_hair.vert. Owned by Graphics.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::hair::createShader().

◆ newHairShaderFromWgsl()

virtual Shader * eve::graphics::Graphics::newHairShaderFromWgsl ( const std::string &  vertWgsl,
const std::string &  fragWgsl 
)
pure virtual

Create an alpha-blended hair/card shader from WGSL on WebGPU.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::hair::createShader().

◆ newHDRCanvas()

virtual Canvas * eve::graphics::Graphics::newHDRCanvas ( int  width,
int  height 
)
pure virtual

Create an engine-internal linear RGBA16F post-process target.

参数
widthPixel width.
heightPixel height.
返回
Graphics-owned sampleable Canvas. Pixel readback is unsupported. @lifetime The returned canvas remains valid until released by Graphics.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::ScreenSpaceReflection::getReflectionCanvas().

◆ newHDRCubemap()

virtual Texture * eve::graphics::Graphics::newHDRCubemap ( int  faceSize)
inlinevirtual

Allocate a linear RGBA16F six-layer staging cubemap for runtime capture.

返回
Graphics-owned texture, or nullptr when unsupported by the backend. @lifetime The returned texture remains valid until released by Graphics.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 562 行定义.

被这些函数引用 eve::graphics::ReflectionProbeCapture::stageCapturedFaces().

◆ newMapFog()

MapFog * eve::graphics::Graphics::newMapFog ( )

Create a script-owned SLG / large-map war-fog overlay (dual cloud + mask). @lifetime Caller owns the MapFog*; its Shader is owned by Graphics.

在文件 Graphics.cpp 第 1496 行定义.

◆ newMaterial()

Material * eve::graphics::Graphics::newMaterial ( )

Create a Material asset (shading model + textures + PBR knobs). Caller owns Material*; not tracked by Graphics.

在文件 Graphics.cpp 第 252 行定义.

被这些函数引用 eve::weather::Weather::init().

◆ newMeshCube()

Mesh * eve::graphics::Graphics::newMeshCube ( float  size = 1.f)
virtual

Procedural cube (edge length size, centered at origin, outward CCW for RH Y-up), with per-face normals and a full 0..1 UV per face. Owned by Graphics.

实现了 eve::graphics::IResourceFactory.

在文件 Graphics.cpp 第 1634 行定义.

引用了 c, f, h, indices, pos, size , 以及 uv.

◆ newMeshCylinder()

virtual Mesh * eve::graphics::Graphics::newMeshCylinder ( int  slices = 32,
int  stacks = 1,
bool  caps = true 
)
pure virtual

Procedural Y-up cylinder (radius 1, height 2 centered at origin). slices = longitude divisions; stacks = height bands; caps = include end discs. Owned by Graphics.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newMeshFromArrays()

virtual Mesh * eve::graphics::Graphics::newMeshFromArrays ( const float *  posXYZ,
const float *  nrmXYZ,
const float *  uvST,
int  vertexCount,
const uint32_t *  indices,
int  indexCount 
)
pure virtual

◆ newMeshFromArraysColored()

virtual Mesh * eve::graphics::Graphics::newMeshFromArraysColored ( const float *  posXYZ,
const float *  nrmXYZ,
const float *  uvST,
const float *  colorRGBA,
int  vertexCount,
const uint32_t *  indices,
int  indexCount 
)
pure virtual

Upload a triangle mesh with an optional packed RGBA color per vertex.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::vulkan::Graphics::newMeshFromArrays() , 以及 eve::procgen::Procgen::uploadMeshBorrowed().

◆ newMeshFromAssimp() [1/2]

virtual Mesh * eve::graphics::Graphics::newMeshFromAssimp ( const ::aiMesh &  mesh)
pure virtual

Creates a mesh from assimp. @ownership Caller deletes unless documented otherwise.

Upload triangulated mesh from Assimp (pos/normal/uv + indices). Owned by Graphics. Also captures Assimp morph targets (aiAnimMesh) into Mesh CPU morph data when present.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::housegen::HouseLayout::instantiate() , 以及 eve::graphics::vulkan::Graphics::newMeshFromAssimp().

◆ newMeshFromAssimp() [2/2]

virtual Mesh * eve::graphics::Graphics::newMeshFromAssimp ( const ::aiMesh &  mesh,
const aiMatrix4x4 &  worldTransform 
)
pure virtual

Like newMeshFromAssimp, but bakes an Assimp node world transform into positions and transforms normals by the inverse-transpose of the upper 3x3. Required for hierarchical glTF/FBX scenes — raw aiMesh verts are in local space.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newMeshShader() [1/2]

Shader * eve::graphics::Graphics::newMeshShader ( const std::string &  fragGlsl)
inline

Creates a mesh shader. @ownership Caller deletes unless documented otherwise.

@ownership Result is Graphics-owned. @lifetime Source is call-only; result lives until released.

Creates a mesh shader. @ownership Caller deletes unless documented otherwise.

在文件 Graphics.h 第 1866 行定义.

◆ newMeshShader() [2/2]

virtual Shader * eve::graphics::Graphics::newMeshShader ( const std::string &  vertGlsl,
const std::string &  fragGlsl 
)
pure virtual

Creates a mesh shader. @ownership Caller deletes unless documented otherwise.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newMeshShaderFromSpv()

◆ newMeshShaderFromWgsl()

virtual Shader * eve::graphics::Graphics::newMeshShaderFromWgsl ( const std::string &  vertWgsl,
const std::string &  fragWgsl 
)
pure virtual

Create a Mesh3D custom shader from WGSL source (WebGPU backend). The WGSL must declare the engine's Frame UBO (group 0 binding 0) and the shared mesh3d bindings (albedo 1, normal 2, env 3, shadow UBO 4, shadow depth 5, height 6, main sampler 7, shadow compare sampler 8, scene depth 9). Vulkan throws (uses SPIR-V via newMeshShaderFromSpv).

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::stylize::createMeshShader(), eve::graphics::grass::createShader(), eve::graphics::createTreeWindShader(), eve::weather::Weather::init(), eve::graphics::newWaterfallShader() , 以及 eve::graphics::newWaterShader().

◆ newMeshShaderVF()

Shader * eve::graphics::Graphics::newMeshShaderVF ( const std::string &  vertGlsl,
const std::string &  fragGlsl 
)
inline

Creates a Mesh3D shader from separate vertex and fragment GLSL sources.

参数
vertGlslVertex shader source.
fragGlslFragment shader source.
返回
A graphics-owned shader, or nullptr when compilation fails.

Creates a mesh shader. @ownership Caller deletes unless documented otherwise.

在文件 Graphics.h 第 1860 行定义.

◆ newMeshSphere()

virtual Mesh * eve::graphics::Graphics::newMeshSphere ( int  slices = 32,
int  stacks = 16 
)
pure virtual

Procedural UV sphere (radius 1, Y-up). Owned by Graphics. slices = longitude divisions, stacks = latitude divisions.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::fluids::SurfaceFluidSceneRenderer::draw().

◆ newOutline()

Outline * eve::graphics::Graphics::newOutline ( )
virtual

Screen-space model outline (t3ssel8r-style) from GBuffer depth + normal. Caller owns Outline*; its Shader is owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1493 行定义.

◆ newQuad()

Quad * eve::graphics::Graphics::newQuad ( int  x,
int  y,
int  w,
int  h 
)

Pixel-space atlas rect. Caller owns Quad* (not tracked by Graphics).

在文件 Graphics.cpp 第 1885 行定义.

引用了 h, w, x , 以及 y.

◆ newReflectionProbeCapture()

ReflectionProbeCapture * eve::graphics::Graphics::newReflectionProbeCapture ( )

Create an incremental six-face HDR reflection-probe capture. @ownership The caller owns the returned capture object.

在文件 Graphics.cpp 第 1630 行定义.

◆ newReflectionProbeRegistry()

ReflectionProbeRegistry * eve::graphics::Graphics::newReflectionProbeRegistry ( )

Create a scene-level automatic reflection-probe selector. @ownership The caller owns the returned registry.

在文件 Graphics.cpp 第 1632 行定义.

◆ newScreenSpaceReflection()

ScreenSpaceReflection * eve::graphics::Graphics::newScreenSpaceReflection ( )
virtual

Screen-space reflections (ray-marched over scene color + hw depth). Caller owns ScreenSpaceReflection*; its Shader is owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1500 行定义.

◆ newShader() [1/2]

Shader * eve::graphics::Graphics::newShader ( const std::string &  fragGlsl)
inline

Creates a shader. @ownership Caller deletes unless documented otherwise.

在文件 Graphics.h 第 1728 行定义.

引用了 newShader().

被这些函数引用 newShader().

◆ newShader() [2/2]

virtual Shader * eve::graphics::Graphics::newShader ( const std::string &  vertGlsl,
const std::string &  fragGlsl 
)
pure virtual

Compile GLSL source with the engine's build-time GLSL compiler. Empty vertGlsl → default textured vert. Windows builds link the Vulkan SDK's shaderc archive; hosts without it fall back to an external glslc on PATH. Throws if compilation fails.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newShaderFromSpv()

virtual Shader * eve::graphics::Graphics::newShaderFromSpv ( const std::vector< uint32_t > &  vertSpv,
const std::vector< uint32_t > &  fragSpv 
)
pure virtual

◆ newShaderFromSpvFile() [1/2]

Shader * eve::graphics::Graphics::newShaderFromSpvFile ( const std::string &  fragPath)
inline

Creates a shader from spv file. @ownership Caller deletes unless documented otherwise.

Creates a shader from spv file. @ownership Caller deletes unless documented otherwise.

在文件 Graphics.h 第 1716 行定义.

◆ newShaderFromSpvFile() [2/2]

virtual Shader * eve::graphics::Graphics::newShaderFromSpvFile ( const std::string &  vertPath,
const std::string &  fragPath 
)
pure virtual

Load SPIR-V from files via Filesystem (empty vertPath → default textured vert).

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newShaderFromWgsl()

virtual Shader * eve::graphics::Graphics::newShaderFromWgsl ( const std::string &  vertWgsl,
const std::string &  fragWgsl 
)
pure virtual

Create a 2D custom shader from WGSL source (WebGPU backend). Empty vert → default textured vertex shader. The fragment WGSL declares the shared 2D bindings (color texture 0, depth texture 1, sampler 2, depth sampler 3, Externals UBO 4) and vs_main/fs_main entry points. Vulkan throws (uses SPIR-V via newShaderFromSpv).

@ownership Result is Graphics-owned. @lifetime Sources are call-only; result lives until released.

Creates a shader from wgsl. @ownership Caller deletes unless documented otherwise.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::AlphaMask::AlphaMask(), eve::stylize::createPostShader(), eve::graphics::DepthPyramid::DepthPyramid() , 以及 eve::graphics::MapFog::MapFog().

◆ newSprite2D()

Renderable2D * eve::graphics::Graphics::newSprite2D ( )

Create a script-facing Sprite2D ECS entity. Call destroy() when done.

在文件 Graphics.cpp 第 1469 行定义.

◆ newTexture() [1/4]

virtual Texture * eve::graphics::Graphics::newTexture ( image::ImageData *  data)
pure virtual

Create texture from ImageData (RGBA8 required for now).

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newTexture() [2/4]

virtual Texture * eve::graphics::Graphics::newTexture ( image::ImageData *  data,
const TextureCreateInfo &  info 
)
pure virtual

Create texture from ImageData with sampler / mipmap options.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newTexture() [3/4]

virtual Texture * eve::graphics::Graphics::newTexture ( int  width,
int  height,
const uint8_t *  rgba,
bool  repeatU = false,
bool  repeatV = false 
)
pure virtual

◆ newTexture() [4/4]

virtual Texture * eve::graphics::Graphics::newTexture ( int  width,
int  height,
const uint8_t *  rgba,
const TextureCreateInfo &  info 
)
pure virtual

Creates a texture. @ownership Caller deletes unless documented otherwise.

Create RGBA8 texture with explicit sampler / mipmap options. Borrowed handle: Graphics owns the texture (freed at shutdown or via releaseTexture); callers must not delete it.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ newTextureFromFile()

virtual Texture * eve::graphics::Graphics::newTextureFromFile ( const std::string &  filename)
pure virtual

Creates a texture from file. @ownership Caller deletes unless documented otherwise.

Load file via Filesystem + Image decode, then upload (RGBA8). Throws on failure. Same path returns the same Texture* and reloads pixels in place on repeat calls. CPU decode is queued on the thread pool; GPU upload is coalesced automatically before the texture is sampled or its size is queried.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::animation::Animation::newSpriteSheetFromAtlasJson() , 以及 eve::spritestack::SpriteStack2D::setLayerFile().

◆ newTextureFromFileRepeated()

Texture * eve::graphics::Graphics::newTextureFromFileRepeated ( const std::string &  filename,
bool  repeatU,
bool  repeatV 
)
virtual

Creates a texture from file repeated. @ownership Caller deletes unless documented otherwise.

Load a texture from disk with wrap/repeat sampling (for tiling structures). Non-virtual helper (same pattern as newTextureFromImageData); reads + decodes via Filesystem/Image then uploads with the requested repeat modes.

实现了 eve::graphics::IResourceFactory.

在文件 Graphics.cpp 第 1838 行定义.

引用了 repeatU , 以及 repeatV.

◆ newTextureFromImageData() [1/2]

Texture * eve::graphics::Graphics::newTextureFromImageData ( image::ImageData *  data,
bool  repeatU = false,
bool  repeatV = false 
)
virtual

Creates a texture from image data. @ownership Caller deletes unless documented otherwise.

Upload RGBA8 ImageData; optional seamless repeat on U/V. Borrowed handle: Graphics owns the texture (freed at shutdown or via releaseTexture); callers must not delete it. @ownership Input remains caller-owned; result is Graphics-owned. @lifetime Input is call-only; result lives until released.

实现了 eve::graphics::IResourceFactory.

在文件 Graphics.cpp 第 1737 行定义.

引用了 info, eve::graphics::TextureSampler::repeatU, repeatU, repeatV , 以及 eve::graphics::TextureCreateInfo::sampler.

被这些函数引用 configureFoliageWind(), eve::animation::Animation::newSpriteSheetFromSequence(), eve::graphics::Water::setDepthGradient() , 以及 eve::spritestack::SpriteStack2D::setLayerImage().

◆ newTextureFromImageData() [2/2]

Texture * eve::graphics::Graphics::newTextureFromImageData ( image::ImageData *  data,
const TextureCreateInfo &  info 
)
virtual

Upload RGBA8 ImageData with mipmaps / filter / anisotropy options.

实现了 eve::graphics::IResourceFactory.

在文件 Graphics.cpp 第 1746 行定义.

引用了 info.

◆ newTextureWithSampler()

Texture * eve::graphics::Graphics::newTextureWithSampler ( image::ImageData *  data,
bool  repeatU,
bool  repeatV,
bool  generateMipmaps,
float  maxAnisotropy,
const std::string &  filter,
const std::string &  mipmap,
float  lodBias = 0.f 
)
virtual

Script-friendly texture create: filter = "linear"|"nearest", mipmap = "none"|"linear"|"nearest". generateMipmaps builds a full mip chain; maxAnisotropy > 1 enables anisotropic filtering.

实现了 eve::graphics::IResourceFactory.

在文件 Graphics.cpp 第 1848 行定义.

引用了 filter, eve::graphics::TextureCreateInfo::generateMipmaps, info, mipmap, repeatU , 以及 repeatV.

◆ newTreeWindShader()

Shader * eve::graphics::Graphics::newTreeWindShader ( )

Create a backend-native tree wind shader using the default Mesh3D PBR fragment stage.

@ownership Graphics owns the returned shader; callers borrow it. @lifetime Valid until releaseShader() or Graphics destruction. @thread Render thread only.

返回
Borrowed shader pointer.

在文件 Graphics.cpp 第 1621 行定义.

引用了 eve::graphics::createTreeWindShader().

◆ newVolumetric()

Volumetric * eve::graphics::Graphics::newVolumetric ( )
virtual

Volumetric light + fog (screenspace / raymarch / fog). Caller owns Volumetric*; its Shaders are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1487 行定义.

◆ newWater()

Water * eve::graphics::Graphics::newWater ( )
virtual

Dynamic water surface (sky reflection + animated edge waves + middle drop ripples). Caller owns Water*; its Mesh / Shader are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1628 行定义.

引用了 eve::Water.

◆ newWaterfall()

Waterfall * eve::graphics::Graphics::newWaterfall ( )
virtual

Flowing waterfall (falling water sheet) with sky reflection, downward velocity streaks and animated foam at the top lip and bottom splash pool. Caller owns Waterfall*; its Mesh / Shader are owned by Graphics.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1627 行定义.

◆ onNativeWindowDestroyed()

virtual void eve::graphics::Graphics::onNativeWindowDestroyed ( )
inlinevirtual

Called by the Window module when the native window backing the render surface is destroyed (window close / recreation). Backends that keep a platform surface tied to the native window must drop it here so the next initWithWindow() rebuilds it against a fresh window — even when SDL hands back the same pointer for the recreated window.

The present overlay is bound to the destroyed window, so it is also dropped here: a stale ImGui callback would otherwise keep drawing into later presents of unrelated windows. Registered window-destroyed callbacks (e.g. the UI backend's ImGui teardown) fire first so they can release their ImGui context while the surface is still valid.

Clears present overlay.

实现了 eve::IWindowSurfaceHost.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1576 行定义.

◆ onResourcesRetiring()

Result< eve::Subscription > eve::graphics::Graphics::onResourcesRetiring ( std::function< void()>  callback) const

Register cleanup before this provider destroys its GPU device/resources.

返回
Owning subscription, or Conflict if retirement has started. @lifetime Retain the subscription until cleanup is no longer needed. Either destruction order is safe. @thread Render thread only. Callback must not throw, recreate or destroy Graphics, or start GPU work.
注解
Callbacks run without locks; disposing subscriptions during notification is supported.

在文件 GraphicsLifetime.cpp 第 31 行定义.

引用了 callback, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), lifetime, eve::Result< T >::success() , 以及 value.

◆ origin()

void eve::graphics::Graphics::origin ( )

Origin.

◆ pipelineAmbientOcclusion()

AmbientOcclusion * eve::graphics::Graphics::pipelineAmbientOcclusion ( )
virtual

Pipeline-owned AO / GI / AA used by RenderSystem3D when features "ao" / "gi" / "aa" are enabled. Created on first use; Graphics owns them.

@lifetime Pipeline effect getters return Graphics-owned objects valid until shutdown.

Pipeline ambient occlusion.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1502 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ pipelineAntiAliasing()

AntiAliasing * eve::graphics::Graphics::pipelineAntiAliasing ( )
virtual

Pipeline anti aliasing.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1512 行定义.

被这些函数引用 prepareSceneColorResolveShader() , 以及 eve::graphics::RenderSystem3D::render().

◆ pipelineBloom()

Bloom * eve::graphics::Graphics::pipelineBloom ( )

Pipeline-owned linear-HDR bloom pyramid, created on first use. @lifetime Returned effect remains valid until Graphics shutdown.

在文件 Graphics.cpp 第 1517 行定义.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ pipelineDepthOfField()

DepthOfField * eve::graphics::Graphics::pipelineDepthOfField ( )

Pipeline-owned Gaussian depth-of-field, created on first use. @lifetime Returned effect remains valid until Graphics shutdown.

在文件 Graphics.cpp 第 1522 行定义.

◆ pipelineDepthPyramid()

DepthPyramid * eve::graphics::Graphics::pipelineDepthPyramid ( )

Pipeline-owned shared min/max depth hierarchy for screen-space effects. @lifetime Returned effect remains valid until Graphics shutdown.

在文件 Graphics.cpp 第 1532 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ pipelineExposure()

Exposure * eve::graphics::Graphics::pipelineExposure ( )

Pipeline-owned GPU exposure metering and eye adaptation. @lifetime Returned effect remains valid until Graphics shutdown.

在文件 Graphics.cpp 第 1527 行定义.

被这些函数引用 eve::graphics::AntiAliasing::invalidateTemporalHistory() , 以及 eve::graphics::AntiAliasing::setTemporalCamera().

◆ pipelineGlobalIllumination()

GlobalIllumination * eve::graphics::Graphics::pipelineGlobalIllumination ( )
virtual

Pipeline global illumination.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1507 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ pipelineOutline()

Outline * eve::graphics::Graphics::pipelineOutline ( )
virtual

Pipeline-owned Outline used by RenderSystem3D when the "outline" feature is on.

实现了 eve::graphics::IPostFX.

在文件 Graphics.cpp 第 1606 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ pipelineReflectionComposite()

Canvas * eve::graphics::Graphics::pipelineReflectionComposite ( int  width,
int  height 
)

Return a reusable HDR target for composing screen-space lighting. @lifetime Returned canvas is Graphics-owned and valid for the current target allocation.

在文件 Graphics.cpp 第 1590 行定义.

引用了 height , 以及 width.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ pipelineScreenSpaceReflection()

ScreenSpaceReflection * eve::graphics::Graphics::pipelineScreenSpaceReflection ( )

Pipeline screen space reflection.

在文件 Graphics.cpp 第 1601 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ points()

void eve::graphics::Graphics::points ( const std::vector< glm::vec2 > &  positions,
const std::vector< Color > &  colors 
)

Draws a series of points at the specified positions.

◆ polygon()

void eve::graphics::Graphics::polygon ( std::string  mode,
const std::vector< glm::vec2 > &  vertices,
bool  skipLastFilledVertex = true 
)

Draws a polygon with an arbitrary number of vertices.

参数
modeThe type of drawing (line/filled).
coordsVertex positions.
countVertex array size.

◆ polyline()

void eve::graphics::Graphics::polyline ( const glm::mat4 *  vertices,
size_t  count 
)

Draws a series of lines connecting the given vertices.

参数
coordsVertex positions (v1, ..., vn). If v1 == vn the line will be drawn closed.
countNumber of vertices.

◆ pop()

void eve::graphics::Graphics::pop ( )

Pops .

◆ popValidationScope()

virtual void eve::graphics::Graphics::popValidationScope ( )
pure virtual

Pops validation scope.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 render3D() , 以及 renderScene3DToCanvas().

◆ prepareFinalSceneTexture()

Texture * eve::graphics::Graphics::prepareFinalSceneTexture ( Texture *  scene,
Texture *  motion = nullptr 
)

Build the shared linear-HDR AA, DOF, bloom, and exposure result for final ACES. @lifetime Returned texture is Graphics-owned and valid for the current target allocation.

在文件 Graphics.cpp 第 1546 行定义.

引用了 aa, depth, eve::graphics::GBuffer::getDepthTexture(), eve::graphics::GBuffer::getHwDepthTexture(), height, eve::graphics::GBuffer::isValid(), scene, spatial , 以及 width.

◆ prepareSceneColorResolveShader()

Shader * eve::graphics::Graphics::prepareSceneColorResolveShader ( Texture *  scene)
protected

FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha).

在文件 Graphics.cpp 第 209 行定义.

引用了 aa, pipelineAntiAliasing(), renderControl_ , 以及 scene.

◆ present()

virtual void eve::graphics::Graphics::present ( )
pure virtual

◆ print()

void eve::graphics::Graphics::print ( const std::string &  text,
float  x,
float  y,
const Color &  color = Color(1.f, 1.f, 1.f, 1.f),
float  scale = 1.f 
)
virtual

Draw UTF-8 text with the font selected by setFont().

参数
textBorrowed UTF-8 text, retained only for this call.
xLeft edge in the current canvas coordinate space.
yTop edge in the current canvas coordinate space.
colorGlyph tint and opacity.
scaleUniform text scale; 1 uses the decoded font pixel size.
异常
eve::Exceptionif no current font has been selected.
注解
Render-thread only. The call is synchronous and invokes no callbacks.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1889 行定义.

引用了 color, eve::debug::rtDraw(), scale, text, x , 以及 y.

◆ printRGBA()

void eve::graphics::Graphics::printRGBA ( const std::string &  text,
float  x,
float  y,
float  r,
float  g,
float  b,
float  a,
float  scale = 1.f 
)
inline

Script-friendly stateful print overload using RGBA components.

参数
textUTF-8 text to draw.
xLeft edge in the current canvas coordinate space.
yTop edge in the current canvas coordinate space.
rRed color component.
gGreen color component.
bBlue color component.
aAlpha color component.
scaleUniform text scale.
异常
eve::Exceptionif no current font has been selected.
注解
Render-thread only. The call retains no arguments and invokes no callbacks.

Print.

在文件 Graphics.h 第 1693 行定义.

引用了 a, b, g, r, scale, text, x , 以及 y.

◆ push()

void eve::graphics::Graphics::push ( bool  all)

◆ pushValidationScope()

virtual void eve::graphics::Graphics::pushValidationScope ( )
pure virtual

Backend hooks so the platform-independent render3D() can wrap its work in a GPU validation error scope (used on WebGPU to catch early device errors).

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 render3D() , 以及 renderScene3DToCanvas().

◆ queryDisplayOutputSupport()

Result< Graphics::DisplayOutputSupport > eve::graphics::Graphics::queryDisplayOutputSupport ( ) const
virtual

Query which present formats the current surface can offer.

Requires an initialized windowed backend with a live surface. Headless and unsupported backends return only sdr=true.

被 eve::graphics::vulkan::Graphics 重载.

在文件 DisplayOutput.cpp 第 34 行定义.

引用了 eve::Result< T >::success().

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ rayTracingCaps()

virtual RayTracingCaps eve::graphics::Graphics::rayTracingCaps ( ) const
inlinevirtual

Probed ray-tracing capabilities (empty when unsupported).

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 265 行定义.

◆ readDecalLayerToImageData()

virtual image::ImageData * eve::graphics::Graphics::readDecalLayerToImageData ( const std::string &  attachment)
inlinevirtual

Read back a DecalLayer attachment ("albedo" | "normal" | "params") to CPU. Renders the pending G-buffer + decal passes in one immediate submit first, so it also works headless (no swapchain). Nullptr when unsupported or no resources.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1091 行定义.

◆ readGBufferToImageData()

virtual image::ImageData * eve::graphics::Graphics::readGBufferToImageData ( const std::string &  attachment)
inlinevirtual

Read a G-buffer attachment back to CPU as RGBA8. name is one of "depth" (RGBA8 linear depth), "normal" (world normal*0.5+0.5), "albedo". Valid only after a G-buffer or entity-ID offscreen pass filled it. Caller owns the returned ImageData*. Returns nullptr when unsupported.

被 eve::graphics::webgpu::Graphics , 以及 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1081 行定义.

◆ rectangle() [1/3]

void eve::graphics::Graphics::rectangle ( std::string  mode,
float  x,
float  y,
float  w,
float  h 
)

Draws a rectangle.

参数
xPosition along x-axis for top-left corner.
yPosition along y-axis for top-left corner.
wThe width of the rectangle.
hThe height of the rectangle.

◆ rectangle() [2/3]

void eve::graphics::Graphics::rectangle ( std::string  mode,
float  x,
float  y,
float  w,
float  h,
float  rx,
float  ry 
)

Rectangle.

◆ rectangle() [3/3]

void eve::graphics::Graphics::rectangle ( std::string  mode,
float  x,
float  y,
float  w,
float  h,
float  rx,
float  ry,
int  points 
)

Variant of rectangle that draws a rounded rectangle.

参数
modeThe mode of drawing (line/filled).
xX-coordinate of top-left corner
yY-coordinate of top-left corner
wThe width of the rectangle.
hThe height of the rectangle.
rxThe radius of the corners on the x axis
ryThe radius of the corners on the y axis
pointsThe number of points to use per corner

◆ releaseGpuParticleEmitter()

virtual void eve::graphics::Graphics::releaseGpuParticleEmitter ( GpuParticleHandle  handle)
inlinevirtual

Release a GPU particle emitter. Explicit release may wait for in-flight frames.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 330 行定义.

引用了 handle.

◆ releaseMesh()

virtual bool eve::graphics::Graphics::releaseMesh ( Mesh *  mesh)
inlinevirtual

Eagerly releases a mesh created by this Graphics.

Mirrors releaseTexture: the returned handle is borrowed, a successful release frees the GPU buffers, detaches the handle (gpuHandle becomes null) and transfers the CPU facade to the caller for deletion.

参数
meshHandle returned by a previous create call (may be null).
返回
true when released; false for null, foreign or already-released handles.

实现了 eve::graphics::IResourceFactory.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 927 行定义.

引用了 mesh.

被这些函数引用 eve::asset_graphics::VegetationAsset::createGpuFieldMesh(), eve::asset_graphics::VegetationAsset::createMesh(), eve::graphics::GraphicsArtifactProvider::prepare(), eve::hexmap::HexMapModule::rebuildChunk(), eve::hexmap::HexMapModule::rebuildSphere(), eve::hexmap::HexMapModule::releaseMeshes() , 以及 eve::fluids::VolumeFluidShadowCaster::~VolumeFluidShadowCaster().

◆ releaseShader()

virtual bool eve::graphics::Graphics::releaseShader ( Shader *  shader)
inlinevirtual

Eagerly releases a shader created by this Graphics.

Mirrors releaseTexture: the returned handle is borrowed, a successful release destroys the GPU pipelines, detaches the handle (gpuHandle becomes null) and transfers the CPU facade to the caller for deletion. Only call this on shaders you created yourself; shaders owned by Graphics pipeline objects (AA / AO / GI / grass / ...) are still reachable through their owning objects and must not be released.

参数
shaderHandle returned by a previous create call (may be null).
返回
true when released; false for null, foreign or already-released handles.

实现了 eve::graphics::IResourceFactory.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1908 行定义.

引用了 shader.

◆ releaseTexture()

virtual bool eve::graphics::Graphics::releaseTexture ( Texture *  texture)
inlinevirtual

Eagerly releases a texture created by this Graphics.

All newTexture* / newCubemap results are borrowed handles: the Graphics backend owns both the CPU facade and the GPU resource, and the handle must not be deleted directly. A successful release frees the GPU resource (after in-flight frames drain), detaches the handle (gpuHandle becomes null) and transfers the CPU facade to the caller, who may then delete it. Renderer-owned fallback textures (white / flat-normal / environment) and resources created by another Graphics are never released here.

参数
textureHandle returned by a previous create call (may be null).
返回
true when released; false for null, foreign, internal or already-released handles.

实现了 eve::graphics::IResourceFactory.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 733 行定义.

◆ reloadTextureFromFile()

virtual bool eve::graphics::Graphics::reloadTextureFromFile ( const std::string &  filename)
pure virtual

Reload a path-cached texture from disk in place (pointer stable). False if unbound.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ render3D()

void eve::graphics::Graphics::render3D ( )
virtual

◆ renderEntityIdMask()

virtual image::ImageData * eve::graphics::Graphics::renderEntityIdMask ( const std::vector< EntityIdDraw > &  draws,
const glm::mat4 &  viewProj,
int  w,
int  h 
)
inlinevirtual

Renders entity id mask.

@ownership Result transfers to caller. @lifetime Draw inputs are borrowed only for this call.

在文件 Graphics.h 第 1066 行定义.

引用了 h, viewProj , 以及 w.

◆ renderScene3DToCanvas()

void eve::graphics::Graphics::renderScene3DToCanvas ( Canvas *  canvas,
Camera3D *  camera 
)
virtual

Preview-quality 3D pass into an offscreen Canvas (editor viewport): renders visible Renderable3D with camera into canvas, whose texture can then be shown inside a UI Viewport widget. See RenderSystem3D::renderToCanvas.

实现了 eve::graphics::IGraphics3D.

在文件 Graphics.cpp 第 203 行定义.

引用了 camera, popValidationScope(), pushValidationScope() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ renderSprites()

void eve::graphics::Graphics::renderSprites ( )

Draw all live Sprite2D entities into the current frame without presenting.

在文件 Graphics.cpp 第 1471 行定义.

◆ replaceMeshShaderResources()

Result< void > eve::graphics::Graphics::replaceMeshShaderResources ( Shader &  shader,
const std::vector< uint32_t > &  vertSpv,
const std::vector< uint32_t > &  fragSpv,
const ShaderResourceInputs &  resources 
)
virtual

Replace a mesh program and its immutable set-1 resources atomically.

参数
shaderExisting shader owned by this Graphics; borrowed for this call.
vertSpvVertex words; empty retains the built-in mesh vertex ABI.
fragSpvFragment words using set 0 Frame/albedo and declared set 1 inputs.
resourcesBorrowed image/constant bytes, copied before returning.
返回
Success after publication; failures preserve the old program/resources. @ownership Graphics owns the shader and its resources; releaseShader or Graphics destruction drains in-flight use before releasing them. Inputs are never retained.
注解
Render-thread only, outside submission, not reentrant; invokes no callbacks.
  • Unsupported backends or missing validation providers return Unsupported unchanged.

被 eve::graphics::vulkan::Graphics 重载.

在文件 ShaderResources.cpp 第 10 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::Unsupported.

被这些函数引用 eve::graphics::SkyAtmospherePass::prepare().

◆ replaceShaderFromGlsl()

virtual Result< void > eve::graphics::Graphics::replaceShaderFromGlsl ( Shader &  shader,
const std::string &  vertGlsl,
const std::string &  fragGlsl 
)
pure virtual

Compile GLSL and transactionally replace an existing shader.

参数
shaderStable graphics-owned shader facade to update.
vertGlslVertex source; empty selects the backend default for the shader kind.
fragGlslFragment source; must not be empty.
返回
Structured compile/pipeline result; failure preserves the last-good pipeline.
异常
Nothing.Compiler output is carried by the returned diagnostic.
注解
Main/render-thread only and not reentrant. Runtime GLSL compilation is a Vulkan development capability and may report Unsupported on a platform/backend. @lifetime shader remains owned by this Graphics instance and keeps the same address.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::exposeShaderScriptBindings().

◆ replaceShaderFromSpv()

virtual Result< void > eve::graphics::Graphics::replaceShaderFromSpv ( Shader &  shader,
const std::vector< uint32_t > &  vertSpv,
const std::vector< uint32_t > &  fragSpv 
)
pure virtual

Transactionally replace an existing shader with SPIR-V stages.

参数
shaderStable graphics-owned shader facade to update.
vertSpvVertex stage words; empty selects the backend default for the shader kind.
fragSpvFragment stage words; must contain valid SPIR-V.
返回
Success only after every replacement pipeline has been created and published.
异常
Nothing.Backend and validation failures are returned as structured diagnostics.
注解
Main/render-thread only and not reentrant. On failure the shader, its uniforms, and all renderable/material references remain bound to the last successfully published pipeline. @lifetime shader remains owned by this Graphics instance and keeps the same address.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::exposeShaderScriptBindings().

◆ replaceShaderFromWgsl()

virtual Result< void > eve::graphics::Graphics::replaceShaderFromWgsl ( Shader &  shader,
const std::string &  vertWgsl,
const std::string &  fragWgsl 
)
pure virtual

Transactionally replace an existing shader with WGSL stages.

参数
shaderStable graphics-owned shader facade to update.
vertWgslVertex source; empty selects the backend default for the shader kind.
fragWgslFragment source; must not be empty.
返回
Success only after every replacement pipeline has been created and published.
异常
Nothing.Backend and validation failures are returned as structured diagnostics.
注解
Main/render-thread only and not reentrant. Vulkan reports Unsupported without mutation. @lifetime shader remains owned by this Graphics instance and keeps the same address.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::exposeShaderScriptBindings().

◆ requestFileImageDecode()

void eve::graphics::Graphics::requestFileImageDecode ( const std::string &  key)
protected

◆ requestSurfaceRecreate()

void eve::graphics::Graphics::requestSurfaceRecreate ( )
inlineoverridevirtual

Request recreation of the platform render surface on the next frame (Android background/foreground destroys the native window). Safe to call from a non-render thread; the actual work happens on the render thread.

实现了 eve::IWindowSurfaceHost.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1561 行定义.

◆ reset()

void eve::graphics::Graphics::reset ( )
virtual

Resets the current color, background color, line style, and so forth.

在文件 Graphics.cpp 第 1464 行定义.

◆ resetGpuParticleEmitter()

virtual void eve::graphics::Graphics::resetGpuParticleEmitter ( GpuParticleHandle  handle)
inlinevirtual

Clear resident state before the next submitted frame.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 333 行定义.

引用了 handle.

◆ resourceLifetime()

std::weak_ptr< const void > eve::graphics::Graphics::resourceLifetime ( ) const

Observe this provider's resource lifetime without extending it.

返回
Weak token; expiry invalidates all borrowed resources from this provider. @ownership Graphics alone owns the token. Consumers must never retain a strong lock. @thread Main/render thread only; no concurrent provider destruction or callbacks.

在文件 GraphicsLifetime.cpp 第 27 行定义.

引用了 lifetime , 以及 value.

被这些函数引用 eve::avatar::buildVrmSurface(), eve::graphics::SkyAtmospherePass::prepare() , 以及 eve::daynight::SkyRuntime::prepare().

◆ retireResourceLifetime()

void eve::graphics::Graphics::retireResourceLifetime ( ) const
protected

Retire resource lifetime.

在文件 GraphicsLifetime.cpp 第 38 行定义.

引用了 end , 以及 value.

被这些函数引用 ~Graphics(), eve::graphics::vulkan::Graphics::~Graphics() , 以及 eve::graphics::webgpu::Graphics::~Graphics().

◆ rotate()

void eve::graphics::Graphics::rotate ( float  r)

Rotate.

◆ saveFramePng()

bool eve::graphics::Graphics::saveFramePng ( const std::string &  path)

Save the last presented frame to a PNG at path. Enables screen readback if needed. Returns false if no presented frame is available or encoding fails.

在文件 Graphics.cpp 第 1672 行定义.

引用了 path.

◆ scale()

void eve::graphics::Graphics::scale ( float  x,
float  y = 1.0f 
)

Scale.

◆ setActive()

void eve::graphics::Graphics::setActive ( bool  active)
inlineoverridevirtual

Pause/resume presenting (Android background / foreground).

实现了 eve::IWindowSurfaceHost.

在文件 Graphics.h 第 1546 行定义.

引用了 active.

◆ setBackgroundColor()

void eve::graphics::Graphics::setBackgroundColor ( const Color &  c)
inline

Sets the background color.

在文件 Graphics.h 第 1496 行定义.

引用了 c.

◆ setBackgroundColorRGBA()

void eve::graphics::Graphics::setBackgroundColorRGBA ( float  r,
float  g,
float  b,
float  a = 1.f 
)
virtual

Sets the background color rgba.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1711 行定义.

引用了 a, b, g , 以及 r.

被这些函数引用 eve::daynight::DayNight::update() , 以及 eve::weather::Weather::update().

◆ setCanvas() [1/2]

void eve::graphics::Graphics::setCanvas ( )
inline

Sets the canvas.

在文件 Graphics.h 第 1992 行定义.

引用了 setCanvas().

被这些函数引用 setCanvas().

◆ setCanvas() [2/2]

virtual void eve::graphics::Graphics::setCanvas ( Canvas *  canvas)
pure virtual

nullptr or this → screen. Switching flushes pending draws to the previous target.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::stylize::StyleChain::apply(), eve::stylize_editing::StylizeRecipeRuntime::apply(), eve::graphics::Bloom::apply(), eve::graphics::Exposure::apply(), eve::graphics::DepthOfField::apply(), eve::graphics::Volumetric::applyFogTo(), eve::graphics::AmbientOcclusion::applyFromDepthTo(), eve::graphics::GlobalIllumination::applyFromDepthTo(), eve::graphics::GlobalIllumination::applyFromSceneTo(), eve::graphics::Volumetric::applyFromSceneTo(), eve::graphics::ScreenSpaceReflection::applyFromSceneTo(), eve::graphics::Volumetric::applyFroxelTo(), eve::graphics::AmbientOcclusion::applyOverlayTo(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::AntiAliasing::applyTemporalRect(), eve::graphics::Outline::applyTo(), eve::graphics::AntiAliasing::applyTo(), eve::stylize::StylePass::applyTo(), eve::graphics::AmbientOcclusion::blurTo(), eve::graphics::DepthPyramid::build(), eve::graphics::Bloom::build(), eve::graphics::AmbientOcclusion::computeTo(), eve::graphics::RenderSystem::drawItems(), eve::graphics::Volumetric::rayMarchTo(), eve::graphics::RenderSystem3D::render(), eve::particles::ParticleRenderSystem::render(), eve::graphics::Volumetric::renderCloudsTo(), eve::particles::ParticleRenderSystem::renderEmitter(), eve::graphics::AntiAliasing::resolveTemporal() , 以及 eve::graphics::Volumetric::scatterTo().

◆ setCloudShadows()

virtual void eve::graphics::Graphics::setCloudShadows ( float  strength,
float  worldCell,
float  time,
float  windSpeed,
float  windAngle,
float  coverage,
float  detail 
)
pure virtual

Dynamic cloud shadows cast on the ground by the default PBR mesh path. strength 0 disables (no change to rendering). time advances wind drift. Packed into Mesh3DUBO.cloud / cloudWind and consumed by mesh3d shaders.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setDecalCamera()

virtual void eve::graphics::Graphics::setDecalCamera ( const glm::mat4 &  viewProj,
float  nearZ,
float  farZ 
)
pure virtual

Per-frame camera constants for the decal pass (world-space reconstruction from the G-buffer depth). Call once per pass.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setDirectionalLight()

void eve::graphics::Graphics::setDirectionalLight ( float  dx,
float  dy,
float  dz,
float  r = 1.f,
float  g = 1.f,
float  b = 1.f 
)
virtual

Sets the directional light.

实现了 eve::graphics::IGraphics3D.

在文件 Graphics.cpp 第 248 行定义.

引用了 b, dx, dy, dz, g, r , 以及 eve::graphics::RenderSystem3D::setDirectionalLight().

被这些函数引用 eve::daynight::DayNight::update() , 以及 eve::weather::Weather::update().

◆ setDisplayHdrCalibration()

Result< void > eve::graphics::Graphics::setDisplayHdrCalibration ( float  paperWhiteNits,
float  peakNits 
)
virtual

Set paper-white and peak luminance used by HDR present encoding.

参数
paperWhiteNitsDisplay-referred luminance of UI/SDR white (80-400).
peakNitsMaximum highlight luminance (max(paperWhite,200)-10000).
返回
Success or InvalidArgument; values are clamped into range.

被 eve::graphics::vulkan::Graphics 重载.

在文件 DisplayOutput.cpp 第 23 行定义.

引用了 eve::graphics::display::clampCalibration(), displayPaperWhiteNits_, displayPeakNits_, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ setDisplayOutputMode()

Result< void > eve::graphics::Graphics::setDisplayOutputMode ( DisplayOutputMode  mode)
virtual

Request a present color space on the graphics/render thread.

Stores the preference and dirties the swapchain. Auto selects HDR10, then scRGB, then SDR. Strict Hdr10/ScRgb still soft-fall back to SDR when the surface cannot offer that pair; inspect getActiveDisplayColorSpace() / isDisplayHdrActive() after present rebuild. WebGPU currently accepts only Sdr/Auto (always SDR).

返回
Success, InvalidArgument, or Unsupported without partial mutation.

被 eve::graphics::vulkan::Graphics 重载.

在文件 DisplayOutput.cpp 第 8 行定义.

引用了 activeDisplayColorSpace_, Auto, displayOutputMode_, eve::Diagnostic::error(), eve::Result< T >::failure(), Hdr10, eve::InvalidArgument, ScRgb, Sdr, eve::Result< T >::success() , 以及 eve::Unsupported.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ setFinalSceneTexture()

void eve::graphics::Graphics::setFinalSceneTexture ( Texture *  texture)
inline

Override the HDR source consumed by the next backend scene resolve.

在文件 Graphics.h 第 2070 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setFont()

virtual void eve::graphics::Graphics::setFont ( Font *  font)
inlinevirtual

Optional shared font used by legacy consumers; nullptr = none set.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.h 第 1627 行定义.

◆ setLighting2D()

virtual void eve::graphics::Graphics::setLighting2D ( const Lighting2DUBO &  ubo)
pure virtual

Upload per-frame / per-canvas 2D lighting constants for subsequent lit draws.

实现了 eve::graphics::IGraphics2D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem::drawItems().

◆ setMesh3DCameraPos()

virtual void eve::graphics::Graphics::setMesh3DCameraPos ( const glm::vec3 &  eye)
pure virtual

Camera eye used by mesh shaders that need view/rim (stored in Mesh3DUBO).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DClip()

virtual void eve::graphics::Graphics::setMesh3DClip ( float  nearZ,
float  farZ 
)
pure virtual

Near/far used to pack linear depth into scene color A (SSGI).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DClusteredActive()

virtual void eve::graphics::Graphics::setMesh3DClusteredActive ( bool  active)
pure virtual

Cheap per-draw toggle for the already-uploaded clustered light table. Unlike setMesh3DClusteredLighting it never re-uploads SSBO data, so the per-frame clustered build happens exactly once per camera.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DClusteredLighting()

virtual void eve::graphics::Graphics::setMesh3DClusteredLighting ( const ClusteredLightingUpload &  upload)
pure virtual

Enable clustered forward path for subsequent default mesh draws (SSBO light lists). Pass upload.active=false (or empty) to disable and return to the ≤8 UBO path.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DEnv()

virtual void eve::graphics::Graphics::setMesh3DEnv ( Texture *  cube,
float  intensity 
)
pure virtual

Specular IBL environment for subsequent default mesh draws. cube must be from newCubemap (or nullptr → black / intensity 0). intensity is packed into Mesh3DUBO lightColor.w.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render(), eve::graphics::RenderSystem3D::renderToCanvas() , 以及 eve::daynight::DayNight::update().

◆ setMesh3DEnvProbe()

virtual void eve::graphics::Graphics::setMesh3DEnvProbe ( const glm::vec3 &  center,
const glm::vec3 &  extent 
)
pure virtual

Box projection bounds for the active environment; zero extent disables it.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DHeightTexture()

virtual void eve::graphics::Graphics::setMesh3DHeightTexture ( Texture *  height)
pure virtual

◆ setMesh3DLight()

virtual void eve::graphics::Graphics::setMesh3DLight ( const glm::vec3 &  dir,
const glm::vec3 &  color 
)
pure virtual

Directional light for subsequent drawMesh calls (world-space direction toward surface).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setMesh3DLighting()

virtual void eve::graphics::Graphics::setMesh3DLighting ( const Lighting3DPack &  pack)
pure virtual

◆ setMesh3DLodDither()

virtual void eve::graphics::Graphics::setMesh3DLodDither ( float  weight,
bool  reverse,
bool  enabled 
)
pure virtual

Set opaque LOD dither coverage for the next default mesh draw. Render-thread only.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setMesh3DMaterial()

virtual void eve::graphics::Graphics::setMesh3DMaterial ( float  metallic,
float  roughness 
)
pure virtual

◆ setMesh3DNormalTexture()

virtual void eve::graphics::Graphics::setMesh3DNormalTexture ( Texture *  normal)
pure virtual

◆ setMesh3DPackedNormalMask()

virtual void eve::graphics::Graphics::setMesh3DPackedNormalMask ( bool  enabled)
pure virtual

Interpret normal texture RG as tangent XY, B as AO and A as smoothness for terrain surfaces.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::Material::bind() , 以及 eve::graphics::RenderSystem3D::render().

◆ setMesh3DParallax()

virtual void eve::graphics::Graphics::setMesh3DParallax ( float  scale,
float  minLayers = 8.f,
float  maxLayers = 32.f 
)
pure virtual

Parallax occlusion mapping for the next default mesh draw. scale: UV displacement strength (0=off). Typical 0.02..0.08. minLayers / maxLayers: adaptive POM ray-march steps (more when glancing).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::Material::bind(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DPbrSurface()

virtual Result< void > eve::graphics::Graphics::setMesh3DPbrSurface ( const PbrSurface *  surface)
inlinevirtual

Copy a validated extended surface for subsequent draws; null resets to legacy shading.

参数
surfaceBorrowed snapshot, consumed synchronously on the graphics thread.
返回
Unsupported when a backend has no extended renderer; reset always succeeds. No pointer to the snapshot is retained; its borrowed textures must outlive queued draws.

Failure.

重载 eve::graphics::IGraphics3D .

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1192 行定义.

被这些函数引用 eve::graphics::Material::bind(), eve::asset_graphics::EvpackStaticPrefab::draw() , 以及 eve::graphics::RenderSystem3D::render().

◆ setMesh3DReflectionProbes()

virtual void eve::graphics::Graphics::setMesh3DReflectionProbes ( const ReflectionProbeUpload &  upload)
pure virtual

Upload the two dominant local reflection probes for subsequent mesh draws.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DSceneColor()

virtual void eve::graphics::Graphics::setMesh3DSceneColor ( Texture *  color)
pure virtual

Optional completed scene-color snapshot for custom mesh shaders.

Bound at mesh3d shader binding 18 (WebGPU sampler binding 19). The texture is borrowed and must not be the color attachment currently being written by the active render pass. nullptr automatically samples the most recently completed scene-color slot, or a neutral placeholder when no scene history exists yet.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setMesh3DSceneDepth()

virtual void eve::graphics::Graphics::setMesh3DSceneDepth ( Texture *  depth)
pure virtual

Optional scene hardware depth (G-buffer hwDepth, Vulkan NDC z) bound to mesh3d shader binding 7. X-ray mesh shaders sample it to discard visible (non-occluded) fragments. nullptr falls back to a placeholder.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setMesh3DShadowReceive()

virtual void eve::graphics::Graphics::setMesh3DShadowReceive ( bool  receive)
pure virtual

◆ setMesh3DShadows()

virtual void eve::graphics::Graphics::setMesh3DShadows ( const ShadowUpload &  upload)
pure virtual

Upload CSM constants for subsequent default mesh draws (active=false disables).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DSkinInfluenceLimit()

virtual void eve::graphics::Graphics::setMesh3DSkinInfluenceLimit ( SkinInfluenceLimit  count)
pure virtual

Limit GPU skinning to the strongest one, two or four vertex influences.

参数
countInfluence count; Auto and Bone4 resolve to Four before this call. @thread Render-thread state consumed by subsequent mesh draws.

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setMesh3DSSAO()

virtual void eve::graphics::Graphics::setMesh3DSSAO ( float  intensity)
pure virtual

Sets the screen-space ambient-occlusion strength applied in the forward mesh pass. 0 disables SSAO (default).

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setMesh3DSurface()

virtual void eve::graphics::Graphics::setMesh3DSurface ( SurfaceMode  mode,
BlendMode  blend,
bool  depthWrite,
bool  doubleSided,
float  alphaCutoff,
const std::string &  alphaTechnique = "cutoff" 
)
pure virtual

◆ setMesh3DTexCellBomb()

virtual void eve::graphics::Graphics::setMesh3DTexCellBomb ( float  cellScale,
float  strength,
float  rotAmount = 1.f 
)
pure virtual

Texture cell bombing for the next default mesh draw (breaks tiling). cellScale: cells per UV unit (typical 2..16). strength: 0=off, 1=full. rotAmount: 0..1 per-cell rotation scale (default 1).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::Material::bind(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DView()

virtual void eve::graphics::Graphics::setMesh3DView ( const glm::mat4 &  view)
pure virtual

Camera view matrix for subsequent drawMesh (view-space depth / CSM select).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DViewProj()

virtual void eve::graphics::Graphics::setMesh3DViewProj ( const glm::mat4 &  viewProj)
pure virtual

Sets the mesh 3 d view proj.

viewProj used by subsequent drawMesh (mvp = viewProj * model). Expect RH + ZO with Vulkan NDC Y (see perspectiveVulkanRH_ZO).

实现了 eve::graphics::IGraphics3D.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setMesh3DVirtualTexture()

virtual void eve::graphics::Graphics::setMesh3DVirtualTexture ( bool  enabled,
int  pageCountX,
int  pageCountY,
int  atlasSlotsX,
int  atlasSlotsY,
float  borderFraction 
)
pure virtual

Configure page-table sampling for the next mesh draw.

When enabled, albedo/normal are physical atlases and height is the RGBA8 page table. Disabled preserves ordinary material sampling. Values are copied immediately.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::Material::bind() , 以及 eve::asset_graphics::EvpackStaticPrefab::draw().

◆ setMeshSkinningData()

virtual bool eve::graphics::Graphics::setMeshSkinningData ( Mesh *  mesh,
const uint16_t *  joints4,
const float *  weights4,
int  vertexCount 
)
inlinevirtual

Upload four joint indices and weights per vertex for built-in GPU skinning.

@compatibility Legacy boolean skinning upload facade.

Sets the mesh skinning data.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 882 行定义.

引用了 mesh , 以及 vertexCount.

被这些函数引用 eve::animation::AnimSkin::bindGpuMesh().

◆ setMsaaSamples()

virtual void eve::graphics::Graphics::setMsaaSamples ( int  samples)
inlinevirtual

Hardware MSAA sample count for the 3D scene color pass (0 disables, then 2/4/8 are used when the device supports them). 0 or 1 mean no MSAA. Takes effect on the next begin3DFrame.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1541 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::setMsaaSamples().

◆ setPresentOverlay()

void eve::graphics::Graphics::setPresentOverlay ( PresentOverlayFn  fn,
void *  userdata 
)
inline

Sets the present overlay.

在文件 Graphics.h 第 1608 行定义.

引用了 fn.

被这些函数引用 eve::ui::ImGuiBackend::newFrame() , 以及 eve::ui::ImGuiBackend::shutdown().

◆ setSceneAutoExposure()

virtual void eve::graphics::Graphics::setSceneAutoExposure ( bool  enabled,
float  minEV,
float  maxEV 
)
pure virtual

Configure log-average scene auto exposure and its EV clamp range.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setSceneBloom()

virtual void eve::graphics::Graphics::setSceneBloom ( float  intensity,
float  threshold 
)
pure virtual

Configure final HDR bloom intensity and linear threshold.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setSceneColorFilter()

virtual void eve::graphics::Graphics::setSceneColorFilter ( const glm::vec3 &  color)
pure virtual

Set a non-negative linear RGB multiplier applied during final HDR exposure.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::applyWaterUnderwaterPostFx().

◆ setSceneDepthOfField()

void eve::graphics::Graphics::setSceneDepthOfField ( float  focusDistance,
float  maxBlurPx,
float  focusRange,
float  nearZ,
float  farZ 
)
pure virtual

Configure final-scene Gaussian depth-of-field.

参数
focusDistanceView-space focus plane.
maxBlurPxMax blur radius in texels; <= 0 disables.
focusRangeDistance from focus where blur reaches the max.
nearZCamera near clip used to linearize hardware depth.
farZCamera far clip used to linearize hardware depth.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

在文件 Graphics.cpp 第 1537 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setSceneExposure()

virtual void eve::graphics::Graphics::setSceneExposure ( float  exposure)
pure virtual

Set linear exposure multiplier used by the final scene tone-map resolve.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().

◆ setSceneLiftGammaGain()

virtual void eve::graphics::Graphics::setSceneLiftGammaGain ( const glm::vec3 &  lift,
const glm::vec3 &  inverseGamma,
const glm::vec3 &  gain 
)
pure virtual

Set pre-tonemap HDR lift, inverse-gamma and gain coefficients.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::applyWaterUnderwaterPostFx().

◆ setScenePhotographicVignette()

Result< void > eve::graphics::Graphics::setScenePhotographicVignette ( float  intensity)
virtual

Set cosine-fourth photographic vignette intensity in [0,1].

Render-thread setting owned by Graphics until destruction; no references or callbacks retained. Applies to final HDR scene presentation before tone mapping, not linear captures. Zero disables it.

返回
Success, InvalidArgument or Unsupported without changing the previous value.

被 eve::graphics::vulkan::Graphics 重载.

在文件 SceneToneMapping.cpp 第 15 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 eve::Unsupported.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ setSceneToneMapping()

Result< void > eve::graphics::Graphics::setSceneToneMapping ( SceneToneMapping  mode)
virtual

Set final scene display mapping on the graphics/render thread.

Graphics owns the value until destruction. No input references or callbacks are retained. This affects scene presentation, not linear HDR offscreen textures. Unsupported backends reject the change and retain their previous mode.

返回
Success, InvalidArgument, or Unsupported without partial mutation.

被 eve::graphics::vulkan::Graphics 重载.

在文件 SceneToneMapping.cpp 第 6 行定义.

引用了 Aces, eve::Diagnostic::error(), eve::Result< T >::failure(), Filmic, getSceneToneMapping(), eve::InvalidArgument, None, eve::Result< T >::success() , 以及 eve::Unsupported.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ setSceneTransitionFx()

virtual void eve::graphics::Graphics::setSceneTransitionFx ( float  vignette,
float  vignetteSmoothness,
float  lensDistortion,
float  lensScale 
)
pure virtual

Set final-composite vignette and radial lens distortion strengths in [0,1].

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::applyWaterUnderwaterPostFx().

◆ setScreenReadbackEnabled()

virtual void eve::graphics::Graphics::setScreenReadbackEnabled ( bool  enabled)
inlinevirtual

When true, each present copies the swapchain to a CPU buffer for getPixel/newImageData. Default false — full-frame readback is expensive; enable only for tests / tools.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 1502 行定义.

引用了 enabled.

被这些函数引用 eve::graphics::vulkan::Graphics::setScreenReadbackEnabled().

◆ setShader() [1/2]

void eve::graphics::Graphics::setShader ( )
virtual

Sets the shader.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1485 行定义.

◆ setShader() [2/2]

void eve::graphics::Graphics::setShader ( Shader *  shader)
virtual

Sets the shader.

实现了 eve::graphics::IGraphics2D.

在文件 Graphics.cpp 第 1483 行定义.

引用了 shader.

◆ setTextureSampler() [1/2]

void eve::graphics::Graphics::setTextureSampler ( Texture *  texture,
const std::string &  filter,
const std::string &  mipmap,
float  maxAnisotropy,
float  lodBias 
)
virtual

Update sampler state without re-uploading pixels (filter / mip / aniso / LOD bias). Script-facing name is setTextureSampler (see Graphics::expose); this string overload keeps the C++ name identical to the script API.

参数
filter"nearest" or "linear" (case-insensitive).
mipmap"none", "nearest" or "linear" (case-insensitive).
异常
eve::Exceptionon an unknown filter/mipmap string.

在文件 Graphics.cpp 第 1864 行定义.

引用了 filter, eve::graphics::Texture::getSampler(), eve::graphics::TextureSampler::min, mipmap , 以及 s.

被这些函数引用 eve::hd2d::Hd2dLook::applyPixelSampler().

◆ setTextureSampler() [2/2]

virtual void eve::graphics::Graphics::setTextureSampler ( Texture *  texture,
const TextureSampler &  sampler 
)
pure virtual

Recreate the sampler for an existing texture (keeps image / mip chain). No-op when texture is null or not owned by this Graphics.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setViewportSize()

virtual void eve::graphics::Graphics::setViewportSize ( int  width,
int  height,
int  pixelwidth,
int  pixelheight 
)
pure virtual

Sets the current graphics display viewport dimensions.

实现了 eve::IWindowSurfaceHost.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

◆ setVSync()

virtual void eve::graphics::Graphics::setVSync ( bool  enabled)
inlinevirtual

Prefer uncapped present (IMMEDIATE/MAILBOX) when false, vsync (MAILBOX/FIFO) when true. Takes effect on the next swapchain recreate.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1528 行定义.

引用了 enabled.

被这些函数引用 eve::graphics::vulkan::Graphics::setVSync() , 以及 eve::graphics::webgpu::Graphics::setVSync().

◆ setVSyncCount()

void eve::graphics::Graphics::setVSyncCount ( int  count)
inlineoverridevirtual

Sets the v sync count.

实现了 eve::IFramePresentation.

在文件 Graphics.h 第 1532 行定义.

引用了 count.

◆ supportsDecal()

virtual bool eve::graphics::Graphics::supportsDecal ( ) const
inlinevirtual

True when the backend can render the screen-space decal layer (box-projected decals writing albedo/normal/params targets that mesh3d.frag samples before lighting). Vulkan uses SPIR-V and WebGPU uses the native WGSL decal pipeline.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 1274 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ supportsDeferredLighting()

virtual bool eve::graphics::Graphics::supportsDeferredLighting ( ) const
inlinevirtual

True when the backend can run Hybrid clustered deferred lighting.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 245 行定义.

被这些函数引用 eve::graphics::RenderControl::isDeferredLightingAvailable().

◆ supportsGBufferPost()

virtual bool eve::graphics::Graphics::supportsGBufferPost ( ) const
inlinevirtual

Whether gbuffer-based post-process shaders (AO, GI) can be created on this backend. Backends may use different shader source languages while preserving the same render-control contract.

被 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 238 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ supportsGpuDriven3D()

virtual bool eve::graphics::Graphics::supportsGpuDriven3D ( ) const
inlinevirtual

True when the backend can run GPU-driven opaque draws.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.h 第 255 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ supportsGpuParticles()

virtual bool eve::graphics::Graphics::supportsGpuParticles ( ) const
inlinevirtual

True when this backend supports resident compute + indirect particle draws.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 318 行定义.

◆ supportsRayTracing()

virtual bool eve::graphics::Graphics::supportsRayTracing ( ) const
inlinevirtual

True when the Vulkan device enabled the KHR ray-tracing path. WebGPU and software devices return false; screen-space reflections remain the portable path.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 262 行定义.

◆ supportsRuntimeGlslCompilation()

virtual bool eve::graphics::Graphics::supportsRuntimeGlslCompilation ( ) const
inlinevirtual

Whether this backend and build can compile GLSL to SPIR-V at runtime.

Vulkan builds answer yes when a compiler is available: the shaderc archive linked on Windows, or an external glslc elsewhere. Backends that only accept prebuilt bytecode (WebGPU) answer no. Callers that can ship prebuilt SPIR-V should gate on this instead of probing the platform.

返回
True when newShader() may be given GLSL source in this build.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 214 行定义.

◆ takeFinalSceneTexture()

Texture * eve::graphics::Graphics::takeFinalSceneTexture ( )
inline

Consume and clear the per-frame HDR scene resolve override. @lifetime Returned texture is borrowed and retains its original owner's lifetime.

在文件 Graphics.h 第 2073 行定义.

◆ transformPoint()

glm::vec2 eve::graphics::Graphics::transformPoint ( glm::vec2  point)

Transform point.

◆ translate()

void eve::graphics::Graphics::translate ( float  x,
float  y 
)

Translate.

◆ updateGpuParticleEmitter()

virtual bool eve::graphics::Graphics::updateGpuParticleEmitter ( GpuParticleHandle  handle,
const GpuParticleUpdate &  update,
const GpuParticleSpawn *  spawns,
std::uint32_t  spawnCount 
)
inlinevirtual

Upload one simulation step and optional spawn commands. @compatibility Preserves the established GPU-particle boolean submission contract.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 337 行定义.

引用了 handle , 以及 spawnCount.

◆ updateMeshVertices()

virtual bool eve::graphics::Graphics::updateMeshVertices ( Mesh *  mesh,
const float *  posXYZ,
const float *  nrmXYZ,
const float *  uvST,
int  vertexCount,
const uint32_t *  indices,
int  indexCount 
)
pure virtual

In-place update of a mesh's vertex/index data (CPU -> host-visible VBO). Mirrors bakeMeshMorph: the update synchronizes with in-flight GPU work, so prefer rebuilding only when content actually changes. The mesh's buffer is reused while it fits (stable GPU handle) and reallocated when the new size grows. Returns false when unsupported by a backend. posXYZ/nrmXYZ follow newMeshFromArrays layout (uvST may be null); indices/indexCount may be null/0 to keep the mesh's existing indices.

@compatibility Legacy boolean mesh update facade.

Updates mesh vertices.

实现了 eve::graphics::IResourceFactory.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::animation::AnimSkin::applyToMesh(), eve::physics::Cloth3D::draw(), eve::physics::SoftBody3DRenderer::draw(), eve::hexmap::HexMapModule::rebuildChunk(), eve::hexmap::HexMapModule::rebuildSphere(), eve::stylize::MeshEffectRenderer::submitTrail(), eve::fluids::VolumeFluidShadowCaster::update(), eve::procgen_graphics_editing::updateHeightmapMesh() , 以及 eve::graphics::updateVegetationMesh().

◆ updateTexture()

virtual bool eve::graphics::Graphics::updateTexture ( Texture *  texture,
int  width,
int  height,
const uint8_t *  rgba 
)
pure virtual

Replace an existing texture's pixels in place (pointer stays stable).

The new size must match the texture's current dimensions (mip chain and sampler are kept); callers that need a different size should create a new texture instead. Returns false when the texture is not owned by this backend or the backend does not support in-place updates. @compatibility Legacy boolean facade; updateTextureRegion is the canonical Result API.

Updates texture.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::fluids::FluidSurfaceRenderer::copyToTexture(), eve::gpuagents::LifeFieldMaterialBinding::updateTexture(), eve::weather::Snow::updateTexture() , 以及 eve::graphics::Volumetric::uploadFroxel().

◆ updateTextureFromImageData()

eve::Result< void > eve::graphics::Graphics::updateTextureFromImageData ( Texture *  texture,
image::ImageData *  data 
)

Upload the current RGBA8 pixels of ImageData into an existing texture in place.

参数
textureBorrowed backend-owned texture; its pointer remains stable on success.
dataBorrowed CPU image; dimensions must match the texture.
返回
Success or a structured failure without changing ownership. @thread Render-thread affine. @reentrancy Does not invoke user callbacks.

在文件 Graphics.cpp 第 1752 行定义.

引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 eve::Unsupported.

◆ updateTextureFromResidentRgba8()

virtual eve::Result< void > eve::graphics::Graphics::updateTextureFromResidentRgba8 ( Texture *  texture,
const GpuResidentBufferView &  source,
int  width,
int  height 
)
inlinevirtual

Copy a same-device resident RGBA8 buffer into an existing texture.

参数
textureBorrowed single-mip texture owned by this Graphics backend.
sourceBorrowed tightly packed RGBA8 buffer slice; its producer must be complete.
widthSource width, which must match the texture.
heightSource height, which must match the texture.
返回
Success after the copy is visible to subsequent draws, or Unsupported when the backend cannot import it. @ownership Neither the texture nor native buffer handle is retained. @lifetime The source buffer must remain alive through this synchronous render-thread call. @thread Render-thread affine; the caller must complete writes to source before calling.

Failure.

被 eve::graphics::vulkan::Graphics 重载.

在文件 Graphics.h 第 643 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), height, source, eve::Unsupported , 以及 width.

被这些函数引用 eve::fluids::FluidSurfaceRenderer::copyToTexture().

◆ updateTextureRegion()

virtual eve::Result< void > eve::graphics::Graphics::updateTextureRegion ( Texture *  texture,
int  x,
int  y,
int  width,
int  height,
std::span< const std::uint8_t >  rgba,
std::size_t  bytesPerRow = 0 
)
pure virtual

Upload one tightly packed or row-strided RGBA8 rectangle into mip level zero.

参数
textureBorrowed texture owned by this Graphics backend.
xDestination pixel offset from the left edge.
yDestination pixel offset from the top edge.
widthRectangle width in pixels.
heightRectangle height in pixels.
rgbaOwning-external bytes borrowed only for this synchronous call.
bytesPerRowSource row stride; zero means width * 4.
返回
Success after the upload is visible to subsequent draws, or a diagnostic. @ownership Graphics retains neither texture nor rgba; it already owns texture storage. @lifetime texture and rgba must remain valid only for this render-thread call.
备注
Textures with mip chains are rejected because partial mip regeneration is undefined.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::vulkan::Graphics::updateTexture().

◆ updateTextureRegions()

virtual eve::Result< void > eve::graphics::Graphics::updateTextureRegions ( Texture *  texture,
std::span< const TextureRegionUpload >  regions 
)
pure virtual

Validate then upload multiple independent mip-zero RGBA8 regions as one batch.

参数
textureBorrowed single-mip texture owned by this Graphics backend.
regionsBorrowed descriptors and source spans, consumed synchronously.
返回
Success after every region is accepted and uploaded, otherwise no upload occurs. @ownership Graphics retains neither the texture nor region/source spans. @lifetime All arguments need remain valid only through this render-thread call.
备注
Vulkan guarantees one staging allocation and queue submission for the batch.

在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::vulkan::Graphics::updateTextureRegion().

◆ uploadDeferredFileTexture()

bool eve::graphics::Graphics::uploadDeferredFileTexture ( Texture *  texture,
image::ImageData *  data 
)
protectedvirtual

Uploads deferred file texture.

被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

在文件 Graphics.cpp 第 1790 行定义.

类成员变量说明

◆ activeDisplayColorSpace_

DisplayColorSpace eve::graphics::Graphics::activeDisplayColorSpace_ = DisplayColorSpace::Sdr
protected

在文件 Graphics.h 第 2254 行定义.

被这些函数引用 getActiveDisplayColorSpace(), isDisplayHdrActive() , 以及 setDisplayOutputMode().

◆ backgroundColor

◆ currentFont

Font* eve::graphics::Graphics::currentFont = nullptr
protected

在文件 Graphics.h 第 2263 行定义.

◆ currentShader

Shader* eve::graphics::Graphics::currentShader = nullptr
protected

◆ deferredFileTextures_

std::vector<DeferredFileTexture> eve::graphics::Graphics::deferredFileTextures_
protected

◆ displayOutputMode_

DisplayOutputMode eve::graphics::Graphics::displayOutputMode_ = DisplayOutputMode::Sdr
protected

◆ displayPaperWhiteNits_

float eve::graphics::Graphics::displayPaperWhiteNits_ = 200.f
protected

◆ displayPeakNits_

float eve::graphics::Graphics::displayPeakNits_ = 1000.f
protected

◆ finalSceneTexture_

Texture* eve::graphics::Graphics::finalSceneTexture_ = nullptr
protected

在文件 Graphics.h 第 2286 行定义.

◆ foliageWindMotionTexture_

Texture* eve::graphics::Graphics::foliageWindMotionTexture_ = nullptr
protected

在文件 Graphics.h 第 2287 行定义.

被这些函数引用 configureFoliageWind().

◆ foliageWindNoiseTexture_

Texture* eve::graphics::Graphics::foliageWindNoiseTexture_ = nullptr
protected

在文件 Graphics.h 第 2288 行定义.

被这些函数引用 configureFoliageWind().

◆ frameHad3D

◆ graphicsActive

bool eve::graphics::Graphics::graphicsActive = true
protected

在文件 Graphics.h 第 2257 行定义.

◆ height

◆ msaaSamples

int eve::graphics::Graphics::msaaSamples = 4
protected

在文件 Graphics.h 第 2258 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::setMsaaSamples().

◆ pipelineAA_

std::unique_ptr<AntiAliasing> eve::graphics::Graphics::pipelineAA_
protected

在文件 Graphics.h 第 2269 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::~Graphics().

◆ pipelineAO_

std::unique_ptr<AmbientOcclusion> eve::graphics::Graphics::pipelineAO_
protected

在文件 Graphics.h 第 2266 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::~Graphics().

◆ pipelineBloom_

std::unique_ptr<Bloom> eve::graphics::Graphics::pipelineBloom_
protected

在文件 Graphics.h 第 2270 行定义.

◆ pipelineDepthPyramid_

std::unique_ptr<DepthPyramid> eve::graphics::Graphics::pipelineDepthPyramid_
protected

在文件 Graphics.h 第 2279 行定义.

◆ pipelineDof_

std::unique_ptr<DepthOfField> eve::graphics::Graphics::pipelineDof_
protected

在文件 Graphics.h 第 2271 行定义.

◆ pipelineExposure_

std::unique_ptr<Exposure> eve::graphics::Graphics::pipelineExposure_
protected

在文件 Graphics.h 第 2272 行定义.

◆ pipelineGI_

std::unique_ptr<GlobalIllumination> eve::graphics::Graphics::pipelineGI_
protected

在文件 Graphics.h 第 2267 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::~Graphics().

◆ pipelineOutline_

std::unique_ptr<Outline> eve::graphics::Graphics::pipelineOutline_
protected

在文件 Graphics.h 第 2289 行定义.

◆ pipelineSSR_

std::unique_ptr<ScreenSpaceReflection> eve::graphics::Graphics::pipelineSSR_
protected

在文件 Graphics.h 第 2268 行定义.

◆ pixelHeight

◆ pixelWidth

◆ presentationVSyncCount_

int eve::graphics::Graphics::presentationVSyncCount_ =1
protected

在文件 Graphics.h 第 2252 行定义.

◆ presentOverlayFn_

PresentOverlayFn eve::graphics::Graphics::presentOverlayFn_ = nullptr
protected

在文件 Graphics.h 第 2259 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::present().

◆ presentOverlayUser_

void* eve::graphics::Graphics::presentOverlayUser_ = nullptr
protected

在文件 Graphics.h 第 2260 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::present().

◆ primitiveScene_

std::shared_ptr<PrimitiveScene> eve::graphics::Graphics::primitiveScene_
protected

在文件 Graphics.h 第 2265 行定义.

被这些函数引用 Graphics().

◆ realizingFileTextures_

bool eve::graphics::Graphics::realizingFileTextures_ = false
protected

在文件 Graphics.h 第 2240 行定义.

被这些函数引用 ensureFileTexturesReady().

◆ recordingEngine3D_

bool eve::graphics::Graphics::recordingEngine3D_ = false
protected

True while RenderSystem3D is submitting (AO / engine overlays).

在文件 Graphics.h 第 2249 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::drawGpuParticleEmitter(), eve::graphics::vulkan::Graphics::drawPrimitiveCanvas() , 以及 render3D().

◆ reflectionComposite_

Canvas* eve::graphics::Graphics::reflectionComposite_ = nullptr
protected

在文件 Graphics.h 第 2283 行定义.

◆ reflectionCompositeHeight_

int eve::graphics::Graphics::reflectionCompositeHeight_ = 0
protected

在文件 Graphics.h 第 2285 行定义.

◆ reflectionCompositeWidth_

int eve::graphics::Graphics::reflectionCompositeWidth_ = 0
protected

在文件 Graphics.h 第 2284 行定义.

◆ renderControl_

◆ sceneDepthOfFieldEnabled_

bool eve::graphics::Graphics::sceneDepthOfFieldEnabled_ = false
protected

在文件 Graphics.h 第 2273 行定义.

◆ sceneDepthOfFieldFarPlane_

float eve::graphics::Graphics::sceneDepthOfFieldFarPlane_ = 100.f
protected

在文件 Graphics.h 第 2278 行定义.

◆ sceneDepthOfFieldFocusDistance_

float eve::graphics::Graphics::sceneDepthOfFieldFocusDistance_ = 10.f
protected

在文件 Graphics.h 第 2274 行定义.

◆ sceneDepthOfFieldFocusRange_

float eve::graphics::Graphics::sceneDepthOfFieldFocusRange_ = 5.f
protected

在文件 Graphics.h 第 2275 行定义.

◆ sceneDepthOfFieldMaximumBlurPixels_

float eve::graphics::Graphics::sceneDepthOfFieldMaximumBlurPixels_ = 8.f
protected

在文件 Graphics.h 第 2276 行定义.

◆ sceneDepthOfFieldNearPlane_

float eve::graphics::Graphics::sceneDepthOfFieldNearPlane_ = 0.1f
protected

在文件 Graphics.h 第 2277 行定义.

◆ screenReadbackEnabled

◆ spatialAAResolve_

Canvas* eve::graphics::Graphics::spatialAAResolve_ = nullptr
protected

在文件 Graphics.h 第 2280 行定义.

◆ spatialAAResolveHeight_

int eve::graphics::Graphics::spatialAAResolveHeight_ = 0
protected

在文件 Graphics.h 第 2282 行定义.

◆ spatialAAResolveWidth_

int eve::graphics::Graphics::spatialAAResolveWidth_ = 0
protected

在文件 Graphics.h 第 2281 行定义.

◆ vsyncEnabled

bool eve::graphics::Graphics::vsyncEnabled = true
protected

在文件 Graphics.h 第 2251 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::setVSync().

◆ width

◆ windowDestroyedCallbacks_

std::vector<std::pair<WindowDestroyedCallback, void *> > eve::graphics::Graphics::windowDestroyedCallbacks_
protected

在文件 Graphics.h 第 2261 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::onNativeWindowDestroyed().


该类的文档由以下文件生成: