#include <Graphics.h>
类 | |
| 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 ¢er, 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. | |
额外继承的成员函数 | |
静态 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
|
strong |
◆ DisplayOutputMode
|
strong |
◆ Mesh3DSceneColorCaptureStatus
|
strong |
Observable result of requesting a same-frame mesh SceneColor snapshot.
| 枚举值 | |
|---|---|
| ExplicitOverride | |
| Scheduled | |
| Captured | |
| HistoryReuse | |
| Unavailable | |
在文件 Graphics.h 第 1168 行定义.
◆ SceneColorDistortionStatus
|
strong |
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
|
strong |
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()
|
override |
在文件 Graphics.cpp 第 177 行定义.
引用了 eve::graphics::detachGraphicsArtifactProvider() , 以及 retireResourceLifetime().
成员函数说明
◆ addWindowDestroyedCallback()
|
inline |
◆ 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.
- 参数
-
drawmode The mode of drawing (line/filled). arcmode The type of arc. x X-coordinate. y Y-coordinate. radius Radius of the arc. angle1 The angle at which the arc begins. angle2 The angle at which the arc terminates. points Number of points to use to draw the arc.
◆ bakeMeshMorph()
|
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()
|
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 内被实现.
◆ begin3DFrameToCanvas()
|
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 内被实现.
◆ beginDecalPass()
|
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 内被实现.
◆ beginFrameReadback()
|
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()
|
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 内被实现.
◆ beginShadowPass()
|
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 内被实现.
◆ canSubmitGpuParticles()
|
inlinevirtual |
True when the current frame topology can accept a GPU particle compute section.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 321 行定义.
◆ 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.
- 参数
-
mode The mode of drawing (line/filled). x X-coordinate. y Y-coordinate. radius Radius of the circle. points Number of points to use to draw the circle.
◆ clearPresentOverlay()
|
inline |
Drop the present overlay callback (window gone; re-register on UI init).
在文件 Graphics.h 第 1584 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::onNativeWindowDestroyed().
◆ 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()
|
inlinevirtual |
Transactionally configure an owned ordinary mesh shader's raster state.
- 参数
-
shader Graphics-owned shader; borrowed synchronously, ownership unchanged. state Value 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()
|
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()
|
inline |
◆ copyHDRCanvasesToCubemap()
|
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.
- 参数
-
sources Array of source canvases, one per destination face. faceCount Number of entries in sources; must be between 1 and 6. cubemap Destination 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()
|
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()
|
inlinevirtual |
Allocate backend-owned resident state for one particle emitter.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 324 行定义.
◆ describeMesh()
|
inlinevirtual |
Describe a live mesh created by this Graphics backend.
- 参数
-
mesh Borrowed 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()
|
virtual |
Draws .
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 1692 行定义.
引用了 eve::graphics::Drawable::draw() , 以及 m.
◆ drawCanvas()
|
inline |
◆ drawCanvasRGBA()
|
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()
|
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.
- 参数
-
blendMode 0 = premultiplied over, 1 = additive (emissive). projectionMode 0 = planar, 1 = local triplanar, 2 = spherical, 3 = world-aligned triplanar. blendSharpness Triplanar normal-weight exponent (ignored when planar). parallaxScale POM depth in normalized decal UV units; zero disables POM. parallaxMinLayers Minimum POM samples at a perpendicular view. parallaxMaxLayers Maximum POM samples at a grazing view. edgeFadeWidth Normalized projection-volume edge feather in [0, 0.49].
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::decal::DecalManager::drawAll().
◆ 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 行定义.
◆ drawGpuParticleEmitter()
|
inlinevirtual |
Queue an indirect draw at the current 2D overlay position.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 347 行定义.
◆ drawMesh()
|
pure virtual |
Draw one mesh with model matrix. Requires begin3DFrame() (or an open swapchain pass).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::fluids::SurfaceFluidSceneRenderer::draw(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::physics::Cloth3D::draw(), eve::physics::GeometryCollectionRenderer::draw() , 以及 eve::physics::SoftBody3DRenderer::draw().
◆ drawMeshGBuffer()
|
pure virtual |
Draws mesh g buffer.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawMeshGBufferAlpha()
|
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 内被实现.
◆ drawMeshShader()
|
pure virtual |
Draw mesh with an explicit Mesh3D Shader (nullptr = default PBR pipeline).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Waterfall::draw(), eve::graphics::GrassField::draw(), eve::graphics::hair::GroomInstance::draw(), eve::graphics::vulkan::Graphics::drawMesh(), eve::graphics::RenderSystem3D::render(), eve::graphics::RenderSystem3D::renderToCanvas(), eve::stylize::MeshEffectRenderer::submitOverlay(), eve::stylize::MeshEffectRenderer::submitParticle() , 以及 eve::stylize::MeshEffectRenderer::submitTrail().
◆ drawMeshShaderInstances()
|
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.
- 参数
-
first First matrix record; visible to the vertex shader as gl_InstanceIndex. count Number 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()
|
pure virtual |
Queue an opaque shadow caster.
- 参数
-
mesh Borrowed for this frame. lightMVP Light transform. doubleSided True 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()
|
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).
- 参数
-
doubleSided True 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()
|
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.
◆ drawOcclusionSolid()
|
virtual |
Draws occlusion solid.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 1700 行定义.
被这些函数引用 eve::graphics::Volumetric::drawOccluders2D(), eve::graphics::Volumetric::drawOccluderSolid() , 以及 eve::graphics::Mesh::drawOcclusion().
◆ drawOcclusionTexture()
|
virtual |
Draws occlusion texture.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 1704 行定义.
被这些函数引用 eve::graphics::Volumetric::drawOccluders2D(), eve::graphics::Volumetric::drawOccluderTexture() , 以及 eve::graphics::Texture::drawOcclusion().
◆ drawScene3D()
|
inline |
◆ drawScene3DRGBA()
|
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()
|
inlinevirtual |
Draws scene color distortion uv rotated.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 796 行定义.
◆ drawSolidRect() [1/2]
|
pure virtual |
Internal immediate-mode helper used by RenderSystem / Batcher.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawSolidRect() [2/2]
|
virtual |
RGBA-float overload matching the script-facing drawSolidRect name.
在文件 Graphics.cpp 第 1728 行定义.
引用了 a, b, g, h, r, w, x , 以及 y.
被这些函数引用 eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::Volumetric::beginOcclusionMapFromSceneLights2D(), eve::physics::Cloth::draw(), eve::physics::ClothGPU::draw(), eve::physics::Fluid2D::draw(), eve::buildingfx::BuildingFx::drawGrid2D(), eve::graphics::RenderSystem::drawItems(), eve::graphics::vulkan::Graphics::drawTexturedRectLitUV(), eve::graphics::vulkan::Graphics::drawTexturedRectShader4(), eve::graphics::vulkan::Graphics::drawTexturedRectShader5(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderDepth(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderDepthMotion(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUV(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUVRotated() , 以及 eve::card::Zone::render().
◆ drawSolidRectRGBA()
|
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()
|
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()
|
virtual |
Draw UTF-8 text with an explicitly supplied GPU font.
- 参数
-
font Borrowed non-null font created by this Graphics instance; it is retained only for this call and must remain valid until the call returns. text Borrowed UTF-8 text, retained only for this call. x Left edge in the current canvas coordinate space. y Top edge in the current canvas coordinate space. color Glyph tint and opacity. scale Uniform text scale; 1uses the decoded font pixel size.
- 异常
-
eve::Exception if fontis 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()
|
inline |
Script-friendly UTF-8 text drawing overload using RGBA components.
- 参数
-
font Borrowed non-null font created by this Graphics instance; valid for the duration of the call. text UTF-8 text to draw. x Left edge in the current canvas coordinate space. y Top edge in the current canvas coordinate space. r Red color component. g Green color component. b Blue color component. a Alpha color component. scale Uniform text scale.
- 异常
-
eve::Exception if fontis nullptr.
- 注解
- Render-thread only. The call retains no arguments and invokes no callbacks.
Draws text.
在文件 Graphics.h 第 1674 行定义.
◆ drawTexturedRect() [1/2]
|
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]
|
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()
|
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 内被实现.
◆ drawTexturedRectLitUVRotated()
|
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 内被实现.
◆ drawTexturedRectRGBA()
◆ drawTexturedRectRotatedRGBA()
◆ drawTexturedRectShader()
|
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()
|
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()
|
pure virtual |
Post draw with five sampled textures at bindings 0 through 4.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawTexturedRectShaderDepth()
|
pure virtual |
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.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Outline::apply(), eve::graphics::DepthOfField::apply(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::Volumetric::applyFroxel(), eve::graphics::MapFog::draw(), eve::graphics::AlphaMask::draw() , 以及 eve::graphics::Volumetric::projectDirectionalCookie().
◆ drawTexturedRectShaderDepthMotion()
|
pure virtual |
Post draw with color, depth/history and motion/reactive textures.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Exposure::apply(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::AntiAliasing::applyTemporalRect() , 以及 eve::graphics::AntiAliasing::resolveTemporal().
◆ drawTexturedRectShaderUV()
|
pure virtual |
UV draw with an explicit Shader (nullptr = default textured pipeline).
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Bloom::apply(), eve::graphics::Exposure::apply(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::AntiAliasing::applyTemporalRect(), eve::graphics::DepthPyramid::build(), eve::graphics::Bloom::build(), eve::graphics::RenderSystem::drawItems(), drawScene3DRGBA(), eve::graphics::vulkan::Graphics::drawTexturedRectShader(), eve::graphics::vulkan::Graphics::drawTexturedRectUV(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::Volumetric::scatterFromSceneLights2D().
◆ drawTexturedRectShaderUVRotated()
|
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 内被实现.
◆ drawTexturedRectUV()
|
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()
|
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 内被实现.
◆ dropDeferredFileTexture()
|
protected |
Drop deferred file texture.
在文件 Graphics.cpp 第 1781 行定义.
引用了 eve::graphics::Texture::clearDeferredFilePixels().
被这些函数引用 eve::graphics::vulkan::Graphics::releaseTexture() , 以及 eve::graphics::webgpu::Graphics::releaseTexture().
◆ 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.
- 参数
-
mode The mode of drawing (line/filled). x X-coordinate of center y Y-coordinate of center a Radius in x-direction b Radius in y-direction points Number of points to use to draw the circle.
◆ end3DFrameToCanvas()
|
pure virtual |
Ends 3 d frame to canvas.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ endDecalPass()
|
pure virtual |
Ends decal pass.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ endGBufferPass()
|
pure virtual |
Ends g buffer pass.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ endShadowPass()
|
pure virtual |
Ends shadow pass.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ 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()
|
protected |
File texture source exists.
在文件 Graphics.cpp 第 1774 行定义.
引用了 info.
被这些函数引用 eve::graphics::vulkan::Graphics::newTextureFromFile() , 以及 eve::graphics::webgpu::Graphics::newTextureFromFile().
◆ filterHDRReflectionCubemap()
|
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()
|
inlinevirtual |
Async readback state: 0=idle, 1=pending, 2=done, 3=failed.
被 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 1522 行定义.
◆ getActiveDisplayColorSpace()
|
virtual |
Color space of the live swapchain after the last rebuild.
在文件 DisplayOutput.cpp 第 42 行定义.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().
◆ getBackendName()
|
pure virtual |
Renderer backend id used by sibling modules (e.g. Gpgpu).
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::AlphaMask::AlphaMask(), eve::avatar::buildVrmSurface(), eve::stylize::createMeshShader(), eve::stylize::createPostShader(), eve::graphics::grass::createShader(), eve::graphics::hair::createShader(), eve::graphics::createTreeWindShader(), eve::graphics::DepthPyramid::DepthPyramid(), eve::weather::Weather::init(), eve::asset_graphics::EvpackShader::load(), eve::graphics::MapFog::MapFog(), eve::graphics::newWaterfallShader(), eve::graphics::newWaterShader() , 以及 eve::graphics::RenderSystem3D::render().
◆ getBackgroundColor()
|
inline |
Returns the background color.
在文件 Graphics.h 第 1494 行定义.
◆ getCanvas()
|
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()
|
inline |
◆ getDisplayOutputMode()
|
virtual |
Return the requested present preference.
在文件 DisplayOutput.cpp 第 39 行定义.
引用了 displayOutputMode_.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().
◆ getDisplayPaperWhiteNits()
|
virtual |
Paper-white luminance in nits for HDR present encoding.
在文件 DisplayOutput.cpp 第 40 行定义.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().
◆ getDisplayPeakNits()
|
virtual |
Peak luminance in nits for HDR present encoding.
在文件 DisplayOutput.cpp 第 41 行定义.
引用了 displayPeakNits_.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().
◆ getFont()
|
inlinevirtual |
Returns the font.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.h 第 1629 行定义.
被这些函数引用 eve::card::printCentered(), eve::card::Zone::render(), eve::card::renderCard(), eve::card::renderCardBack() , 以及 eve::card::Card::renderDeck().
◆ getGpuParticleStats()
|
inlinevirtual |
Return the latest fence-complete counters without waiting on the GPU.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 354 行定义.
引用了 handle.
◆ getHeight()
|
inlinevirtual |
Returns the height.
在文件 Graphics.h 第 504 行定义.
引用了 height.
被这些函数引用 eve::graphics::Outline::apply(), eve::stylize::StylePass::apply(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::ScreenSpaceReflection::applyFromScene(), eve::graphics::Volumetric::applyFroxel(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::Volumetric::beginOcclusionMapFromSceneLights2D(), eve::graphics::RenderSystem::drawItems(), eve::graphics::vulkan::Graphics::drawPrimitiveCanvas(), eve::graphics::webgpu::Graphics::drawPrimitiveCanvas(), eve::graphics::ScreenSpaceReflection::getReflectionCanvas(), eve::graphics::Volumetric::projectDirectionalCookie(), eve::graphics::RenderSystem3D::render(), eve::map::Map::render(), eve::map::TileRenderSystem::render() , 以及 eve::graphics::Volumetric::scatterFromSceneLights2D().
◆ getLastOffscreen3DGpuDurationMs()
|
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()
|
pure virtual |
Device max supported anisotropy (1 if unsupported). Valid after initWithWindow.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getMsaaSamples()
|
inlinevirtual |
Returns the msaa samples.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 1543 行定义.
◆ getPixelHeight()
|
inline |
Returns the pixel height.
在文件 Graphics.h 第 508 行定义.
被这些函数引用 eve::graphics::ScreenSpaceReflection::getReflectionCanvas() , 以及 eve::graphics::RenderSystem3D::render().
◆ getPixelWidth()
|
inline |
Returns the pixel width.
在文件 Graphics.h 第 506 行定义.
被这些函数引用 eve::graphics::ScreenSpaceReflection::getReflectionCanvas() , 以及 eve::graphics::RenderSystem3D::render().
◆ getPresentOverlay()
|
inline |
Returns the present overlay.
在文件 Graphics.h 第 1613 行定义.
◆ getPresentOverlayUser()
|
inline |
Returns the present overlay user.
在文件 Graphics.h 第 1615 行定义.
被这些函数引用 eve::ui::ImGuiBackend::shutdown().
◆ getPrimitiveScene()
|
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()
|
pure virtual |
Whether automatic exposure is active.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneAutoExposureMaxEV()
|
pure virtual |
Maximum automatic exposure EV.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneAutoExposureMinEV()
|
pure virtual |
Minimum automatic exposure EV.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneBloomIntensity()
|
pure virtual |
Current final-scene bloom intensity.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneBloomThreshold()
|
pure virtual |
Current linear HDR bloom threshold.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneColorFilter()
|
pure virtual |
Current linear RGB multiplier applied during final HDR exposure.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::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()
|
pure virtual |
Returns the scene dof far z.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneDofFocusDistance()
|
pure virtual |
Returns the scene dof focus distance.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneDofFocusRange()
|
pure virtual |
Returns the scene dof focus range.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneDofMaxBlur()
|
pure virtual |
Returns the scene dof max blur.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneDofNearZ()
|
pure virtual |
Returns the scene dof near z.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneExposure()
|
pure virtual |
Current linear manual exposure multiplier.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneGain()
|
pure virtual |
Current pre-tonemap gain coefficients.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneInverseGamma()
|
pure virtual |
Current pre-tonemap inverse-gamma coefficients.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneLift()
|
pure virtual |
Current pre-tonemap lift coefficients.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::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()
|
inlinevirtual |
Return photographic vignette intensity; render thread only.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 1387 行定义.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().
◆ getSceneToneMapping()
|
inlinevirtual |
Return the current final display mapping; graphics/render thread only.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 1347 行定义.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings() , 以及 setSceneToneMapping().
◆ getSceneTransitionLensDistortion()
|
pure virtual |
Return the final-composite radial lens-distortion strength.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneTransitionLensScale()
|
pure virtual |
Return the final-composite lens scaling factor.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneTransitionVignette()
|
pure virtual |
Return the final-composite vignette strength.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getSceneTransitionVignetteSmoothness()
|
pure virtual |
Return the final-composite vignette smoothness.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getScreenDPIScale()
|
inline |
Returns the screen dpi scale.
在文件 Graphics.h 第 513 行定义.
◆ getShader()
|
inlinevirtual |
◆ getTransform()
| const glm::mat4 & eve::graphics::Graphics::getTransform | ( | ) | const |
Returns the transform.
◆ getVSyncCount()
|
inlineoverridevirtualnoexcept |
◆ getWidth()
|
inlinevirtual |
Returns the width.
在文件 Graphics.h 第 502 行定义.
引用了 width.
被这些函数引用 eve::graphics::Outline::apply(), eve::stylize::StylePass::apply(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::ScreenSpaceReflection::applyFromScene(), eve::graphics::Volumetric::applyFroxel(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::Volumetric::beginOcclusionMapFromSceneLights2D(), eve::graphics::RenderSystem::drawItems(), eve::graphics::vulkan::Graphics::drawPrimitiveCanvas(), eve::graphics::webgpu::Graphics::drawPrimitiveCanvas(), eve::graphics::ScreenSpaceReflection::getReflectionCanvas(), eve::graphics::Volumetric::projectDirectionalCookie(), eve::graphics::RenderSystem3D::render(), eve::map::Map::render(), eve::map::TileRenderSystem::render() , 以及 eve::graphics::Volumetric::scatterFromSceneLights2D().
◆ gpuDrivenCullBegin()
|
inlinevirtual |
Upload sorted instances + bucket metadata for the cull chain.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 394 行定义.
引用了 instanceCount , 以及 instances.
◆ gpuDrivenCullEmit()
|
inlinevirtual |
Record the cull + emit compute dispatches for the current frame.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 401 行定义.
◆ gpuDrivenCullEnabled()
|
inlinevirtual |
True when the stage-2 GPU cull chain will run this frame.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 388 行定义.
◆ gpuDrivenDrawOpaque()
|
inlinevirtual |
Draw the opaque geometry with GPU-written indirect commands.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 414 行定义.
◆ gpuDrivenEnabled()
|
inlinevirtual |
Whether the GPU-driven opaque path is currently enabled.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 268 行定义.
◆ gpuDrivenMaterialRecord()
|
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()
|
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()
|
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()
|
inlinevirtual |
Open the scene color pass that begin3DFrame deferred (cull path).
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 411 行定义.
◆ gpuDrivenRecordVisPass()
|
inlinevirtual |
Record the GBuffer vis pass (opaque indirect draws write visID/visBary).
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 424 行定义.
◆ gpuDrivenReflectionProbeSlot()
|
inlinevirtual |
Return/register a bindless cubemap slot for a GPU-driven local probe.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 310 行定义.
◆ gpuDrivenReleaseMaterialRecord()
|
inlinevirtual |
Release a lazily-created GPU material-table record.
- 参数
-
material Material 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()
|
inlinevirtual |
Record the fullscreen vis resolve inside the open scene color pass.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 427 行定义.
◆ gpuDrivenResolveWanted()
|
inlinevirtual |
True when the stage-3 vis+resolve path should run this frame.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 421 行定义.
◆ gpuDrivenScenePassPending()
|
inlinevirtual |
Scene pass opening deferred until after the compute cull section.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 391 行定义.
◆ gpuDrivenSetEnabled()
|
inlinevirtual |
Enable/disable the GPU-driven opaque path (no-op when unsupported).
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 271 行定义.
引用了 enabled.
◆ gpuDrivenSubmitOpaque()
|
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()
|
inlinevirtual |
Submit a GPU-authored, bucket-sorted GpuInstance buffer without CPU readback.
- 参数
-
batch Borrowed 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()
|
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.
◆ gpuDrivenVgAttachToMesh()
|
inlinevirtual |
Attach an uploaded VG asset to a mesh (routes it to the VG path).
在文件 Graphics.h 第 446 行定义.
引用了 mesh.
◆ gpuDrivenVgComputeSection()
|
inlinevirtual |
Record the HZB build + cull-params section (VG-only frames).
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 467 行定义.
◆ gpuDrivenVgSetInstance()
|
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.
◆ gpuDrivenVgUpload()
|
inlinevirtual |
Upload a virtual-geometry asset into the shared cluster pool.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 434 行定义.
◆ had3DThisFrame()
|
inline |
◆ initHeadless()
|
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).
- 参数
-
width Logical viewport width in pixels (must be > 0). height Logical viewport height in pixels (must be > 0).
- 异常
-
eve::Exception when the backend does not support headless init, or when graphics is already initialized.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.cpp 第 1477 行定义.
◆ initWithWindow()
|
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::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ inverseTransformPoint()
| glm::vec2 eve::graphics::Graphics::inverseTransformPoint | ( | glm::vec2 | point | ) |
Inverse transform point.
◆ isActive()
|
inline |
◆ isCanvasActive()
|
pure virtual |
True when canvas active.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ isDisplayHdrActive()
|
virtual |
True when the live swapchain is scRGB or HDR10.
在文件 DisplayOutput.cpp 第 45 行定义.
引用了 activeDisplayColorSpace_ , 以及 Sdr.
被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().
◆ isHeadless()
|
inlinevirtual |
True when the renderer was initialized via initHeadless().
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 494 行定义.
◆ isScreenReadbackEnabled()
|
inline |
True when screen readback enabled.
在文件 Graphics.h 第 1504 行定义.
◆ isVSync()
|
inline |
True when v sync.
在文件 Graphics.h 第 1530 行定义.
◆ 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()
|
virtual |
Screen-space ambient occlusion (ssao / hbao / gtao). Caller owns AmbientOcclusion*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 1491 行定义.
◆ newAntiAliasing()
|
virtual |
Classic image-space AA (FXAA / SMAA / SSAA / NFAA). Caller owns AntiAliasing*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 1611 行定义.
◆ newCanvas()
|
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]
|
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]
|
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()
|
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()
|
virtual |
Screen-space single-bounce GI. Caller owns GlobalIllumination*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 1498 行定义.
◆ newGrassField()
|
virtual |
◆ newGrassShader()
|
virtual |
t3ssel8r-style grass billboard shader (alpha test + shadow two-tone). Owned by Graphics. See grass:: / GrassField.
在文件 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 preconfigured for hair cards (transparent, double-sided, hair shader). @ownership Caller owns the Material*; shader is owned by Graphics.
在文件 Graphics.cpp 第 1617 行定义.
引用了 albedo.
◆ newHairCardMesh()
Procedural upright hair/fur card mesh (root at origin, height +Y, face +Z). @ownership Owned by Graphics.
在文件 Graphics.cpp 第 1615 行定义.
◆ newHairShader()
| Shader * eve::graphics::Graphics::newHairShader | ( | ) |
Built-in hair shader with default anisotropic parameters.
在文件 Graphics.cpp 第 1613 行定义.
◆ newHairShaderFromSpv()
|
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()
|
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()
|
pure virtual |
Create an engine-internal linear RGBA16F post-process target.
- 参数
-
width Pixel width. height Pixel 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()
|
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()
◆ newMeshCylinder()
|
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()
|
pure virtual |
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).
@ownership Arrays remain caller-owned; result is Graphics-owned. @lifetime Arrays are call-only; result lives until released.
Creates a mesh from arrays. @ownership Caller deletes unless documented otherwise.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::GrassField::bake(), eve::hd2d::TileMap3D::buildMesh(), eve::graphics::Waterfall::createCurvedSheet(), eve::asset_graphics::VegetationAsset::createGpuFieldMesh(), eve::asset_graphics::VegetationAsset::createMesh(), eve::graphics::Water::createPlane(), eve::graphics::Water::createProceduralMesh(), eve::physics::Cloth3D::draw(), eve::physics::SoftBody3DRenderer::draw(), eve::procgen::Procgen::generateTerrainChunkMesh(), eve::procgen::Procgen::generateTerrainLakeMesh(), eve::procgen::Procgen::generateTerrainRiverMeshAdvanced(), eve::graphics::SkyAtmospherePass::prepare(), eve::graphics::hair::GroomInstance::rebuild(), eve::hexmap::HexMapModule::rebuildChunk(), eve::hexmap::HexMapModule::rebuildSphere(), eve::stylize::MeshEffectRenderer::submitTrail(), eve::fluids::VolumeFluidShadowCaster::update() , 以及 eve::graphics::hair::uploadCardMesh().
◆ newMeshFromArraysColored()
|
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]
|
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]
|
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]
|
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]
|
pure virtual |
Creates a mesh shader. @ownership Caller deletes unless documented otherwise.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newMeshShaderFromSpv()
|
pure virtual |
Create a Mesh3D custom shader (MeshVertex + Frame UBO + albedo). Empty vert → default mesh3d.vert. Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::avatar::buildVrmSurface(), eve::stylize::createEffectMeshShader(), eve::stylize::createMeshShader(), eve::graphics::grass::createShader(), eve::procgen::Procgen::createTerrainMaterialShader(), eve::procgen::Procgen::createTerrainWaterShader(), eve::graphics::createTreeWindShader(), eve::weather::Weather::init(), eve::asset_graphics::EvpackShader::load(), eve::graphics::vulkan::Graphics::newMeshShader(), eve::graphics::newWaterfallShader(), eve::graphics::newWaterShader() , 以及 eve::graphics::SkyAtmospherePass::prepare().
◆ newMeshShaderFromWgsl()
|
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()
|
inline |
Creates a Mesh3D shader from separate vertex and fragment GLSL sources.
- 参数
-
vertGlsl Vertex shader source. fragGlsl Fragment 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()
|
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 内被实现.
◆ newOutline()
|
virtual |
Screen-space model outline (t3ssel8r-style) from GBuffer depth + normal. Caller owns Outline*; its Shader is owned by Graphics.
在文件 Graphics.cpp 第 1493 行定义.
◆ newQuad()
| Quad * eve::graphics::Graphics::newQuad | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
◆ 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()
|
virtual |
Screen-space reflections (ray-marched over scene color + hw depth). Caller owns ScreenSpaceReflection*; its Shader is owned by Graphics.
在文件 Graphics.cpp 第 1500 行定义.
◆ newShader() [1/2]
|
inline |
Creates a shader. @ownership Caller deletes unless documented otherwise.
在文件 Graphics.h 第 1728 行定义.
引用了 newShader().
被这些函数引用 newShader().
◆ newShader() [2/2]
|
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()
|
pure virtual |
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.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::AlphaMask::AlphaMask(), eve::stylize::createEffectPostShader(), eve::stylize::createPostShader(), eve::graphics::DepthPyramid::DepthPyramid(), eve::asset_graphics::EvpackShader::load(), eve::graphics::MapFog::MapFog(), eve::graphics::vulkan::Graphics::newShader() , 以及 eve::graphics::vulkan::Graphics::newShaderFromSpvFile().
◆ newShaderFromSpvFile() [1/2]
|
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]
|
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()
|
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]
|
pure virtual |
Create texture from ImageData (RGBA8 required for now).
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newTexture() [2/4]
|
pure virtual |
Create texture from ImageData with sampler / mipmap options.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newTexture() [3/4]
|
pure virtual |
Creates a texture. @ownership Caller deletes unless documented otherwise.
Create RGBA8 texture from CPU pixels (size = width*height*4). 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 内被实现.
被这些函数引用 eve::decal::Decal::bakePresetTexture(), eve::decal::Decal::bakeSbsprsTexture(), eve::map::Fov::buildMaskTextureSlice(), eve::avatar::buildVrmAtlas(), eve::avatar::buildVrmSurface(), eve::graphics::grass::createSwayAtlas(), eve::graphics::grass::createSwayAtlasFromFiles(), eve::graphics::Font::Font(), eve::procgen::Procgen::generateTextureBorrowed(), eve::weather::Weather::init(), eve::graphics::MapFog::makeCloudTexture(), eve::graphics::AmbientOcclusion::newLinearDepthTexture(), eve::graphics::Volumetric::newLinearDepthTexture(), eve::demo::Demo::newPlanetTexture(), eve::graphics::vulkan::Graphics::newSharedTexture(), eve::graphics::vulkan::Graphics::newTexture(), eve::graphics::vulkan::Graphics::newTexture(), eve::daynight::DayNight::update(), eve::graphics::Volumetric::uploadFroxel(), eve::gpuagents::LifeFieldMaterialBinding::uploadLifeField(), eve::gpuagents::LifeFieldMaterialBinding::uploadSurfaceData() , 以及 eve::weather::Snow::uploadTexture().
◆ newTexture() [4/4]
|
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()
|
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()
|
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 行定义.
◆ newTextureFromImageData() [1/2]
|
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]
|
virtual |
Upload RGBA8 ImageData with mipmaps / filter / anisotropy options.
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 1746 行定义.
引用了 info.
◆ newTextureWithSampler()
|
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 行定义.
◆ newVolumetric()
|
virtual |
Volumetric light + fog (screenspace / raymarch / fog). Caller owns Volumetric*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 1487 行定义.
◆ newWater()
|
virtual |
Dynamic water surface (sky reflection + animated edge waves + middle drop ripples). Caller owns Water*; its Mesh / Shader are owned by Graphics.
在文件 Graphics.cpp 第 1628 行定义.
引用了 eve::Water.
◆ 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.
在文件 Graphics.cpp 第 1627 行定义.
◆ 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::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()
|
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.
在文件 Graphics.cpp 第 1502 行定义.
◆ pipelineAntiAliasing()
|
virtual |
Pipeline anti aliasing.
在文件 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 行定义.
◆ 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()
|
virtual |
Pipeline global illumination.
在文件 Graphics.cpp 第 1507 行定义.
◆ pipelineOutline()
|
virtual |
Pipeline-owned Outline used by RenderSystem3D when the "outline" feature is on.
在文件 Graphics.cpp 第 1606 行定义.
◆ 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 行定义.
◆ pipelineScreenSpaceReflection()
| ScreenSpaceReflection * eve::graphics::Graphics::pipelineScreenSpaceReflection | ( | ) |
Pipeline screen space reflection.
在文件 Graphics.cpp 第 1601 行定义.
◆ 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.
- 参数
-
mode The type of drawing (line/filled). coords Vertex positions. count Vertex array size.
◆ polyline()
| void eve::graphics::Graphics::polyline | ( | const glm::mat4 * | vertices, |
| size_t | count | ||
| ) |
Draws a series of lines connecting the given vertices.
- 参数
-
coords Vertex positions (v1, ..., vn). If v1 == vn the line will be drawn closed. count Number of vertices.
◆ pop()
| void eve::graphics::Graphics::pop | ( | ) |
Pops .
◆ 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()
FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha).
在文件 Graphics.cpp 第 209 行定义.
引用了 aa, pipelineAntiAliasing(), renderControl_ , 以及 scene.
◆ present()
|
pure virtual |
Present.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ print()
|
virtual |
Draw UTF-8 text with the font selected by setFont().
- 参数
-
text Borrowed UTF-8 text, retained only for this call. x Left edge in the current canvas coordinate space. y Top edge in the current canvas coordinate space. color Glyph tint and opacity. scale Uniform text scale; 1uses the decoded font pixel size.
- 异常
-
eve::Exception if no current font has been selected.
- 注解
- Render-thread only. The call is synchronous and invokes no callbacks.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 1889 行定义.
◆ printRGBA()
|
inline |
Script-friendly stateful print overload using RGBA components.
- 参数
-
text UTF-8 text to draw. x Left edge in the current canvas coordinate space. y Top edge in the current canvas coordinate space. r Red color component. g Green color component. b Blue color component. a Alpha color component. scale Uniform text scale.
- 异常
-
eve::Exception if no current font has been selected.
- 注解
- Render-thread only. The call retains no arguments and invokes no callbacks.
Print.
在文件 Graphics.h 第 1693 行定义.
◆ push()
| void eve::graphics::Graphics::push | ( | bool | all | ) |
◆ 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()
|
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()
|
inlinevirtual |
Probed ray-tracing capabilities (empty when unsupported).
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 265 行定义.
◆ readDecalLayerToImageData()
|
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()
|
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.
- 参数
-
x Position along x-axis for top-left corner. y Position along y-axis for top-left corner. w The width of the rectangle. h The 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.
- 参数
-
mode The mode of drawing (line/filled). x X-coordinate of top-left corner y Y-coordinate of top-left corner w The width of the rectangle. h The height of the rectangle. rx The radius of the corners on the x axis ry The radius of the corners on the y axis points The number of points to use per corner
◆ releaseGpuParticleEmitter()
|
inlinevirtual |
Release a GPU particle emitter. Explicit release may wait for in-flight frames.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 330 行定义.
引用了 handle.
◆ releaseMesh()
|
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.
- 参数
-
mesh Handle 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()
|
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.
- 参数
-
shader Handle 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()
|
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.
- 参数
-
texture Handle 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()
|
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()
|
virtual |
Run RenderSystem3D (begin3DFrame + draw visible Renderable3D).
实现了 eve::graphics::IGraphics3D.
在文件 Graphics.cpp 第 193 行定义.
引用了 popValidationScope(), pushValidationScope(), recordingEngine3D_, eve::graphics::RenderSystem3D::render(), eve::debug::rtFrameBegin() , 以及 eve::debug::rtFrameEnd().
◆ renderEntityIdMask()
|
inlinevirtual |
◆ renderScene3DToCanvas()
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()
|
virtual |
Replace a mesh program and its immutable set-1 resources atomically.
- 参数
-
shader Existing shader owned by this Graphics; borrowed for this call. vertSpv Vertex words; empty retains the built-in mesh vertex ABI. fragSpv Fragment words using set 0 Frame/albedo and declared set 1 inputs. resources Borrowed 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.
◆ replaceShaderFromGlsl()
|
pure virtual |
Compile GLSL and transactionally replace an existing shader.
- 参数
-
shader Stable graphics-owned shader facade to update. vertGlsl Vertex source; empty selects the backend default for the shader kind. fragGlsl Fragment 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
shaderremains owned by this Graphics instance and keeps the same address.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ replaceShaderFromSpv()
|
pure virtual |
Transactionally replace an existing shader with SPIR-V stages.
- 参数
-
shader Stable graphics-owned shader facade to update. vertSpv Vertex stage words; empty selects the backend default for the shader kind. fragSpv Fragment 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
shaderremains owned by this Graphics instance and keeps the same address.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ replaceShaderFromWgsl()
|
pure virtual |
Transactionally replace an existing shader with WGSL stages.
- 参数
-
shader Stable graphics-owned shader facade to update. vertWgsl Vertex source; empty selects the backend default for the shader kind. fragWgsl Fragment 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
shaderremains owned by this Graphics instance and keeps the same address.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ requestFileImageDecode()
|
protected |
Request file image decode.
在文件 Graphics.cpp 第 1769 行定义.
引用了 eve::ResourceManager::getInstance(), key, queued , 以及 eve::ResourceManager::request().
被这些函数引用 eve::graphics::vulkan::Graphics::newTextureFromFile() , 以及 eve::graphics::webgpu::Graphics::newTextureFromFile().
◆ 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::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 1561 行定义.
◆ reset()
|
virtual |
Resets the current color, background color, line style, and so forth.
在文件 Graphics.cpp 第 1464 行定义.
◆ resetGpuParticleEmitter()
|
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 行定义.
被这些函数引用 eve::avatar::buildVrmSurface(), eve::graphics::SkyAtmospherePass::prepare() , 以及 eve::daynight::SkyRuntime::prepare().
◆ retireResourceLifetime()
|
protected |
Retire resource lifetime.
在文件 GraphicsLifetime.cpp 第 38 行定义.
被这些函数引用 ~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()
|
inlineoverridevirtual |
◆ setBackgroundColor()
|
inline |
◆ setBackgroundColorRGBA()
|
virtual |
Sets the background color rgba.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 1711 行定义.
被这些函数引用 eve::daynight::DayNight::update() , 以及 eve::weather::Weather::update().
◆ setCanvas() [1/2]
|
inline |
◆ setCanvas() [2/2]
|
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()
|
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()
|
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 内被实现.
◆ setDirectionalLight()
|
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()
|
virtual |
Set paper-white and peak luminance used by HDR present encoding.
- 参数
-
paperWhiteNits Display-referred luminance of UI/SDR white (80-400). peakNits Maximum 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()
|
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()
|
inline |
Override the HDR source consumed by the next backend scene resolve.
在文件 Graphics.h 第 2070 行定义.
◆ setFont()
|
inlinevirtual |
Optional shared font used by legacy consumers; nullptr = none set.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.h 第 1627 行定义.
◆ setLighting2D()
|
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 内被实现.
◆ setMesh3DCameraPos()
|
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()
|
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()
|
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()
|
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()
|
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()
|
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()
|
pure virtual |
Optional height map for parallax (R channel; nullptr = flat / off).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::GrassField::draw(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DLight()
|
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()
|
pure virtual |
Per-frame ambient + up to 8 lights packed into Mesh3DUBO.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DLodDither()
|
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()
|
pure virtual |
Metallic (0..1) and roughness (0..1) for the next default mesh draw.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::fluids::SurfaceFluidSceneRenderer::draw(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DNormalTexture()
|
pure virtual |
Optional normal map for the next drawMesh / drawMeshShader (nullptr = flat).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::GrassField::draw(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DPackedNormalMask()
|
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()
|
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()
|
inlinevirtual |
Copy a validated extended surface for subsequent draws; null resets to legacy shading.
- 参数
-
surface Borrowed 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()
|
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()
|
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()
|
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 内被实现.
◆ setMesh3DShadowReceive()
|
pure virtual |
Per-draw: when false, shadow sampling is forced off for the next mesh draw.
实现了 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().
◆ setMesh3DShadows()
|
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()
|
pure virtual |
Limit GPU skinning to the strongest one, two or four vertex influences.
- 参数
-
count Influence 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 内被实现.
◆ setMesh3DSSAO()
|
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()
|
pure virtual |
Select pipeline state for subsequent mesh draws.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::MeshEffectRenderer::beginBatch(), eve::graphics::Material::bind(), eve::asset_graphics::EvpackStaticPrefab::draw(), eve::graphics::RenderSystem3D::render(), eve::graphics::RenderSystem3D::renderToCanvas(), eve::stylize::MeshEffectRenderer::submitOverlay(), eve::stylize::MeshEffectRenderer::submitParticle() , 以及 eve::stylize::MeshEffectRenderer::submitTrail().
◆ setMesh3DTexCellBomb()
|
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()
|
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()
|
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()
|
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()
|
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.
◆ setMsaaSamples()
|
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 行定义.
◆ setPresentOverlay()
|
inline |
Sets the present overlay.
在文件 Graphics.h 第 1608 行定义.
引用了 fn.
被这些函数引用 eve::ui::ImGuiBackend::newFrame() , 以及 eve::ui::ImGuiBackend::shutdown().
◆ setSceneAutoExposure()
|
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()
|
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()
|
pure virtual |
Set a non-negative linear RGB multiplier applied during final HDR exposure.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setSceneDepthOfField()
|
pure virtual |
Configure final-scene Gaussian depth-of-field.
- 参数
-
focusDistance View-space focus plane. maxBlurPx Max blur radius in texels; <= 0 disables. focusRange Distance from focus where blur reaches the max. nearZ Camera near clip used to linearize hardware depth. farZ Camera 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()
|
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()
|
pure virtual |
Set pre-tonemap HDR lift, inverse-gamma and gain coefficients.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setScenePhotographicVignette()
|
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()
|
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()
|
pure virtual |
Set final-composite vignette and radial lens distortion strengths in [0,1].
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setScreenReadbackEnabled()
|
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]
|
virtual |
◆ setShader() [2/2]
|
virtual |
◆ setTextureSampler() [1/2]
|
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::Exception on an unknown filter/mipmap string.
在文件 Graphics.cpp 第 1864 行定义.
引用了 filter, eve::graphics::Texture::getSampler(), eve::graphics::TextureSampler::min, mipmap , 以及 s.
◆ setTextureSampler() [2/2]
|
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()
|
pure virtual |
Sets the current graphics display viewport dimensions.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setVSync()
|
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()
|
inlineoverridevirtual |
◆ supportsDecal()
|
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 行定义.
◆ supportsDeferredLighting()
|
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()
|
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 行定义.
◆ supportsGpuDriven3D()
|
inlinevirtual |
True when the backend can run GPU-driven opaque draws.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 255 行定义.
◆ supportsGpuParticles()
|
inlinevirtual |
True when this backend supports resident compute + indirect particle draws.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 318 行定义.
◆ supportsRayTracing()
|
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()
|
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()
|
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()
|
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()
|
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()
|
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.
- 参数
-
texture Borrowed backend-owned texture; its pointer remains stable on success. data Borrowed 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()
|
inlinevirtual |
Copy a same-device resident RGBA8 buffer into an existing texture.
- 参数
-
texture Borrowed single-mip texture owned by this Graphics backend. source Borrowed tightly packed RGBA8 buffer slice; its producer must be complete. width Source width, which must match the texture. height Source 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.
◆ updateTextureRegion()
|
pure virtual |
Upload one tightly packed or row-strided RGBA8 rectangle into mip level zero.
- 参数
-
texture Borrowed texture owned by this Graphics backend. x Destination pixel offset from the left edge. y Destination pixel offset from the top edge. width Rectangle width in pixels. height Rectangle height in pixels. rgba Owning-external bytes borrowed only for this synchronous call. bytesPerRow Source row stride; zero means width * 4.
- 返回
- Success after the upload is visible to subsequent draws, or a diagnostic. @ownership Graphics retains neither
texturenorrgba; it already owns texture storage. @lifetimetextureandrgbamust 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 内被实现.
◆ updateTextureRegions()
|
pure virtual |
Validate then upload multiple independent mip-zero RGBA8 regions as one batch.
- 参数
-
texture Borrowed single-mip texture owned by this Graphics backend. regions Borrowed 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()
|
protectedvirtual |
Uploads deferred file texture.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.cpp 第 1790 行定义.
类成员变量说明
◆ activeDisplayColorSpace_
|
protected |
在文件 Graphics.h 第 2254 行定义.
被这些函数引用 getActiveDisplayColorSpace(), isDisplayHdrActive() , 以及 setDisplayOutputMode().
◆ backgroundColor
在文件 Graphics.h 第 2246 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::begin3DFrame(), eve::graphics::vulkan::Graphics::begin3DFrameToCanvas(), eve::graphics::webgpu::Graphics::begin3DFrameToCanvas(), eve::graphics::vulkan::Graphics::clear(), eve::graphics::webgpu::Graphics::clear() , 以及 eve::graphics::webgpu::Graphics::present().
◆ currentFont
|
protected |
在文件 Graphics.h 第 2263 行定义.
◆ currentShader
|
protected |
◆ deferredFileTextures_
|
protected |
◆ displayOutputMode_
|
protected |
在文件 Graphics.h 第 2253 行定义.
被这些函数引用 getDisplayOutputMode(), setDisplayOutputMode() , 以及 eve::graphics::vulkan::Graphics::setDisplayOutputMode().
◆ displayPaperWhiteNits_
|
protected |
◆ displayPeakNits_
|
protected |
在文件 Graphics.h 第 2256 行定义.
被这些函数引用 getDisplayPeakNits(), setDisplayHdrCalibration() , 以及 eve::graphics::vulkan::Graphics::setDisplayHdrCalibration().
◆ finalSceneTexture_
|
protected |
在文件 Graphics.h 第 2286 行定义.
◆ foliageWindMotionTexture_
|
protected |
在文件 Graphics.h 第 2287 行定义.
被这些函数引用 configureFoliageWind().
◆ foliageWindNoiseTexture_
|
protected |
在文件 Graphics.h 第 2288 行定义.
被这些函数引用 configureFoliageWind().
◆ frameHad3D
|
protected |
在文件 Graphics.h 第 2247 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::begin3DFrame(), eve::graphics::webgpu::Graphics::begin3DFrame(), eve::graphics::vulkan::Graphics::begin3DFrameToCanvas(), eve::graphics::vulkan::Graphics::clear(), eve::graphics::webgpu::Graphics::clear(), eve::graphics::webgpu::Graphics::drawMeshShader(), eve::graphics::webgpu::Graphics::drawVoxelFaceInstances(), eve::graphics::webgpu::Graphics::end3DFrameToCanvas(), eve::graphics::webgpu::Graphics::gpuDrivenDrawOpaque(), eve::graphics::webgpu::Graphics::gpuDrivenRecordVisPass(), eve::graphics::webgpu::Graphics::gpuDrivenSubmitOpaque(), eve::graphics::webgpu::Graphics::gpuDrivenSubmitResident(), eve::graphics::webgpu::Graphics::gpuDrivenVgComputeSection() , 以及 eve::graphics::webgpu::Graphics::present().
◆ graphicsActive
|
protected |
在文件 Graphics.h 第 2257 行定义.
◆ height
|
protected |
在文件 Graphics.h 第 2243 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::beginDecalPass(), eve::graphics::webgpu::Graphics::beginGBufferPass(), eve::graphics::vulkan::Graphics::getPixel(), eve::graphics::vulkan::Graphics::initHeadless(), eve::graphics::webgpu::Graphics::initHeadless(), eve::graphics::webgpu::Graphics::newCanvas(), eve::graphics::webgpu::Graphics::newHDRCanvas(), eve::graphics::webgpu::Graphics::newTexture(), eve::graphics::webgpu::Graphics::newTexture(), eve::graphics::vulkan::Graphics::newTexture3DRgba8(), eve::graphics::webgpu::Graphics::newTexture3DRgba8(), eve::graphics::vulkan::Graphics::newTextureArrayRgba16f(), eve::graphics::webgpu::Graphics::newTextureArrayRgba16f(), eve::graphics::vulkan::Graphics::newTextureMipChain(), eve::graphics::webgpu::Graphics::newTextureMipChain(), eve::graphics::webgpu::Graphics::setMesh3DHeightTexture(), eve::graphics::vulkan::Graphics::setViewportSize(), eve::graphics::webgpu::Graphics::setViewportSize(), eve::graphics::vulkan::Graphics::updateTexture(), eve::graphics::webgpu::Graphics::updateTexture(), eve::graphics::vulkan::Graphics::updateTextureFromResidentRgba8(), eve::graphics::vulkan::Graphics::updateTextureRegion() , 以及 eve::graphics::webgpu::Graphics::updateTextureRegion().
◆ msaaSamples
|
protected |
在文件 Graphics.h 第 2258 行定义.
◆ pipelineAA_
|
protected |
在文件 Graphics.h 第 2269 行定义.
◆ pipelineAO_
|
protected |
在文件 Graphics.h 第 2266 行定义.
◆ pipelineBloom_
|
protected |
在文件 Graphics.h 第 2270 行定义.
◆ pipelineDepthPyramid_
|
protected |
在文件 Graphics.h 第 2279 行定义.
◆ pipelineDof_
|
protected |
在文件 Graphics.h 第 2271 行定义.
◆ pipelineExposure_
|
protected |
在文件 Graphics.h 第 2272 行定义.
◆ pipelineGI_
|
protected |
在文件 Graphics.h 第 2267 行定义.
◆ pipelineOutline_
|
protected |
在文件 Graphics.h 第 2289 行定义.
◆ pipelineSSR_
|
protected |
在文件 Graphics.h 第 2268 行定义.
◆ pixelHeight
|
protected |
◆ pixelWidth
|
protected |
◆ presentationVSyncCount_
|
protected |
在文件 Graphics.h 第 2252 行定义.
◆ presentOverlayFn_
|
protected |
在文件 Graphics.h 第 2259 行定义.
◆ presentOverlayUser_
|
protected |
在文件 Graphics.h 第 2260 行定义.
◆ primitiveScene_
|
protected |
在文件 Graphics.h 第 2265 行定义.
被这些函数引用 Graphics().
◆ realizingFileTextures_
|
protected |
在文件 Graphics.h 第 2240 行定义.
被这些函数引用 ensureFileTexturesReady().
◆ recordingEngine3D_
|
protected |
True while RenderSystem3D is submitting (AO / engine overlays).
在文件 Graphics.h 第 2249 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::drawGpuParticleEmitter(), eve::graphics::vulkan::Graphics::drawPrimitiveCanvas() , 以及 render3D().
◆ reflectionComposite_
|
protected |
在文件 Graphics.h 第 2283 行定义.
◆ reflectionCompositeHeight_
|
protected |
在文件 Graphics.h 第 2285 行定义.
◆ reflectionCompositeWidth_
|
protected |
在文件 Graphics.h 第 2284 行定义.
◆ renderControl_
|
protected |
在文件 Graphics.h 第 2264 行定义.
被这些函数引用 getRenderControl(), eve::graphics::vulkan::Graphics::getSceneLinearDepthTexture(), eve::graphics::webgpu::Graphics::getSceneLinearDepthTexture(), eve::graphics::vulkan::Graphics::gpuDrivenResolveWanted(), eve::graphics::webgpu::Graphics::gpuDrivenResolveWanted(), prepareSceneColorResolveShader(), eve::graphics::webgpu::Graphics::present() , 以及 eve::graphics::vulkan::Graphics::~Graphics().
◆ sceneDepthOfFieldEnabled_
|
protected |
在文件 Graphics.h 第 2273 行定义.
◆ sceneDepthOfFieldFarPlane_
|
protected |
在文件 Graphics.h 第 2278 行定义.
◆ sceneDepthOfFieldFocusDistance_
|
protected |
在文件 Graphics.h 第 2274 行定义.
◆ sceneDepthOfFieldFocusRange_
|
protected |
在文件 Graphics.h 第 2275 行定义.
◆ sceneDepthOfFieldMaximumBlurPixels_
|
protected |
在文件 Graphics.h 第 2276 行定义.
◆ sceneDepthOfFieldNearPlane_
|
protected |
在文件 Graphics.h 第 2277 行定义.
◆ screenReadbackEnabled
|
protected |
在文件 Graphics.h 第 2250 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::beginFrameReadback(), eve::graphics::webgpu::Graphics::getPixel(), eve::graphics::webgpu::Graphics::getPixelImpl(), eve::graphics::webgpu::Graphics::newImageData(), eve::graphics::webgpu::Graphics::newImageDataImpl() , 以及 eve::graphics::webgpu::Graphics::present().
◆ spatialAAResolve_
|
protected |
在文件 Graphics.h 第 2280 行定义.
◆ spatialAAResolveHeight_
|
protected |
在文件 Graphics.h 第 2282 行定义.
◆ spatialAAResolveWidth_
|
protected |
在文件 Graphics.h 第 2281 行定义.
◆ vsyncEnabled
|
protected |
在文件 Graphics.h 第 2251 行定义.
◆ width
|
protected |
在文件 Graphics.h 第 2242 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::beginDecalPass(), eve::graphics::webgpu::Graphics::beginGBufferPass(), eve::graphics::vulkan::Graphics::getPixel(), eve::graphics::vulkan::Graphics::initHeadless(), eve::graphics::webgpu::Graphics::initHeadless(), eve::graphics::webgpu::Graphics::newCanvas(), eve::graphics::webgpu::Graphics::newHDRCanvas(), eve::graphics::webgpu::Graphics::newTexture(), eve::graphics::webgpu::Graphics::newTexture(), eve::graphics::vulkan::Graphics::newTexture3DRgba8(), eve::graphics::webgpu::Graphics::newTexture3DRgba8(), eve::graphics::vulkan::Graphics::newTextureArrayRgba16f(), eve::graphics::webgpu::Graphics::newTextureArrayRgba16f(), eve::graphics::vulkan::Graphics::newTextureMipChain(), eve::graphics::webgpu::Graphics::newTextureMipChain(), eve::graphics::vulkan::Graphics::setViewportSize(), eve::graphics::webgpu::Graphics::setViewportSize(), eve::graphics::vulkan::Graphics::updateTexture(), eve::graphics::webgpu::Graphics::updateTexture(), eve::graphics::vulkan::Graphics::updateTextureFromResidentRgba8(), eve::graphics::vulkan::Graphics::updateTextureRegion() , 以及 eve::graphics::webgpu::Graphics::updateTextureRegion().
◆ windowDestroyedCallbacks_
|
protected |
在文件 Graphics.h 第 2261 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::onNativeWindowDestroyed().
该类的文档由以下文件生成:
- src/modules/graphics/Graphics.h
- src/modules/graphics/DisplayOutput.cpp
- src/modules/graphics/Graphics.cpp
- src/modules/graphics/GraphicsFoliage.cpp
- src/modules/graphics/GraphicsLifetime.cpp
- src/modules/graphics/SceneToneMapping.cpp
- src/modules/graphics/ShaderResources.cpp
Public 成员函数 继承自