载入中...
搜索中...
未找到
eve::graphics::webgpu::Graphics类 参考final

EVENGINE_API_BACKENDS public API. 更多...

#include <Graphics.h>

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

类

struct  LitBatch
 
struct  PbrResources
 
struct  SolidBatch
 SolidBatch public API. 更多...
 
struct  TexturedBatch
 

Public 类型

using PresentOverlayFn = eve::graphics::Graphics::PresentOverlayFn
 
- Public 类型 继承自 eve::graphics::Graphics
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 成员函数

 Graphics ()
 Graphics.
 
 ~Graphics () override
 Graphics.
 
std::string getBackendName () const override
 Returns the backend name.
 
bool supportsGBufferPost () const override
 Supports g buffer post.
 
bool supportsDeferredLighting () const override
 Supports deferred lighting.
 
void drawDeferredLighting () override
 Draws deferred lighting.
 
bool supportsGpuDriven3D () const override
 Supports gpu driven 3 d.
 
bool gpuDrivenEnabled () const override
 Gpu driven enabled.
 
void gpuDrivenSetEnabled (bool enabled) override
 Gpu driven set enabled.
 
uint32_t gpuDrivenMeshRecord (Mesh *mesh) override
 Gpu driven mesh record.
 
uint32_t gpuDrivenMaterialRecord (Material *material) override
 Gpu driven material record.
 
bool gpuDrivenMaterialUsable (Material *material) override
 Gpu driven material usable.
 
bool gpuDrivenSubmitOpaque (const GpuInstance *instances, uint32_t instanceCount) override
 Gpu driven submit opaque.
 
GpuResidentSubmitStatus gpuDrivenSubmitResident (const GpuResidentInstanceBatch &batch) override
 Gpu driven submit resident.
 
bool gpuDrivenCullEnabled () const override
 Gpu driven cull enabled.
 
bool gpuDrivenCullBegin (const GpuInstance *instances, uint32_t instanceCount) override
 Gpu driven cull begin.
 
void gpuDrivenCullEmit (const glm::mat4 &viewProj, const glm::vec3 &eye, float fovYDeg, float nearZ, float farZ) override
 Gpu driven cull emit.
 
void gpuDrivenDrawOpaque () override
 Gpu driven draw opaque.
 
bool gpuDrivenResolveWanted () const override
 Gpu driven resolve wanted.
 
void gpuDrivenRecordVisPass () override
 Gpu driven record vis pass.
 
void gpuDrivenResolve () override
 Gpu driven resolve.
 
uint32_t gpuDrivenVgUpload (const GpuVgAssetUpload &asset) override
 Gpu driven vg upload.
 
uint32_t gpuDrivenVgAssetId (Mesh *mesh) const override
 Gpu driven vg asset id.
 
bool gpuDrivenVgAttachToMesh (Mesh *mesh, uint32_t vgAssetId) override
 Gpu driven vg attach to mesh.
 
bool gpuDrivenVgSetInstance (uint32_t vgAssetId, const glm::mat4 &model, uint32_t materialId) override
 Gpu driven vg set instance.
 
void gpuDrivenVgComputeSection (const glm::mat4 &viewProj, const glm::vec3 &eye, float fovYDeg, float nearZ, float farZ) override
 Gpu driven vg compute section.
 
uint32_t debugGpuDrivenVisibleCount () const
 Return the last CPU compatibility-cull result for backend parity tests.
 
uint32_t debugGpuDrivenDispatchCount () const
 Return instances dispatched by the last WebGPU compute cull.
 
uint32_t debugGpuDrivenIndirectDrawCount () const
 Return indexed-indirect commands recorded by the last scene pass.
 
uint32_t debugGpuDrivenGpuVisibleCount ()
 Read back the last GPU-written indirect instance total (native tests).
 
uint32_t debugGpuDrivenHzbMipCount () const
 Return the active hierarchical-depth mip count for conformance tests.
 
uint32_t debugGpuDrivenVgDispatchCount () const
 Return VG clusters dispatched by the last WebGPU compute section.
 
uint32_t debugGpuDrivenVgIndirectDrawCount () const
 Return per-cluster indirect commands recorded by the VG visibility pass.
 
uint32_t debugGpuDrivenVgGpuVisibleCount ()
 Read back the last VG indirect instance total (native tests).
 
Result< void > gpuDrivenReleaseMaterialRecord (Material *material) override
 Gpu driven release material record.
 
Result< void > debugValidatePbrVariantBaseSources ()
 Compile the generated full PBR WGSL stages under a validation scope.
 
Result< void > debugValidatePbrVariantSources (const PbrVariantSources &sources)
 Compile caller-provided PBR WGSL stages under a validation scope.
 
Result< void > debugValidatePbrVariantPipeline (const PbrVariantSources &sources)
 Compile and link a specialized PBR pair through a real Dawn render pipeline.
 
void initHeadless (int width, int height) override
 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).
 
void initWithWindow (void *nativeWindow) override
 Initializes with window.
 
void present () override
 Present.
 
void pushValidationScope () override
 Pushes validation scope.
 
void popValidationScope () override
 Pops validation scope.
 
void setMsaaSamples (int samples) override
 Sets the msaa samples.
 
void requestSurfaceRecreate () override
 Request surface recreate.
 
void setVSync (bool enabled) override
 Sets the v sync.
 
int getMsaaSamples () const override
 Returns the msaa samples.
 
void setViewportSize (int width, int height, int pixelwidth, int pixelheight) override
 Sets the viewport size.
 
void drawSolidRect (float x, float y, float w, float h, const Color &color, BlendMode blend=BlendMode::Alpha) override
 Draws solid rect.
 
void drawPrimitiveCanvas (const PrimitiveCanvas2D &canvas) override
 Draws primitive canvas.
 
void drawSolidRectRotated (float cx, float cy, float w, float h, float degrees, const Color &color, BlendMode blend=BlendMode::Alpha) override
 Draws solid rect rotated.
 
Texture * newTexture (int width, int height, const uint8_t *rgba, bool repeatU=false, bool repeatV=false) override
 Creates a texture. @ownership Caller deletes unless documented otherwise.
 
Texture * newTexture (int width, int height, const uint8_t *rgba, const TextureCreateInfo &info) override
 Creates a texture. @ownership Caller deletes unless documented otherwise.
 
Result< Texture * > newTextureMipChain (uint32_t width, uint32_t height, uint32_t levels, std::span< const uint8_t > rgba) override
 Upload complete explicit linear RGBA8 mips without regenerating pixels.
 
Result< Texture * > newTextureArrayRgba16f (uint32_t width, uint32_t height, uint32_t layers, std::span< const uint16_t > rgbaHalf) override
 Upload a sampled 2D array of tightly packed linear RGBA16F texels.
 
Result< Texture * > newTexture3DRgba8 (uint32_t width, uint32_t height, uint32_t depth, std::span< const uint8_t > rgba) override
 Upload one tightly packed linear RGBA8 3D sampled texture.
 
Texture * newCubemap (int faceSize, const uint8_t *rgbaFaces) override
 Creates a cubemap. @ownership Caller deletes unless documented otherwise.
 
Texture * newCubemap (int faceSize, const uint8_t *rgbaFaces, const TextureCreateInfo &info) override
 Creates a cubemap. @ownership Caller deletes unless documented otherwise.
 
Texture * newHDRCubemap (int faceSize) override
 Creates a hdr cubemap. @ownership Caller deletes unless documented otherwise.
 
bool copyHDRCanvasToCubemapFace (Canvas *source, Texture *cubemap, int face) override
 Copies hdr canvas to cubemap face.
 
bool copyHDRCanvasesToCubemap (Canvas *const *sources, int faceCount, Texture *cubemap) override
 Copies hdr canvases to cubemap.
 
bool filterHDRReflectionCubemap (Texture *cubemap, int sampleCount=64) override
 Filter hdr reflection cubemap.
 
Texture * newTexture (image::ImageData *data) override
 Creates a texture. @ownership Caller deletes unless documented otherwise.
 
Texture * newTexture (image::ImageData *data, const TextureCreateInfo &info) override
 Creates a texture. @ownership Caller deletes unless documented otherwise.
 
ResultRef< Texture > newSharedTexture (image::ImageData *data, const std::string &contentKey) override
 Reuse immutable imported pixels. Graphics owns the returned texture until release or shutdown.
 
void setTextureSampler (Texture *texture, const TextureSampler &sampler) override
 Sets the texture sampler.
 
float getMaxAnisotropy () const override
 Returns the max anisotropy.
 
Texture * newTextureFromFile (const std::string &filename) override
 Creates a texture from file. @ownership Caller deletes unless documented otherwise.
 
bool reloadTextureFromFile (const std::string &filename) override
 Reloads texture from file.
 
bool uploadDeferredFileTexture (Texture *texture, image::ImageData *data) override
 Uploads deferred file texture.
 
bool releaseTexture (Texture *texture) override
 Release texture.
 
bool updateTexture (Texture *texture, int width, int height, const uint8_t *rgba) override
 Updates texture.
 
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) override
 Updates texture region.
 
eve::Result< void > updateTextureRegions (Texture *texture, std::span< const TextureRegionUpload > regions) override
 Updates texture regions.
 
void drawTexturedRect (Texture *texture, float x, float y, float w, float h, const Color &color) override
 Draws textured rect.
 
void drawTexturedRectShader (Texture *texture, Shader *shader, float x, float y, float w, float h, const Color &color) override
 Draws textured rect shader.
 
void drawTexturedRectUV (Texture *texture, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color) override
 Draws textured rect uv.
 
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) override
 Draws textured rect shader uv.
 
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) override
 Draws textured rect shader uv rotated.
 
void drawTexturedRectShaderDepth (Texture *color, Texture *depth, Shader *shader, float x, float y, float w, float h, const Color &tint) override
 Draws textured rect shader depth.
 
void drawTexturedRectShaderDepthMotion (Texture *color, Texture *depth, Texture *motion, Shader *shader, float x, float y, float w, float h, const Color &tint) override
 Draws textured rect shader depth motion.
 
void drawTexturedRectShader4 (Texture *color, Texture *depth, Texture *motion, Texture *extra, Shader *shader, float x, float y, float w, float h, const Color &tint) override
 Draws textured rect shader 4.
 
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) override
 Draws textured rect shader 5.
 
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) override
 Draws textured rect lit uv.
 
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) override
 Draws textured rect lit uv rotated.
 
void setLighting2D (const Lighting2DUBO &ubo) override
 Sets the lighting 2 d.
 
Shader * newShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv) override
 Creates a shader from spv. @ownership Caller deletes unless documented otherwise.
 
Shader * newShaderFromSpvFile (const std::string &vertPath, const std::string &fragPath) override
 Creates a shader from spv file. @ownership Caller deletes unless documented otherwise.
 
Shader * newShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl) override
 Creates a shader from wgsl. @ownership Caller deletes unless documented otherwise.
 
Result< void > replaceShaderFromSpv (Shader &shader, const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv) override
 Replace shader from spv.
 
Result< void > replaceShaderFromWgsl (Shader &shader, const std::string &vertWgsl, const std::string &fragWgsl) override
 Replace shader from wgsl.
 
Result< void > replaceShaderFromGlsl (Shader &shader, const std::string &vertGlsl, const std::string &fragGlsl) override
 Replace shader from glsl.
 
Shader * newShader (const std::string &vertGlsl, const std::string &fragGlsl) override
 Creates a shader. @ownership Caller deletes unless documented otherwise.
 
Shader * newMeshShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv) override
 Creates a mesh shader from spv. @ownership Caller deletes unless documented otherwise.
 
Shader * newMeshShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl) override
 Creates a mesh shader from wgsl. @ownership Caller deletes unless documented otherwise.
 
eve::Result< void > configureMeshShaderSurface (Shader &shader, BlendMode blend, bool depthWrite, bool doubleSided) override
 Configure mesh shader surface.
 
Shader * newMeshShader (const std::string &vertGlsl, const std::string &fragGlsl) override
 Creates a mesh shader. @ownership Caller deletes unless documented otherwise.
 
Shader * newHairShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv) override
 Creates a hair shader from spv. @ownership Caller deletes unless documented otherwise.
 
Shader * newHairShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl) override
 Creates a hair shader from wgsl. @ownership Caller deletes unless documented otherwise.
 
bool releaseShader (Shader *shader) override
 Release shader.
 
Mesh * newMeshFromAssimp (const ::aiMesh &mesh) override
 Creates a mesh from assimp. @ownership Caller deletes unless documented otherwise.
 
Mesh * newMeshFromAssimp (const ::aiMesh &mesh, const aiMatrix4x4 &worldTransform) override
 Creates a mesh from assimp. @ownership Caller deletes unless documented otherwise.
 
Mesh * newMeshFromArrays (const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount) override
 Creates a mesh from arrays. @ownership Caller deletes unless documented otherwise.
 
Mesh * newMeshFromArraysColored (const float *posXYZ, const float *nrmXYZ, const float *uvST, const float *colorRGBA, int vertexCount, const uint32_t *indices, int indexCount) override
 Create a mesh with a packed linear RGBA vertex-color stream.
 
std::optional< eve::graphics::MeshBackendDescriptor > describeMesh (Mesh *mesh) const override
 Return layout facts from the owned WebGPU mesh upload.
 
bool bakeMeshMorph (Mesh *mesh) override
 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.
 
bool updateMeshVertices (Mesh *mesh, const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount) override
 Updates mesh vertices.
 
bool setMeshSkinningData (Mesh *mesh, const uint16_t *joints4, const float *weights4, int vertexCount) override
 Sets the mesh skinning data.
 
Mesh * newMeshSphere (int slices=32, int stacks=16) override
 Creates a mesh sphere. @ownership Caller deletes unless documented otherwise.
 
Mesh * newMeshCylinder (int slices=32, int stacks=1, bool caps=true) override
 Creates a mesh cylinder. @ownership Caller deletes unless documented otherwise.
 
bool releaseMesh (Mesh *mesh) override
 Release mesh.
 
void begin3DFrame () override
 Begins 3 d frame.
 
void begin3DFrameToCanvas (Canvas *canvas) override
 Begins 3 d frame to canvas.
 
void end3DFrameToCanvas () override
 Ends 3 d frame to canvas.
 
void drawPrimitiveScene (const PrimitiveSceneCanvas3D &canvas) override
 Draws primitive scene.
 
float getLastOffscreen3DGpuDurationMs () const override
 Returns the last offscreen 3 d gpu duration ms.
 
void setMesh3DViewProj (const glm::mat4 &viewProj) override
 Sets the mesh 3 d view proj.
 
void setMesh3DView (const glm::mat4 &view) override
 Sets the mesh 3 d view.
 
void setMesh3DClip (float nearZ, float farZ) override
 Sets the mesh 3 d clip.
 
Texture * getSceneColorTexture () override
 Returns the scene color texture.
 
Texture * getSceneLinearDepthTexture () override
 Return the active sampleable scene linear-depth texture when available. @ownership Borrowed from the active render targets; the caller must not delete it. @lifetime Valid until render-target recreation or Graphics destruction.
 
void drawMesh (Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint) override
 Draws mesh.
 
void drawMeshShader (Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint, Shader *shader) override
 Draws mesh shader.
 
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) override
 Draws voxel face instances.
 
void setMesh3DNormalTexture (Texture *normal) override
 Sets the mesh 3 d normal texture.
 
void setMesh3DPackedNormalMask (bool enabled) override
 Sets the mesh 3 d packed normal mask.
 
void setMesh3DHeightTexture (Texture *height) override
 Sets the mesh 3 d height texture.
 
void setMesh3DVirtualTexture (bool enabled, int pageCountX, int pageCountY, int atlasSlotsX, int atlasSlotsY, float borderFraction) override
 Sets the mesh 3 d virtual texture.
 
void setMesh3DSceneDepth (Texture *depth) override
 Sets the mesh 3 d scene depth.
 
void setMesh3DSceneColor (Texture *color) override
 Sets the mesh 3 d scene color.
 
Mesh3DSceneColorCaptureStatus captureMesh3DSceneColor () override
 Capture mesh 3 d scene color.
 
void setMesh3DMaterial (float metallic, float roughness) override
 Sets the mesh 3 d material.
 
Result< void > setMesh3DPbrSurface (const PbrSurface *surface) override
 Sets the mesh 3 d pbr surface.
 
void setMesh3DSurface (SurfaceMode mode, BlendMode blend, bool depthWrite, bool doubleSided, float alphaCutoff, const std::string &alphaTechnique="cutoff") override
 Sets the mesh 3 d surface.
 
void setMesh3DTexCellBomb (float cellScale, float strength, float rotAmount=1.f) override
 Sets the mesh 3 d tex cell bomb.
 
void setMesh3DParallax (float scale, float minLayers=8.f, float maxLayers=32.f) override
 Sets the mesh 3 d parallax.
 
void setMesh3DLodDither (float weight, bool reverse, bool enabled) override
 Sets the mesh 3 d lod dither.
 
void setMesh3DLighting (const Lighting3DPack &pack) override
 Sets the mesh 3 d lighting.
 
void setCloudShadows (float strength, float worldCell, float time, float windSpeed, float windAngle, float coverage, float detail) override
 Sets the cloud shadows.
 
void setMesh3DClusteredLighting (const ClusteredLightingUpload &upload) override
 Sets the mesh 3 d clustered lighting.
 
void setMesh3DClusteredActive (bool active) override
 Sets the mesh 3 d clustered active.
 
void setMesh3DSSAO (float intensity) override
 Sets the mesh 3 dssao.
 
void setMesh3DLight (const glm::vec3 &dir, const glm::vec3 &color) override
 Sets the mesh 3 d light.
 
void setMesh3DCameraPos (const glm::vec3 &eye) override
 Sets the mesh 3 d camera pos.
 
void setMesh3DEnv (Texture *cube, float intensity) override
 Sets the mesh 3 d env.
 
void setMesh3DEnvProbe (const glm::vec3 &center, const glm::vec3 &extent) override
 Sets the mesh 3 d env probe.
 
void setMesh3DReflectionProbes (const ReflectionProbeUpload &upload) override
 Sets the mesh 3 d reflection probes.
 
void setSceneExposure (float exposure) override
 Sets the scene exposure.
 
float getSceneExposure () const override
 Returns the scene exposure.
 
void setSceneColorFilter (const glm::vec3 &color) override
 Sets the scene color filter.
 
glm::vec3 getSceneColorFilter () const override
 Returns the scene color filter.
 
void setSceneLiftGammaGain (const glm::vec3 &lift, const glm::vec3 &inverseGamma, const glm::vec3 &gain) override
 Sets the scene lift gamma gain.
 
glm::vec3 getSceneLift () const override
 Returns the scene lift.
 
glm::vec3 getSceneInverseGamma () const override
 Returns the scene inverse gamma.
 
glm::vec3 getSceneGain () const override
 Returns the scene gain.
 
void setSceneTransitionFx (float vignette, float vignetteSmoothness, float lensDistortion, float lensScale) override
 Sets the scene transition fx.
 
float getSceneTransitionVignette () const override
 Returns the scene transition vignette.
 
float getSceneTransitionVignetteSmoothness () const override
 Returns the scene transition vignette smoothness.
 
float getSceneTransitionLensDistortion () const override
 Returns the scene transition lens distortion.
 
float getSceneTransitionLensScale () const override
 Returns the scene transition lens scale.
 
void setSceneAutoExposure (bool enabled, float minEV, float maxEV) override
 Sets the scene auto exposure.
 
bool getSceneAutoExposure () const override
 Returns the scene auto exposure.
 
float getSceneAutoExposureMinEV () const override
 Returns the scene auto exposure min ev.
 
float getSceneAutoExposureMaxEV () const override
 Returns the scene auto exposure max ev.
 
void setSceneBloom (float intensity, float threshold) override
 Sets the scene bloom.
 
float getSceneBloomIntensity () const override
 Returns the scene bloom intensity.
 
float getSceneBloomThreshold () const override
 Returns the scene bloom threshold.
 
void setSceneDepthOfField (float focusDistance, float maxBlurPx, float focusRange, float nearZ, float farZ) override
 Sets the scene depth of field.
 
float getSceneDofFocusDistance () const override
 Returns the scene dof focus distance.
 
float getSceneDofMaxBlur () const override
 Returns the scene dof max blur.
 
float getSceneDofFocusRange () const override
 Returns the scene dof focus range.
 
float getSceneDofNearZ () const override
 Returns the scene dof near z.
 
float getSceneDofFarZ () const override
 Returns the scene dof far z.
 
void setMesh3DShadows (const ShadowUpload &upload) override
 Sets the mesh 3 d shadows.
 
void setMesh3DShadowReceive (bool receive) override
 Sets the mesh 3 d shadow receive.
 
void setMesh3DSkinInfluenceLimit (SkinInfluenceLimit count) override
 Sets the mesh 3 d skin influence limit.
 
void beginShadowPass (int cascadeIndex) override
 Begins shadow pass.
 
void drawMeshShadow (Mesh *mesh, const glm::mat4 &lightMVP, bool doubleSided=true) override
 Draws mesh shadow.
 
void drawMeshShadowAlpha (Mesh *mesh, const glm::mat4 &lightMVP, Texture *albedo=nullptr, bool doubleSided=true, float lodWeight=1.f, bool lodFadeReverse=false, bool lodDither=false) override
 Draws mesh shadow alpha.
 
void endShadowPass () override
 Ends shadow pass.
 
void beginGBufferPass (int width, int height) override
 Begins g buffer pass.
 
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) override
 Draws mesh g buffer.
 
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) override
 Draws mesh g buffer alpha.
 
void endGBufferPass () override
 Ends g buffer pass.
 
image::ImageData * readGBufferToImageData (const std::string &attachment) override
 Reads g buffer to image data.
 
bool supportsDecal () const override
 Supports decal.
 
void beginDecalPass (int width, int height) override
 Begins decal pass.
 
void setDecalCamera (const glm::mat4 &viewProj, float nearZ, float farZ) override
 Sets the decal camera.
 
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) override
 Draws decal.
 
void endDecalPass () override
 Ends decal pass.
 
image::ImageData * readDecalLayerToImageData (const std::string &attachment) override
 Reads decal layer to image data.
 
Canvas * newCanvas (int width, int height) override
 Creates a canvas. @ownership Caller deletes unless documented otherwise.
 
Canvas * newHDRCanvas (int width, int height) override
 Creates a hdr canvas. @ownership Caller deletes unless documented otherwise.
 
void setCanvas (Canvas *canvas) override
 Sets the canvas.
 
bool isCanvasActive () const override
 True when canvas active.
 
Canvas * getCanvas () const override
 Returns the canvas.
 
Texture * getTexture () override
 Returns the texture.
 
image::ImageData * newImageData () override
 Creates a image data. @ownership Caller deletes unless documented otherwise.
 
bool beginFrameReadback (const std::string &path) override
 Begins frame readback.
 
int frameReadbackStatus () const override
 Frame readback status.
 
void pumpReadback ()
 Advances a pending frame readback; called every present().
 
void draw (eve::graphics::Graphics *gfx, const glm::mat4 &matrix) const override
 Draws .
 
void draw (Canvas *C, const glm::mat4 &matrix) const override
 Draws .
 
void clear (std::optional< Color > color, std::optional< int > stencil, std::optional< double > depth) override
 Clears .
 
Color getPixel (int x, int y) override
 Returns the pixel.
 
void flush2DToCanvas (OffscreenCanvas *canvas)
 Flush accumulated 2D batches into an offscreen canvas target.
 
Color getPixelImpl (OffscreenCanvas *canvas, int x, int y)
 Blocking CPU readback of an offscreen canvas or scene color target.
 
image::ImageData * newImageDataImpl (OffscreenCanvas *canvas)
 Creates a image data impl. @ownership Caller deletes unless documented otherwise.
 
image::ImageData * newHDRImageDataImpl (OffscreenCanvas *canvas)
 Blocking linear RGBA16F readback of an HDR offscreen canvas. @ownership The caller owns the returned image data.
 
wgpu::Instance & getInstance ()
 Returns the instance.
 
wgpu::Device & getDevice ()
 Returns the device.
 
wgpu::Queue & getQueue ()
 Returns the queue.
 
wgpu::Surface & getSurface ()
 Returns the surface.
 
WGPUTextureFormat getSurfaceFormat () const
 Returns the surface format.
 
void * getSdlWindow () const
 Returns the sdl window.
 
bool isReady () const
 True when ready.
 
- Public 成员函数 继承自 eve::graphics::Graphics
 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 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 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 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 gpuDrivenScenePassPending () const
 Scene pass opening deferred until after the compute cull section.
 
virtual void gpuDrivenOpenScenePass ()
 Open the scene color pass that begin3DFrame deferred (cull path).
 
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 bool isHeadless () const
 True when the renderer was initialized via initHeadless().
 
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 eve::Result< void > updateTextureFromResidentRgba8 (Texture *texture, const GpuResidentBufferView &source, int width, int height)
 Copy a same-device resident RGBA8 buffer into an existing texture.
 
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 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.
 
Quad * newQuad (int x, int y, int w, int h)
 Pixel-space atlas rect. Caller owns Quad* (not tracked 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 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).
 
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 image::ImageData * renderEntityIdMask (const std::vector< EntityIdDraw > &draws, const glm::mat4 &viewProj, int w, int h)
 Renders entity id mask.
 
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 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.
 
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.
 
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.
 
void setActive (bool active) override
 Pause/resume presenting (Android background / foreground).
 
bool isActive () const
 True when active.
 
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.
 
Shader * newShaderFromSpvFile (const std::string &fragPath)
 Creates a shader from spv file. @ownership Caller deletes unless documented otherwise.
 
Shader * newShader (const std::string &fragGlsl)
 Creates a shader. @ownership Caller deletes unless documented otherwise.
 
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 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.
 
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.
 
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.
 
void setCanvas ()
 Sets 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 image::ImageData * newHDRImageData ()
 Copy an HDR Canvas as linear RGBA16F without tone mapping.
 
- 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.
 
- Public 成员函数 继承自 eve::graphics::IGraphics3D
virtual ~IGraphics3D ()=default
 Releases IGraphics3D resources.
 
- 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.
 
- 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.
 

友元

class OffscreenCanvas
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::IWindowSurfaceHost
static constexpr const char * capabilityName = "IWindowSurfaceHost"
 
- 静态 Public 属性 继承自 eve::IFramePresentation
static constexpr const char * capabilityName = "eve.frame-presentation"
 
- Protected 成员函数 继承自 eve::graphics::Graphics
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.
 
Shader * prepareSceneColorResolveShader (Texture *scene)
 FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha).
 
void retireResourceLifetime () const
 Retire resource lifetime.
 
- Protected 属性 继承自 eve::graphics::Graphics
std::vector< DeferredFileTexture > deferredFileTextures_
 
bool realizingFileTextures_ = false
 
int width = 0
 
int height = 0
 
int pixelWidth = 0
 
int pixelHeight = 0
 
Color backgroundColor {0.1f, 0.1f, 0.12f, 1.0f}
 
bool frameHad3D = false
 
bool recordingEngine3D_ = false
 True while RenderSystem3D is submitting (AO / engine overlays).
 
bool screenReadbackEnabled = false
 
bool vsyncEnabled = true
 
int presentationVSyncCount_ =1
 
DisplayOutputMode displayOutputMode_ = DisplayOutputMode::Sdr
 
DisplayColorSpace activeDisplayColorSpace_ = DisplayColorSpace::Sdr
 
float displayPaperWhiteNits_ = 200.f
 
float displayPeakNits_ = 1000.f
 
bool graphicsActive = true
 
int msaaSamples = 4
 
PresentOverlayFn presentOverlayFn_ = nullptr
 
void * presentOverlayUser_ = nullptr
 
std::vector< std::pair< WindowDestroyedCallback, void * > > windowDestroyedCallbacks_
 
Shader * currentShader = nullptr
 
Font * currentFont = nullptr
 
std::unique_ptr< RenderControl > renderControl_
 
std::shared_ptr< PrimitiveScene > primitiveScene_
 
std::unique_ptr< AmbientOcclusion > pipelineAO_
 
std::unique_ptr< GlobalIllumination > pipelineGI_
 
std::unique_ptr< ScreenSpaceReflection > pipelineSSR_
 
std::unique_ptr< AntiAliasing > pipelineAA_
 
std::unique_ptr< Bloom > pipelineBloom_
 
std::unique_ptr< DepthOfField > pipelineDof_
 
std::unique_ptr< Exposure > pipelineExposure_
 
bool sceneDepthOfFieldEnabled_ = false
 
float sceneDepthOfFieldFocusDistance_ = 10.f
 
float sceneDepthOfFieldFocusRange_ = 5.f
 
float sceneDepthOfFieldMaximumBlurPixels_ = 8.f
 
float sceneDepthOfFieldNearPlane_ = 0.1f
 
float sceneDepthOfFieldFarPlane_ = 100.f
 
std::unique_ptr< DepthPyramid > pipelineDepthPyramid_
 
Canvas * spatialAAResolve_ = nullptr
 
int spatialAAResolveWidth_ = 0
 
int spatialAAResolveHeight_ = 0
 
Canvas * reflectionComposite_ = nullptr
 
int reflectionCompositeWidth_ = 0
 
int reflectionCompositeHeight_ = 0
 
Texture * finalSceneTexture_ = nullptr
 
Texture * foliageWindMotionTexture_ = nullptr
 
Texture * foliageWindNoiseTexture_ = nullptr
 
std::unique_ptr< Outline > pipelineOutline_
 

详细描述

EVENGINE_API_BACKENDS public API.

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

成员类型定义说明

◆ PresentOverlayFn

构造及析构函数说明

◆ Graphics()

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

Graphics.

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

◆ ~Graphics()

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

成员函数说明

◆ bakeMeshMorph()

bool eve::graphics::webgpu::Graphics::bakeMeshMorph ( Mesh *  mesh)
overridevirtual

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::Graphics.

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

引用了 eve::graphics::webgpu::GpuMesh::cpuVertices, mesh, pos, v , 以及 verts.

◆ begin3DFrame()

void eve::graphics::webgpu::Graphics::begin3DFrame ( )
overridevirtual

Begins 3 d frame.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Graphics::frameHad3D.

被这些函数引用 begin3DFrameToCanvas().

◆ begin3DFrameToCanvas()

void eve::graphics::webgpu::Graphics::begin3DFrameToCanvas ( Canvas *  canvas)
overridevirtual

Begins 3 d frame to canvas.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Graphics::backgroundColor , 以及 begin3DFrame().

◆ beginDecalPass()

void eve::graphics::webgpu::Graphics::beginDecalPass ( int  width,
int  height 
)
overridevirtual

Begins decal pass.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Graphics::height, newTexture() , 以及 eve::graphics::Graphics::width.

◆ beginFrameReadback()

bool eve::graphics::webgpu::Graphics::beginFrameReadback ( const std::string &  path)
overridevirtual

Begins frame readback.

重载 eve::graphics::Graphics .

在文件 GraphicsReadback.cpp 第 332 行定义.

引用了 device, from, h, p, path, eve::graphics::Graphics::screenReadbackEnabled, size, status, eve::graphics::webgpu::sv(), to , 以及 w.

◆ beginGBufferPass()

void eve::graphics::webgpu::Graphics::beginGBufferPass ( int  width,
int  height 
)
overridevirtual

Begins g buffer pass.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Graphics::height , 以及 eve::graphics::Graphics::width.

◆ beginShadowPass()

void eve::graphics::webgpu::Graphics::beginShadowPass ( int  cascadeIndex)
overridevirtual

Begins shadow pass.

实现了 eve::graphics::Graphics.

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

◆ captureMesh3DSceneColor()

Graphics::Mesh3DSceneColorCaptureStatus eve::graphics::webgpu::Graphics::captureMesh3DSceneColor ( )
overridevirtual

◆ clear()

void eve::graphics::webgpu::Graphics::clear ( std::optional< Color >  color,
std::optional< int >  stencil,
std::optional< double >  depth 
)
overridevirtual

◆ configureMeshShaderSurface()

eve::Result< void > eve::graphics::webgpu::Graphics::configureMeshShaderSurface ( Shader &  shader,
BlendMode  blend,
bool  depthWrite,
bool  doubleSided 
)
overridevirtual

◆ copyHDRCanvasesToCubemap()

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

Copies hdr canvases to cubemap.

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::Texture::gpuHandle , 以及 target.

◆ copyHDRCanvasToCubemapFace()

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

Copies hdr canvas to cubemap face.

@compatibility Implements the Graphics boolean submission facade.

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::Texture::gpuHandle, source , 以及 target.

◆ debugGpuDrivenDispatchCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenDispatchCount ( ) const
inline

Return instances dispatched by the last WebGPU compute cull.

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

◆ debugGpuDrivenGpuVisibleCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenGpuVisibleCount ( )

Read back the last GPU-written indirect instance total (native tests).

在文件 GraphicsGpuDriven.cpp 第 991 行定义.

引用了 callback, commands, device, future, instanceCount, label, ok, size, state, status , 以及 visible.

◆ debugGpuDrivenHzbMipCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenHzbMipCount ( ) const
inline

Return the active hierarchical-depth mip count for conformance tests.

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

◆ debugGpuDrivenIndirectDrawCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenIndirectDrawCount ( ) const
inline

Return indexed-indirect commands recorded by the last scene pass.

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

◆ debugGpuDrivenVgDispatchCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenVgDispatchCount ( ) const
inline

Return VG clusters dispatched by the last WebGPU compute section.

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

◆ debugGpuDrivenVgGpuVisibleCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenVgGpuVisibleCount ( )

Read back the last VG indirect instance total (native tests).

在文件 GraphicsVirtualGeometry.cpp 第 517 行定义.

引用了 bytes, callback, device, future, offset, ok, state, status , 以及 visible.

◆ debugGpuDrivenVgIndirectDrawCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenVgIndirectDrawCount ( ) const
inline

Return per-cluster indirect commands recorded by the VG visibility pass.

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

◆ debugGpuDrivenVisibleCount()

uint32_t eve::graphics::webgpu::Graphics::debugGpuDrivenVisibleCount ( ) const
inline

Return the last CPU compatibility-cull result for backend parity tests.

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

◆ debugValidatePbrVariantBaseSources()

Result< void > eve::graphics::webgpu::Graphics::debugValidatePbrVariantBaseSources ( )

Compile the generated full PBR WGSL stages under a validation scope.

在文件 PbrVariantSource.cpp 第 150 行定义.

引用了 debugValidatePbrVariantSources() , 以及 eve::graphics::webgpu::pbrVariantBaseSources().

◆ debugValidatePbrVariantPipeline()

Result< void > eve::graphics::webgpu::Graphics::debugValidatePbrVariantPipeline ( const PbrVariantSources &  sources)

◆ debugValidatePbrVariantSources()

Result< void > eve::graphics::webgpu::Graphics::debugValidatePbrVariantSources ( const PbrVariantSources &  sources)

◆ describeMesh()

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

Return layout facts from the owned WebGPU mesh upload.

重载 eve::graphics::Graphics .

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

引用了 mesh, owned , 以及 eve::graphics::MeshBackendDescriptor::vertexCount.

◆ draw() [1/2]

void eve::graphics::webgpu::Graphics::draw ( Canvas *  C,
const glm::mat4 &  matrix 
) const
overridevirtual

Draws .

实现了 eve::graphics::Canvas.

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

◆ draw() [2/2]

void eve::graphics::webgpu::Graphics::draw ( eve::graphics::Graphics *  gfx,
const glm::mat4 &  matrix 
) const
overridevirtual

Draws .

重载 eve::graphics::Canvas .

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

◆ drawDecal()

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

Draws decal.

实现了 eve::graphics::Graphics.

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

引用了 albedo, draw, model, normal, normalStrength , 以及 params.

◆ drawDeferredLighting()

void eve::graphics::webgpu::Graphics::drawDeferredLighting ( )
overridevirtual

Draws deferred lighting.

重载 eve::graphics::Graphics .

在文件 GraphicsDeferredLighting.cpp 第 120 行定义.

◆ drawMesh()

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

Draws mesh.

实现了 eve::graphics::Graphics.

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

引用了 drawMeshShader(), mesh, model , 以及 tint.

◆ drawMeshGBuffer()

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

Draws mesh g buffer.

实现了 eve::graphics::Graphics.

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

引用了 albedo, d, mesh, metallic, model, mvp , 以及 roughness.

◆ drawMeshGBufferAlpha()

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

Draws mesh g buffer alpha.

实现了 eve::graphics::Graphics.

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

引用了 albedo, d, mesh, metallic, model, mvp , 以及 roughness.

◆ drawMeshShader()

void eve::graphics::webgpu::Graphics::drawMeshShader ( Mesh *  mesh,
const glm::mat4 &  model,
Texture *  texture,
const Color &  tint,
Shader *  shader 
)
overridevirtual

Draws mesh shader.

实现了 eve::graphics::Graphics.

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

引用了 d, eve::graphics::Graphics::frameHad3D, mesh, model, shader , 以及 tint.

被这些函数引用 drawMesh().

◆ drawMeshShadow()

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

Draws mesh shadow.

实现了 eve::graphics::Graphics.

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

引用了 d, doubleSided , 以及 mesh.

◆ drawMeshShadowAlpha()

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

Draws mesh shadow alpha.

实现了 eve::graphics::Graphics.

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

引用了 albedo, d, doubleSided, lodFadeReverse, lodWeight , 以及 mesh.

◆ drawPrimitiveCanvas()

◆ drawPrimitiveScene()

void eve::graphics::webgpu::Graphics::drawPrimitiveScene ( const PrimitiveSceneCanvas3D &  canvas)
overridevirtual

◆ drawSolidRect()

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

◆ drawSolidRectRotated()

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

Draws solid rect rotated.

实现了 eve::graphics::Graphics.

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

引用了 blend, color, cx, cy, degrees, h , 以及 w.

被这些函数引用 drawTexturedRectLitUVRotated().

◆ drawTexturedRect()

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

Draws textured rect.

实现了 eve::graphics::Graphics.

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

引用了 color, drawTexturedRectUV(), h, w, x , 以及 y.

◆ drawTexturedRectLitUV()

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

Draws textured rect lit uv.

实现了 eve::graphics::Graphics.

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

引用了 albedo, blend, color, drawSolidRect(), h, normal, w, x , 以及 y.

◆ drawTexturedRectLitUVRotated()

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

Draws textured rect lit uv rotated.

实现了 eve::graphics::Graphics.

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

引用了 albedo, blend, color, cx, cy, degrees, drawSolidRectRotated(), h, normal , 以及 w.

◆ drawTexturedRectShader()

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

Draws textured rect shader.

实现了 eve::graphics::Graphics.

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

引用了 color, drawTexturedRectShaderUV(), h, shader, w, x , 以及 y.

◆ drawTexturedRectShader4()

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

Draws textured rect shader 4.

实现了 eve::graphics::Graphics.

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

引用了 color, depth, drawSolidRect(), h, eve::Opaque, shader, tint, w, x , 以及 y.

◆ drawTexturedRectShader5()

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

Draws textured rect shader 5.

实现了 eve::graphics::Graphics.

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

引用了 color, depth, drawSolidRect(), h, eve::Opaque, shader, tint, w, x , 以及 y.

◆ drawTexturedRectShaderDepth()

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

Draws textured rect shader depth.

实现了 eve::graphics::Graphics.

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

引用了 eve::Alpha, color, depth, drawSolidRect(), h, shader, tint, w, x , 以及 y.

◆ drawTexturedRectShaderDepthMotion()

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

Draws textured rect shader depth motion.

实现了 eve::graphics::Graphics.

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

引用了 color, depth, drawSolidRect(), h, eve::Opaque, shader, tint, w, x , 以及 y.

◆ drawTexturedRectShaderUV()

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

Draws textured rect shader uv.

实现了 eve::graphics::Graphics.

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

引用了 blend, color, drawSolidRect(), h, shader, w, x , 以及 y.

被这些函数引用 drawTexturedRectShader() , 以及 drawTexturedRectUV().

◆ drawTexturedRectShaderUVRotated()

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

Draws textured rect shader uv rotated.

实现了 eve::graphics::Graphics.

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

引用了 blend, color, cx, cy, degrees, drawSolidRect(), h, shader , 以及 w.

◆ drawTexturedRectUV()

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

Draws textured rect uv.

实现了 eve::graphics::Graphics.

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

引用了 color, eve::graphics::Graphics::currentShader, drawTexturedRectShaderUV(), h, w, x , 以及 y.

被这些函数引用 drawTexturedRect().

◆ drawVoxelFaceInstances()

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

Draws voxel face instances.

实现了 eve::graphics::Graphics.

在文件 GraphicsVoxel.cpp 第 104 行定义.

引用了 a, count, d, eve::graphics::Graphics::frameHad3D , 以及 eve::graphics::webgpu::sv().

◆ end3DFrameToCanvas()

◆ endDecalPass()

void eve::graphics::webgpu::Graphics::endDecalPass ( )
overridevirtual

Ends decal pass.

实现了 eve::graphics::Graphics.

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

◆ endGBufferPass()

void eve::graphics::webgpu::Graphics::endGBufferPass ( )
overridevirtual

◆ endShadowPass()

void eve::graphics::webgpu::Graphics::endShadowPass ( )
overridevirtual

Ends shadow pass.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::ShadowConfig::kTotalLayers.

◆ filterHDRReflectionCubemap()

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

Filter hdr reflection cubemap.

@compatibility Implements the Graphics boolean submission facade.

重载 eve::graphics::Graphics .

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

引用了 callback, entries, eve::graphics::Texture::gpuHandle, group, index, offset, params, pending, roughness, status, eve::graphics::webgpu::sv() , 以及 target.

◆ flush2DToCanvas()

◆ frameReadbackStatus()

int eve::graphics::webgpu::Graphics::frameReadbackStatus ( ) const
overridevirtual

Frame readback status.

重载 eve::graphics::Graphics .

在文件 GraphicsReadback.cpp 第 408 行定义.

◆ getBackendName()

std::string eve::graphics::webgpu::Graphics::getBackendName ( ) const
inlineoverridevirtual

Returns the backend name.

实现了 eve::graphics::Graphics.

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

◆ getCanvas()

Canvas * eve::graphics::webgpu::Graphics::getCanvas ( ) const
overridevirtual

Returns the canvas.

实现了 eve::graphics::Graphics.

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

◆ getDevice()

wgpu::Device & eve::graphics::webgpu::Graphics::getDevice ( )
inline

Returns the device.

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

引用了 device.

被这些函数引用 eve::graphics::webgpu::OffscreenCanvas::OffscreenCanvas().

◆ getInstance()

wgpu::Instance & eve::graphics::webgpu::Graphics::getInstance ( )
inline

Returns the instance.

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

◆ getLastOffscreen3DGpuDurationMs()

float eve::graphics::webgpu::Graphics::getLastOffscreen3DGpuDurationMs ( ) const
inlineoverridevirtual

Returns the last offscreen 3 d gpu duration ms.

重载 eve::graphics::Graphics .

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

◆ getMaxAnisotropy()

float eve::graphics::webgpu::Graphics::getMaxAnisotropy ( ) const
overridevirtual

Returns the max anisotropy.

实现了 eve::graphics::Graphics.

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

◆ getMsaaSamples()

int eve::graphics::webgpu::Graphics::getMsaaSamples ( ) const
inlineoverridevirtual

Returns the msaa samples.

重载 eve::graphics::Graphics .

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

◆ getPixel()

Color eve::graphics::webgpu::Graphics::getPixel ( int  x,
int  y 
)
overridevirtual

Returns the pixel.

实现了 eve::graphics::Canvas.

在文件 GraphicsReadback.cpp 第 47 行定义.

引用了 getPixelImpl(), eve::graphics::Graphics::screenReadbackEnabled, x , 以及 y.

◆ getPixelImpl()

Color eve::graphics::webgpu::Graphics::getPixelImpl ( OffscreenCanvas *  canvas,
int  x,
int  y 
)

Blocking CPU readback of an offscreen canvas or scene color target.

在文件 GraphicsReadback.cpp 第 190 行定义.

引用了 device, eve::graphics::webgpu::OffscreenCanvas::getHeight(), eve::graphics::webgpu::OffscreenCanvas::getWidth(), h, p, eve::graphics::Graphics::screenReadbackEnabled, w, x , 以及 y.

被这些函数引用 eve::graphics::webgpu::OffscreenCanvas::getPixel() , 以及 getPixel().

◆ getQueue()

wgpu::Queue & eve::graphics::webgpu::Graphics::getQueue ( )
inline

Returns the queue.

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

◆ getSceneAutoExposure()

bool eve::graphics::webgpu::Graphics::getSceneAutoExposure ( ) const
inlineoverridevirtual

Returns the scene auto exposure.

实现了 eve::graphics::Graphics.

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

◆ getSceneAutoExposureMaxEV()

float eve::graphics::webgpu::Graphics::getSceneAutoExposureMaxEV ( ) const
inlineoverridevirtual

Returns the scene auto exposure max ev.

实现了 eve::graphics::Graphics.

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

◆ getSceneAutoExposureMinEV()

float eve::graphics::webgpu::Graphics::getSceneAutoExposureMinEV ( ) const
inlineoverridevirtual

Returns the scene auto exposure min ev.

实现了 eve::graphics::Graphics.

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

◆ getSceneBloomIntensity()

float eve::graphics::webgpu::Graphics::getSceneBloomIntensity ( ) const
inlineoverridevirtual

Returns the scene bloom intensity.

实现了 eve::graphics::Graphics.

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

◆ getSceneBloomThreshold()

float eve::graphics::webgpu::Graphics::getSceneBloomThreshold ( ) const
inlineoverridevirtual

Returns the scene bloom threshold.

实现了 eve::graphics::Graphics.

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

◆ getSceneColorFilter()

glm::vec3 eve::graphics::webgpu::Graphics::getSceneColorFilter ( ) const
inlineoverridevirtual

Returns the scene color filter.

实现了 eve::graphics::Graphics.

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

◆ getSceneColorTexture()

Texture * eve::graphics::webgpu::Graphics::getSceneColorTexture ( )
overridevirtual

Returns the scene color texture.

重载 eve::graphics::Graphics .

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

◆ getSceneDofFarZ()

float eve::graphics::webgpu::Graphics::getSceneDofFarZ ( ) const
inlineoverridevirtual

Returns the scene dof far z.

实现了 eve::graphics::Graphics.

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

◆ getSceneDofFocusDistance()

float eve::graphics::webgpu::Graphics::getSceneDofFocusDistance ( ) const
inlineoverridevirtual

Returns the scene dof focus distance.

实现了 eve::graphics::Graphics.

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

◆ getSceneDofFocusRange()

float eve::graphics::webgpu::Graphics::getSceneDofFocusRange ( ) const
inlineoverridevirtual

Returns the scene dof focus range.

实现了 eve::graphics::Graphics.

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

◆ getSceneDofMaxBlur()

float eve::graphics::webgpu::Graphics::getSceneDofMaxBlur ( ) const
inlineoverridevirtual

Returns the scene dof max blur.

实现了 eve::graphics::Graphics.

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

◆ getSceneDofNearZ()

float eve::graphics::webgpu::Graphics::getSceneDofNearZ ( ) const
inlineoverridevirtual

Returns the scene dof near z.

实现了 eve::graphics::Graphics.

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

◆ getSceneExposure()

float eve::graphics::webgpu::Graphics::getSceneExposure ( ) const
inlineoverridevirtual

Returns the scene exposure.

实现了 eve::graphics::Graphics.

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

◆ getSceneGain()

glm::vec3 eve::graphics::webgpu::Graphics::getSceneGain ( ) const
inlineoverridevirtual

Returns the scene gain.

实现了 eve::graphics::Graphics.

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

◆ getSceneInverseGamma()

glm::vec3 eve::graphics::webgpu::Graphics::getSceneInverseGamma ( ) const
inlineoverridevirtual

Returns the scene inverse gamma.

实现了 eve::graphics::Graphics.

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

◆ getSceneLift()

glm::vec3 eve::graphics::webgpu::Graphics::getSceneLift ( ) const
inlineoverridevirtual

Returns the scene lift.

实现了 eve::graphics::Graphics.

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

◆ getSceneLinearDepthTexture()

Texture * eve::graphics::webgpu::Graphics::getSceneLinearDepthTexture ( )
overridevirtual

Return the active sampleable scene linear-depth texture when available. @ownership Borrowed from the active render targets; the caller must not delete it. @lifetime Valid until render-target recreation or Graphics destruction.

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::GBuffer::getDepthTexture(), eve::graphics::GBuffer::isValid() , 以及 eve::graphics::Graphics::renderControl_.

◆ getSceneTransitionLensDistortion()

float eve::graphics::webgpu::Graphics::getSceneTransitionLensDistortion ( ) const
inlineoverridevirtual

Returns the scene transition lens distortion.

实现了 eve::graphics::Graphics.

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

◆ getSceneTransitionLensScale()

float eve::graphics::webgpu::Graphics::getSceneTransitionLensScale ( ) const
inlineoverridevirtual

Returns the scene transition lens scale.

实现了 eve::graphics::Graphics.

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

◆ getSceneTransitionVignette()

float eve::graphics::webgpu::Graphics::getSceneTransitionVignette ( ) const
inlineoverridevirtual

Returns the scene transition vignette.

实现了 eve::graphics::Graphics.

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

◆ getSceneTransitionVignetteSmoothness()

float eve::graphics::webgpu::Graphics::getSceneTransitionVignetteSmoothness ( ) const
inlineoverridevirtual

Returns the scene transition vignette smoothness.

实现了 eve::graphics::Graphics.

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

◆ getSdlWindow()

void * eve::graphics::webgpu::Graphics::getSdlWindow ( ) const
inline

Returns the sdl window.

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

◆ getSurface()

wgpu::Surface & eve::graphics::webgpu::Graphics::getSurface ( )
inline

Returns the surface.

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

◆ getSurfaceFormat()

WGPUTextureFormat eve::graphics::webgpu::Graphics::getSurfaceFormat ( ) const
inline

Returns the surface format.

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

◆ getTexture()

Texture * eve::graphics::webgpu::Graphics::getTexture ( )
overridevirtual

Returns the texture.

实现了 eve::graphics::Canvas.

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

引用了 eve::graphics::Canvas::getTexture().

◆ gpuDrivenCullBegin()

bool eve::graphics::webgpu::Graphics::gpuDrivenCullBegin ( const GpuInstance *  instances,
uint32_t  instanceCount 
)
overridevirtual

Gpu driven cull begin.

重载 eve::graphics::Graphics .

在文件 GraphicsGpuDriven.cpp 第 862 行定义.

引用了 instanceCount , 以及 instances.

◆ gpuDrivenCullEmit()

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

◆ gpuDrivenCullEnabled()

bool eve::graphics::webgpu::Graphics::gpuDrivenCullEnabled ( ) const
inlineoverridevirtual

Gpu driven cull enabled.

重载 eve::graphics::Graphics .

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

◆ gpuDrivenDrawOpaque()

void eve::graphics::webgpu::Graphics::gpuDrivenDrawOpaque ( )
overridevirtual

Gpu driven draw opaque.

重载 eve::graphics::Graphics .

在文件 GraphicsGpuDriven.cpp 第 1031 行定义.

引用了 eve::graphics::Graphics::frameHad3D.

◆ gpuDrivenEnabled()

bool eve::graphics::webgpu::Graphics::gpuDrivenEnabled ( ) const
inlineoverridevirtual

Gpu driven enabled.

重载 eve::graphics::Graphics .

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

◆ gpuDrivenMaterialRecord()

uint32_t eve::graphics::webgpu::Graphics::gpuDrivenMaterialRecord ( Material *  material)
overridevirtual

Gpu driven material record.

重载 eve::graphics::Graphics .

在文件 GraphicsGpuDriven.cpp 第 381 行定义.

引用了 found, gpuDrivenMaterialUsable(), id, eve::graphics::kInvalidGpuDrivenSlot , 以及 material.

◆ gpuDrivenMaterialUsable()

bool eve::graphics::webgpu::Graphics::gpuDrivenMaterialUsable ( Material *  material)
overridevirtual

Gpu driven material usable.

重载 eve::graphics::Graphics .

在文件 GraphicsGpuDriven.cpp 第 398 行定义.

引用了 eve::graphics::AtlasPageTable, material , 以及 eve::graphics::Transparent.

被这些函数引用 gpuDrivenMaterialRecord(), gpuDrivenSubmitOpaque() , 以及 gpuDrivenSubmitResident().

◆ gpuDrivenMeshRecord()

uint32_t eve::graphics::webgpu::Graphics::gpuDrivenMeshRecord ( Mesh *  mesh)
overridevirtual

Gpu driven mesh record.

重载 eve::graphics::Graphics .

在文件 GraphicsGpuDriven.cpp 第 371 行定义.

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

◆ gpuDrivenRecordVisPass()

void eve::graphics::webgpu::Graphics::gpuDrivenRecordVisPass ( )
overridevirtual

Gpu driven record vis pass.

重载 eve::graphics::Graphics .

在文件 GraphicsVisibility.cpp 第 267 行定义.

引用了 eve::graphics::Graphics::frameHad3D.

◆ gpuDrivenReleaseMaterialRecord()

Result< void > eve::graphics::webgpu::Graphics::gpuDrivenReleaseMaterialRecord ( Material *  material)
overridevirtual

◆ gpuDrivenResolve()

void eve::graphics::webgpu::Graphics::gpuDrivenResolve ( )
overridevirtual

Gpu driven resolve.

重载 eve::graphics::Graphics .

在文件 GraphicsVisibility.cpp 第 274 行定义.

◆ gpuDrivenResolveWanted()

bool eve::graphics::webgpu::Graphics::gpuDrivenResolveWanted ( ) const
overridevirtual

Gpu driven resolve wanted.

重载 eve::graphics::Graphics .

在文件 GraphicsVisibility.cpp 第 262 行定义.

引用了 eve::graphics::Graphics::renderControl_.

◆ gpuDrivenSetEnabled()

void eve::graphics::webgpu::Graphics::gpuDrivenSetEnabled ( bool  enabled)
inlineoverridevirtual

Gpu driven set enabled.

重载 eve::graphics::Graphics .

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

引用了 enabled.

◆ gpuDrivenSubmitOpaque()

bool eve::graphics::webgpu::Graphics::gpuDrivenSubmitOpaque ( const GpuInstance *  instances,
uint32_t  instanceCount 
)
overridevirtual

◆ gpuDrivenSubmitResident()

◆ gpuDrivenVgAssetId()

uint32_t eve::graphics::webgpu::Graphics::gpuDrivenVgAssetId ( Mesh *  mesh) const
overridevirtual

Gpu driven vg asset id.

重载 eve::graphics::Graphics .

在文件 GraphicsVirtualGeometry.cpp 第 284 行定义.

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

◆ gpuDrivenVgAttachToMesh()

bool eve::graphics::webgpu::Graphics::gpuDrivenVgAttachToMesh ( Mesh *  mesh,
uint32_t  vgAssetId 
)
override

Gpu driven vg attach to mesh.

在文件 GraphicsVirtualGeometry.cpp 第 289 行定义.

引用了 mesh.

◆ gpuDrivenVgComputeSection()

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

Gpu driven vg compute section.

重载 eve::graphics::Graphics .

在文件 GraphicsVirtualGeometry.cpp 第 308 行定义.

引用了 eye, eve::graphics::Graphics::frameHad3D, length , 以及 viewProj.

◆ gpuDrivenVgSetInstance()

bool eve::graphics::webgpu::Graphics::gpuDrivenVgSetInstance ( uint32_t  vgAssetId,
const glm::mat4 &  model,
uint32_t  materialId 
)
override

Gpu driven vg set instance.

@compatibility Implements the Graphics legacy boolean submission facade.

在文件 GraphicsVirtualGeometry.cpp 第 296 行定义.

引用了 model.

◆ gpuDrivenVgUpload()

◆ initHeadless()

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

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

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

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::webgpu::InitFlow::createInstance(), eve::graphics::Graphics::height, eve::graphics::webgpu::InitFlow::requestAdapter(), eve::graphics::webgpu::InitFlow::requestDevice(), setViewportSize() , 以及 eve::graphics::Graphics::width.

◆ initWithWindow()

void eve::graphics::webgpu::Graphics::initWithWindow ( void *  nativeWindow)
overridevirtual

◆ isCanvasActive()

bool eve::graphics::webgpu::Graphics::isCanvasActive ( ) const
overridevirtual

True when canvas active.

实现了 eve::graphics::Graphics.

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

◆ isReady()

bool eve::graphics::webgpu::Graphics::isReady ( ) const
inline

True when ready.

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

◆ newCanvas()

Canvas * eve::graphics::webgpu::Graphics::newCanvas ( int  width,
int  height 
)
overridevirtual

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

实现了 eve::graphics::Graphics.

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

引用了 c, eve::graphics::Graphics::height, OffscreenCanvas , 以及 eve::graphics::Graphics::width.

◆ newCubemap() [1/2]

Texture * eve::graphics::webgpu::Graphics::newCubemap ( int  faceSize,
const uint8_t *  rgbaFaces 
)
overridevirtual

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

实现了 eve::graphics::Graphics.

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

引用了 info , 以及 newCubemap().

被这些函数引用 newCubemap().

◆ newCubemap() [2/2]

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

◆ newHairShaderFromSpv()

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

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

实现了 eve::graphics::Graphics.

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

◆ newHairShaderFromWgsl()

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

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

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Shader::eMesh3D, eve::graphics::webgpu::kMesh3DVertWgsl , 以及 shader.

◆ newHDRCanvas()

Canvas * eve::graphics::webgpu::Graphics::newHDRCanvas ( int  width,
int  height 
)
overridevirtual

Creates a hdr canvas. @ownership Caller deletes unless documented otherwise.

@lifetime Returned canvas is Graphics-owned until explicitly released.

实现了 eve::graphics::Graphics.

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

引用了 c, eve::graphics::Graphics::height, OffscreenCanvas , 以及 eve::graphics::Graphics::width.

◆ newHDRCubemap()

Texture * eve::graphics::webgpu::Graphics::newHDRCubemap ( int  faceSize)
overridevirtual

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

@lifetime Returned texture is Graphics-owned until explicitly released.

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::Linear, eve::graphics::TextureSampler::linear(), eve::graphics::mipmapCountForSize() , 以及 eve::graphics::webgpu::sv().

◆ newHDRImageDataImpl()

image::ImageData * eve::graphics::webgpu::Graphics::newHDRImageDataImpl ( OffscreenCanvas *  canvas)

Blocking linear RGBA16F readback of an HDR offscreen canvas. @ownership The caller owns the returned image data.

在文件 GraphicsReadback.cpp 第 243 行定义.

引用了 device, eve::graphics::webgpu::OffscreenCanvas::getHeight(), eve::graphics::webgpu::OffscreenCanvas::getWidth(), h , 以及 w.

被这些函数引用 eve::graphics::webgpu::OffscreenCanvas::newHDRImageData().

◆ newImageData()

image::ImageData * eve::graphics::webgpu::Graphics::newImageData ( )
overridevirtual

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

实现了 eve::graphics::Canvas.

在文件 GraphicsReadback.cpp 第 55 行定义.

引用了 newImageDataImpl() , 以及 eve::graphics::Graphics::screenReadbackEnabled.

◆ newImageDataImpl()

image::ImageData * eve::graphics::webgpu::Graphics::newImageDataImpl ( OffscreenCanvas *  canvas)

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

在文件 GraphicsReadback.cpp 第 210 行定义.

引用了 color, device, eve::graphics::webgpu::OffscreenCanvas::getHeight(), eve::graphics::webgpu::OffscreenCanvas::getWidth(), h, eve::graphics::Graphics::screenReadbackEnabled , 以及 w.

被这些函数引用 eve::graphics::webgpu::OffscreenCanvas::newImageData() , 以及 newImageData().

◆ newMeshCylinder()

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

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

实现了 eve::graphics::Graphics.

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

引用了 a, b, caps, i0, i1, idx, newMeshFromArrays(), pos, u, uv, v, x , 以及 y.

◆ newMeshFromArrays()

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

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

实现了 eve::graphics::Graphics.

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

引用了 indexCount, indices, newMeshFromArraysColored() , 以及 vertexCount.

被这些函数引用 newMeshCylinder(), newMeshFromAssimp() , 以及 newMeshSphere().

◆ newMeshFromArraysColored()

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

Create a mesh with a packed linear RGBA vertex-color stream.

返回
Factory-owned mesh, or nullptr when validation or backend allocation fails. @ownership The resource factory owns the returned mesh; release it through releaseMesh. @lifetime Valid until releaseMesh, graphics shutdown, or device loss. @thread Graphics thread; all input arrays are borrowed and consumed synchronously.

实现了 eve::graphics::Graphics.

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

引用了 indexCount, indices, mesh, eve::graphics::webgpu::sv(), v, vertexCount , 以及 verts.

被这些函数引用 newMeshFromArrays().

◆ newMeshFromAssimp() [1/2]

Mesh * eve::graphics::webgpu::Graphics::newMeshFromAssimp ( const ::aiMesh &  mesh)
overridevirtual

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

实现了 eve::graphics::Graphics.

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

引用了 mesh , 以及 newMeshFromAssimp().

被这些函数引用 newMeshFromAssimp().

◆ newMeshFromAssimp() [2/2]

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

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

实现了 eve::graphics::Graphics.

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

引用了 a, f, idx, m, mesh, n, name, newMeshFromArrays(), p, pos, uv , 以及 v.

◆ newMeshShader()

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

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

实现了 eve::graphics::Graphics.

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

◆ newMeshShaderFromSpv()

Shader * eve::graphics::webgpu::Graphics::newMeshShaderFromSpv ( const std::vector< uint32_t > &  vertSpv,
const std::vector< uint32_t > &  fragSpv 
)
overridevirtual

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

实现了 eve::graphics::Graphics.

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

◆ newMeshShaderFromWgsl()

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

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

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Shader::eMesh3D, frag, eve::graphics::webgpu::kMesh3DFragWgsl, eve::graphics::webgpu::kMesh3DVertWgsl , 以及 vert.

◆ newMeshSphere()

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

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

实现了 eve::graphics::Graphics.

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

引用了 a, b, idx, newMeshFromArrays(), phi, pos, sx, sy, sz, u, uv, v, x , 以及 y.

◆ newShader()

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

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

实现了 eve::graphics::Graphics.

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

◆ newShaderFromSpv()

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

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

实现了 eve::graphics::Graphics.

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

◆ newShaderFromSpvFile()

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

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

实现了 eve::graphics::Graphics.

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

◆ newShaderFromWgsl()

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

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

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Shader::eSprite2D, eve::graphics::webgpu::kTexturedVertWgsl , 以及 vert.

◆ newSharedTexture()

ResultRef< Texture > eve::graphics::webgpu::Graphics::newSharedTexture ( image::ImageData *  data,
const std::string &  contentKey 
)
overridevirtual

Reuse immutable imported pixels. Graphics owns the returned texture until release or shutdown.

重载 eve::graphics::IResourceFactory .

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

引用了 error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), found, eve::InvalidArgument, newTexture() , 以及 eve::Result< T >::success().

◆ newTexture() [1/4]

Texture * eve::graphics::webgpu::Graphics::newTexture ( image::ImageData *  data)
overridevirtual

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

实现了 eve::graphics::Graphics.

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

引用了 info , 以及 newTexture().

◆ newTexture() [2/4]

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

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

实现了 eve::graphics::Graphics.

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

引用了 info , 以及 newTexture().

◆ newTexture() [3/4]

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

◆ newTexture() [4/4]

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

◆ newTexture3DRgba8()

Result< Texture * > eve::graphics::webgpu::Graphics::newTexture3DRgba8 ( uint32_t  width,
uint32_t  height,
uint32_t  depth,
std::span< const uint8_t >  rgba 
)
overridevirtual

Upload one tightly packed linear RGBA8 3D sampled texture.

参数
widthPositive X extent.
heightPositive Y extent.
depthPositive Z extent.
rgbaBorrowed Z-major slices, each row-major RGBA8; not retained.
返回
Failure without publication or a factory-owned texture; default is Unsupported. @lifetime Until shutdown or releaseTexture; successful release transfers the CPU facade. @thread Graphics thread only, synchronous, non-reentrant and without callbacks.

Creates a texture 3 d rgba 8. @ownership Caller deletes unless documented otherwise.

重载 eve::graphics::IResourceFactory .

在文件 GraphicsTextureMips.cpp 第 224 行定义.

引用了 code, depth, descriptor, device, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::Graphics::height, eve::InvalidArgument, layout, limits, eve::graphics::TextureSampler::linear(), message, eve::Result< T >::success(), view , 以及 eve::graphics::Graphics::width.

◆ newTextureArrayRgba16f()

Result< Texture * > eve::graphics::webgpu::Graphics::newTextureArrayRgba16f ( uint32_t  width,
uint32_t  height,
uint32_t  layers,
std::span< const uint16_t >  rgbaHalf 
)
overridevirtual

Upload a sampled 2D array of tightly packed linear RGBA16F texels.

参数
rgbaHalfIEEE-754 binary16 channel bits, layer-major and row-major within each layer; borrowed for call.
返回
Failure without publication or a factory-owned texture. Unsupported is explicit on absent providers. @thread Graphics thread only, synchronous, non-reentrant and without callbacks.

Creates a texture array rgba 16 f. @ownership Caller deletes unless documented otherwise.

重载 eve::graphics::IResourceFactory .

在文件 GraphicsTextureMips.cpp 第 161 行定义.

引用了 code, descriptor, device, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::Graphics::height, eve::InvalidArgument, layout, limits, eve::graphics::TextureSampler::linear(), message, eve::Result< T >::success(), view , 以及 eve::graphics::Graphics::width.

◆ newTextureFromFile()

Texture * eve::graphics::webgpu::Graphics::newTextureFromFile ( const std::string &  filename)
overridevirtual

◆ newTextureMipChain()

Result< Texture * > eve::graphics::webgpu::Graphics::newTextureMipChain ( uint32_t  width,
uint32_t  height,
uint32_t  levels,
std::span< const uint8_t >  rgba 
)
overridevirtual

Upload complete explicit linear RGBA8 mips without regenerating pixels.

参数
widthPositive base width.
heightPositive base height.
levelsFull halving chain through 1x1, clamping each dimension to one.
rgbaBorrowed tightly packed top-down levels in increasing LOD order; not retained.
返回
Failure without publication or a factory-owned texture; default is Unsupported. @lifetime Until shutdown or releaseTexture; successful release transfers the CPU facade. @thread Graphics thread only, synchronous, non-reentrant and without callbacks.

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

重载 eve::graphics::IResourceFactory .

在文件 GraphicsTextureMips.cpp 第 81 行定义.

引用了 bytes, code, count, descriptor, device, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), h, eve::graphics::Graphics::height, eve::InvalidArgument, layout, level, eve::graphics::TextureSampler::linearMipmap(), maximum, eve::graphics::webgpu::Capabilities::maxTextureDimension2D(), message, offset, eve::Result< T >::success(), w , 以及 eve::graphics::Graphics::width.

◆ popValidationScope()

void eve::graphics::webgpu::Graphics::popValidationScope ( )
overridevirtual

Pops validation scope.

实现了 eve::graphics::Graphics.

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

引用了 message, status , 以及 type.

◆ present()

◆ pumpReadback()

void eve::graphics::webgpu::Graphics::pumpReadback ( )

Advances a pending frame readback; called every present().

在文件 GraphicsReadback.cpp 第 414 行定义.

引用了 color, x , 以及 y.

被这些函数引用 present().

◆ pushValidationScope()

void eve::graphics::webgpu::Graphics::pushValidationScope ( )
overridevirtual

Pushes validation scope.

实现了 eve::graphics::Graphics.

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

◆ readDecalLayerToImageData()

image::ImageData * eve::graphics::webgpu::Graphics::readDecalLayerToImageData ( const std::string &  attachment)
overridevirtual

Reads decal layer to image data.

重载 eve::graphics::Graphics .

在文件 GraphicsReadback.cpp 第 288 行定义.

引用了 device , 以及 image.

◆ readGBufferToImageData()

image::ImageData * eve::graphics::webgpu::Graphics::readGBufferToImageData ( const std::string &  attachment)
overridevirtual

Reads g buffer to image data.

重载 eve::graphics::Graphics .

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

引用了 device, image , 以及 pixels.

◆ releaseMesh()

bool eve::graphics::webgpu::Graphics::releaseMesh ( Mesh *  mesh)
overridevirtual

Release mesh.

重载 eve::graphics::Graphics .

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

引用了 g, m , 以及 mesh.

◆ releaseShader()

bool eve::graphics::webgpu::Graphics::releaseShader ( Shader *  shader)
overridevirtual

Release shader.

重载 eve::graphics::Graphics .

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

引用了 g, s , 以及 shader.

◆ releaseTexture()

bool eve::graphics::webgpu::Graphics::releaseTexture ( Texture *  texture)
overridevirtual

◆ reloadTextureFromFile()

bool eve::graphics::webgpu::Graphics::reloadTextureFromFile ( const std::string &  filename)
overridevirtual

◆ replaceShaderFromGlsl()

Result< void > eve::graphics::webgpu::Graphics::replaceShaderFromGlsl ( Shader &  shader,
const std::string &  vertGlsl,
const std::string &  fragGlsl 
)
overridevirtual

Replace shader from glsl.

实现了 eve::graphics::Graphics.

在文件 GraphicsShaderReload.cpp 第 88 行定义.

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

◆ replaceShaderFromSpv()

Result< void > eve::graphics::webgpu::Graphics::replaceShaderFromSpv ( Shader &  shader,
const std::vector< uint32_t > &  vertSpv,
const std::vector< uint32_t > &  fragSpv 
)
overridevirtual

Replace shader from spv.

实现了 eve::graphics::Graphics.

在文件 GraphicsShaderReload.cpp 第 15 行定义.

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

◆ replaceShaderFromWgsl()

◆ requestSurfaceRecreate()

void eve::graphics::webgpu::Graphics::requestSurfaceRecreate ( )
inlineoverridevirtual

Request surface recreate.

重载 eve::graphics::Graphics .

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

◆ setCanvas()

void eve::graphics::webgpu::Graphics::setCanvas ( Canvas *  canvas)
overridevirtual

Sets the canvas.

实现了 eve::graphics::Graphics.

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

引用了 flush2DToCanvas().

◆ setCloudShadows()

void eve::graphics::webgpu::Graphics::setCloudShadows ( float  strength,
float  worldCell,
float  time,
float  windSpeed,
float  windAngle,
float  coverage,
float  detail 
)
overridevirtual

Sets the cloud shadows.

实现了 eve::graphics::Graphics.

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

引用了 detail, strength , 以及 time.

◆ setDecalCamera()

void eve::graphics::webgpu::Graphics::setDecalCamera ( const glm::mat4 &  viewProj,
float  nearZ,
float  farZ 
)
overridevirtual

Sets the decal camera.

实现了 eve::graphics::Graphics.

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

引用了 viewProj.

◆ setLighting2D()

void eve::graphics::webgpu::Graphics::setLighting2D ( const Lighting2DUBO &  ubo)
overridevirtual

Sets the lighting 2 d.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DCameraPos()

void eve::graphics::webgpu::Graphics::setMesh3DCameraPos ( const glm::vec3 &  eye)
overridevirtual

Sets the mesh 3 d camera pos.

实现了 eve::graphics::Graphics.

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

引用了 eye.

◆ setMesh3DClip()

void eve::graphics::webgpu::Graphics::setMesh3DClip ( float  nearZ,
float  farZ 
)
overridevirtual

Sets the mesh 3 d clip.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DClusteredActive()

void eve::graphics::webgpu::Graphics::setMesh3DClusteredActive ( bool  active)
overridevirtual

Sets the mesh 3 d clustered active.

实现了 eve::graphics::Graphics.

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

引用了 active.

◆ setMesh3DClusteredLighting()

void eve::graphics::webgpu::Graphics::setMesh3DClusteredLighting ( const ClusteredLightingUpload &  upload)
overridevirtual

Sets the mesh 3 d clustered lighting.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::ClusteredLightingUpload::active.

◆ setMesh3DEnv()

void eve::graphics::webgpu::Graphics::setMesh3DEnv ( Texture *  cube,
float  intensity 
)
overridevirtual

Sets the mesh 3 d env.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DEnvProbe()

void eve::graphics::webgpu::Graphics::setMesh3DEnvProbe ( const glm::vec3 &  center,
const glm::vec3 &  extent 
)
overridevirtual

Sets the mesh 3 d env probe.

实现了 eve::graphics::Graphics.

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

引用了 center.

◆ setMesh3DHeightTexture()

void eve::graphics::webgpu::Graphics::setMesh3DHeightTexture ( Texture *  height)
overridevirtual

Sets the mesh 3 d height texture.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Graphics::height.

◆ setMesh3DLight()

void eve::graphics::webgpu::Graphics::setMesh3DLight ( const glm::vec3 &  dir,
const glm::vec3 &  color 
)
overridevirtual

◆ setMesh3DLighting()

void eve::graphics::webgpu::Graphics::setMesh3DLighting ( const Lighting3DPack &  pack)
overridevirtual

Sets the mesh 3 d lighting.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DLodDither()

void eve::graphics::webgpu::Graphics::setMesh3DLodDither ( float  weight,
bool  reverse,
bool  enabled 
)
overridevirtual

Sets the mesh 3 d lod dither.

实现了 eve::graphics::Graphics.

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

引用了 enabled , 以及 weight.

◆ setMesh3DMaterial()

void eve::graphics::webgpu::Graphics::setMesh3DMaterial ( float  metallic,
float  roughness 
)
overridevirtual

Sets the mesh 3 d material.

实现了 eve::graphics::Graphics.

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

引用了 metallic , 以及 roughness.

◆ setMesh3DNormalTexture()

void eve::graphics::webgpu::Graphics::setMesh3DNormalTexture ( Texture *  normal)
overridevirtual

Sets the mesh 3 d normal texture.

实现了 eve::graphics::Graphics.

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

引用了 normal.

◆ setMesh3DPackedNormalMask()

void eve::graphics::webgpu::Graphics::setMesh3DPackedNormalMask ( bool  enabled)
overridevirtual

Sets the mesh 3 d packed normal mask.

实现了 eve::graphics::Graphics.

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

引用了 enabled.

◆ setMesh3DParallax()

void eve::graphics::webgpu::Graphics::setMesh3DParallax ( float  scale,
float  minLayers = 8.f,
float  maxLayers = 32.f 
)
overridevirtual

Sets the mesh 3 d parallax.

实现了 eve::graphics::Graphics.

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

引用了 scale.

◆ setMesh3DPbrSurface()

◆ setMesh3DReflectionProbes()

void eve::graphics::webgpu::Graphics::setMesh3DReflectionProbes ( const ReflectionProbeUpload &  upload)
overridevirtual

Sets the mesh 3 d reflection probes.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DSceneColor()

void eve::graphics::webgpu::Graphics::setMesh3DSceneColor ( Texture *  color)
overridevirtual

Sets the mesh 3 d scene color.

实现了 eve::graphics::Graphics.

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

引用了 color.

◆ setMesh3DSceneDepth()

void eve::graphics::webgpu::Graphics::setMesh3DSceneDepth ( Texture *  depth)
overridevirtual

Sets the mesh 3 d scene depth.

实现了 eve::graphics::Graphics.

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

引用了 depth.

◆ setMesh3DShadowReceive()

void eve::graphics::webgpu::Graphics::setMesh3DShadowReceive ( bool  receive)
overridevirtual

Sets the mesh 3 d shadow receive.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DShadows()

void eve::graphics::webgpu::Graphics::setMesh3DShadows ( const ShadowUpload &  upload)
overridevirtual

Sets the mesh 3 d shadows.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DSkinInfluenceLimit()

void eve::graphics::webgpu::Graphics::setMesh3DSkinInfluenceLimit ( SkinInfluenceLimit  count)
overridevirtual

Sets the mesh 3 d skin influence limit.

实现了 eve::graphics::Graphics.

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

引用了 count.

◆ setMesh3DSSAO()

void eve::graphics::webgpu::Graphics::setMesh3DSSAO ( float  intensity)
overridevirtual

Sets the mesh 3 dssao.

实现了 eve::graphics::Graphics.

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

◆ setMesh3DSurface()

void eve::graphics::webgpu::Graphics::setMesh3DSurface ( SurfaceMode  mode,
BlendMode  blend,
bool  depthWrite,
bool  doubleSided,
float  alphaCutoff,
const std::string &  alphaTechnique = "cutoff" 
)
overridevirtual

Sets the mesh 3 d surface.

实现了 eve::graphics::Graphics.

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

引用了 alphaCutoff, blend , 以及 doubleSided.

◆ setMesh3DTexCellBomb()

void eve::graphics::webgpu::Graphics::setMesh3DTexCellBomb ( float  cellScale,
float  strength,
float  rotAmount = 1.f 
)
overridevirtual

Sets the mesh 3 d tex cell bomb.

实现了 eve::graphics::Graphics.

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

引用了 strength.

◆ setMesh3DView()

void eve::graphics::webgpu::Graphics::setMesh3DView ( const glm::mat4 &  view)
overridevirtual

Sets the mesh 3 d view.

实现了 eve::graphics::Graphics.

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

引用了 view.

◆ setMesh3DViewProj()

void eve::graphics::webgpu::Graphics::setMesh3DViewProj ( const glm::mat4 &  viewProj)
overridevirtual

Sets the mesh 3 d view proj.

实现了 eve::graphics::Graphics.

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

引用了 viewProj.

◆ setMesh3DVirtualTexture()

void eve::graphics::webgpu::Graphics::setMesh3DVirtualTexture ( bool  enabled,
int  pageCountX,
int  pageCountY,
int  atlasSlotsX,
int  atlasSlotsY,
float  borderFraction 
)
overridevirtual

Sets the mesh 3 d virtual texture.

实现了 eve::graphics::Graphics.

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

引用了 enabled.

◆ setMeshSkinningData()

bool eve::graphics::webgpu::Graphics::setMeshSkinningData ( Mesh *  mesh,
const uint16_t *  joints4,
const float *  weights4,
int  vertexCount 
)
overridevirtual

Sets the mesh skinning data.

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::webgpu::GpuMesh::cpuVertices, mesh, v , 以及 vertexCount.

◆ setMsaaSamples()

void eve::graphics::webgpu::Graphics::setMsaaSamples ( int  samples)
overridevirtual

Sets the msaa samples.

重载 eve::graphics::Graphics .

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

引用了 eve::graphics::Graphics::msaaSamples.

◆ setSceneAutoExposure()

void eve::graphics::webgpu::Graphics::setSceneAutoExposure ( bool  enabled,
float  minEV,
float  maxEV 
)
inlineoverridevirtual

Sets the scene auto exposure.

实现了 eve::graphics::Graphics.

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

引用了 enabled.

◆ setSceneBloom()

void eve::graphics::webgpu::Graphics::setSceneBloom ( float  intensity,
float  threshold 
)
inlineoverridevirtual

Sets the scene bloom.

实现了 eve::graphics::Graphics.

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

◆ setSceneColorFilter()

void eve::graphics::webgpu::Graphics::setSceneColorFilter ( const glm::vec3 &  color)
inlineoverridevirtual

Sets the scene color filter.

实现了 eve::graphics::Graphics.

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

引用了 color.

◆ setSceneDepthOfField()

void eve::graphics::webgpu::Graphics::setSceneDepthOfField ( float  focusDistance,
float  maxBlurPx,
float  focusRange,
float  nearZ,
float  farZ 
)
inlineoverridevirtual

Sets the scene depth of field.

实现了 eve::graphics::Graphics.

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

◆ setSceneExposure()

void eve::graphics::webgpu::Graphics::setSceneExposure ( float  exposure)
inlineoverridevirtual

Sets the scene exposure.

实现了 eve::graphics::Graphics.

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

◆ setSceneLiftGammaGain()

void eve::graphics::webgpu::Graphics::setSceneLiftGammaGain ( const glm::vec3 &  lift,
const glm::vec3 &  inverseGamma,
const glm::vec3 &  gain 
)
inlineoverridevirtual

Sets the scene lift gamma gain.

实现了 eve::graphics::Graphics.

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

◆ setSceneTransitionFx()

void eve::graphics::webgpu::Graphics::setSceneTransitionFx ( float  vignette,
float  vignetteSmoothness,
float  lensDistortion,
float  lensScale 
)
inlineoverridevirtual

Sets the scene transition fx.

实现了 eve::graphics::Graphics.

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

◆ setTextureSampler()

void eve::graphics::webgpu::Graphics::setTextureSampler ( Texture *  texture,
const TextureSampler &  sampler 
)
overridevirtual

Sets the texture sampler.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Texture::sampler , 以及 sampler.

◆ setViewportSize()

void eve::graphics::webgpu::Graphics::setViewportSize ( int  width,
int  height,
int  pixelwidth,
int  pixelheight 
)
overridevirtual

◆ setVSync()

void eve::graphics::webgpu::Graphics::setVSync ( bool  enabled)
overridevirtual

Sets the v sync.

重载 eve::graphics::Graphics .

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

引用了 enabled, eve::graphics::Graphics::setVSync() , 以及 eve::graphics::Graphics::vsyncEnabled.

◆ supportsDecal()

bool eve::graphics::webgpu::Graphics::supportsDecal ( ) const
inlineoverridevirtual

Supports decal.

重载 eve::graphics::Graphics .

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

◆ supportsDeferredLighting()

bool eve::graphics::webgpu::Graphics::supportsDeferredLighting ( ) const
inlineoverridevirtual

Supports deferred lighting.

重载 eve::graphics::Graphics .

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

◆ supportsGBufferPost()

bool eve::graphics::webgpu::Graphics::supportsGBufferPost ( ) const
inlineoverridevirtual

Supports g buffer post.

重载 eve::graphics::Graphics .

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

◆ supportsGpuDriven3D()

bool eve::graphics::webgpu::Graphics::supportsGpuDriven3D ( ) const
inlineoverridevirtual

Supports gpu driven 3 d.

重载 eve::graphics::Graphics .

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

◆ updateMeshVertices()

bool eve::graphics::webgpu::Graphics::updateMeshVertices ( Mesh *  mesh,
const float *  posXYZ,
const float *  nrmXYZ,
const float *  uvST,
int  vertexCount,
const uint32_t *  indices,
int  indexCount 
)
overridevirtual

Updates mesh vertices.

实现了 eve::graphics::Graphics.

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

引用了 desc, indexCount, indices, mesh, owned, eve::graphics::webgpu::sv(), vertexCount , 以及 verts.

◆ updateTexture()

bool eve::graphics::webgpu::Graphics::updateTexture ( Texture *  texture,
int  width,
int  height,
const uint8_t *  rgba 
)
overridevirtual

◆ updateTextureRegion()

eve::Result< void > eve::graphics::webgpu::Graphics::updateTextureRegion ( Texture *  texture,
int  x,
int  y,
int  width,
int  height,
std::span< const std::uint8_t >  rgba,
std::size_t  bytesPerRow = 0 
)
overridevirtual

Updates texture region.

实现了 eve::graphics::Graphics.

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

引用了 eve::graphics::Graphics::height, updateTextureRegions(), eve::graphics::Graphics::width, x , 以及 y.

◆ updateTextureRegions()

eve::Result< void > eve::graphics::webgpu::Graphics::updateTextureRegions ( Texture *  texture,
std::span< const TextureRegionUpload >  regions 
)
overridevirtual

◆ uploadDeferredFileTexture()

bool eve::graphics::webgpu::Graphics::uploadDeferredFileTexture ( Texture *  texture,
image::ImageData *  data 
)
overridevirtual

友元及相关函数文档

◆ OffscreenCanvas

friend class OffscreenCanvas
friend

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

被这些函数引用 newCanvas() , 以及 newHDRCanvas().


该类的文档由以下文件生成: