#include <Graphics.h>
类 | |
| struct | EntityIdDraw |
| Per-pixel mesh entity-ID pass. Renders each EntityIdDraw's mesh with the given flat idColor (RGB encodes a stable entity id) into an offscreen target using the same viewProj, then reads it back to CPU. Pixels not covered by any entity are (0,0,0,0). Caller owns the returned ImageData*. Returns nullptr when the backend does not support offscreen ID capture. 更多... | |
Public 类型 | |
| 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 = void(*)(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*. | |
Public 成员函数 | |
| Module_REG (Graphics) | |
| Graphics () | |
| ~Graphics () override | |
| 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) |
| virtual void | drawSolidRectRGBA (float x, float y, float w, float h, float r, float g, float b, float a=1.f) |
| virtual void | drawTexturedRectRGBA (Texture *texture, float x, float y, float w, float h, float r, float g, float b, float a=1.f) |
| Texture * | newTextureFromImageData (image::ImageData *data, bool repeatU=false, bool repeatV=false) |
| Texture * | newTextureFromImageData (image::ImageData *data, const TextureCreateInfo &info) |
| Upload RGBA8 ImageData with mipmaps / filter / anisotropy options. | |
| 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 | setTextureSamplerParams (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). | |
| virtual void | present ()=0 |
| virtual std::string | getBackendName () const =0 |
| Renderer backend id used by sibling modules (e.g. Gpgpu). | |
| virtual bool | supportsGBufferPost () const |
| Whether gbuffer-based post-process shaders (AO, GI) can be created on this backend. False on WebGPU, whose custom post shaders are WGSL-only (the built-in AO/GI use SPIR-V), so RenderSystem3D skips them there. | |
| virtual void | initWithWindow (void *nativeWindow)=0 |
| Bind to an existing native window (SDL_Window*) and create Vulkan device/swapchain. Must be called after the window exists (SDL_WINDOW_VULKAN). | |
| virtual void | setViewportSize (int width, int height, int pixelwidth, int pixelheight)=0 |
| Sets the current graphics display viewport dimensions. | |
| int | getWidth () const |
| int | getHeight () const |
| int | getPixelWidth () const |
| int | getPixelHeight () const |
| double | getCurrentDPIScale () const |
| double | getScreenDPIScale () const |
| virtual void | drawSolidRect (float x, float y, float w, float h, const Color &color, BlendMode blend=BlendMode::Alpha)=0 |
| Internal immediate-mode helper used by RenderSystem / Batcher. | |
| virtual void | drawSolidRectRotated (float cx, float cy, float w, float h, float degrees, const Color &color, BlendMode blend=BlendMode::Alpha)=0 |
Rotated solid quad degrees clockwise (screen Y-down) around (cx, cy). | |
| virtual Texture * | newTexture (int width, int height, const uint8_t *rgba, bool repeatU=false, bool repeatV=false)=0 |
| virtual Texture * | newTexture (int width, int height, const uint8_t *rgba, const TextureCreateInfo &info)=0 |
| virtual Texture * | newCubemap (int faceSize, const uint8_t *rgbaFaces)=0 |
| Create an RGBA8 cubemap from 6 faces packed as +X,-X,+Y,-Y,+Z,-Z (each faceSize×faceSize, total bytes = faceSize²×4×6). Owned by Graphics. | |
| virtual Texture * | newCubemap (int faceSize, const uint8_t *rgbaFaces, const TextureCreateInfo &info)=0 |
| Cubemap with mipmap / sampler options (IBL-friendly when generateMipmaps=true). | |
| virtual Texture * | newTexture (image::ImageData *data)=0 |
| Create texture from ImageData (RGBA8 required for now). | |
| virtual Texture * | newTexture (image::ImageData *data, const TextureCreateInfo &info)=0 |
| Create texture from ImageData with sampler / mipmap options. | |
| virtual void | setTextureSampler (Texture *texture, const TextureSampler &sampler)=0 |
| Recreate the sampler for an existing texture (keeps image / mip chain). No-op when texture is null or not owned by this Graphics. | |
| virtual float | getMaxAnisotropy () const =0 |
| Device max supported anisotropy (1 if unsupported). Valid after initWithWindow. | |
| virtual Texture * | newTextureFromFile (const std::string &filename)=0 |
| Texture * | newTextureFromFileRepeated (const std::string &filename, bool repeatU, bool repeatV) |
| virtual bool | reloadTextureFromFile (const std::string &filename)=0 |
| Reload a path-cached texture from disk in place (pointer stable). False if unbound. | |
| virtual bool | releaseTexture (Texture *texture) |
| Eagerly releases a texture created by this Graphics. | |
| virtual void | drawTexturedRect (Texture *texture, float x, float y, float w, float h, const Color &color)=0 |
| virtual void | drawTexturedRectShader (Texture *texture, Shader *shader, float x, float y, float w, float h, const Color &color)=0 |
| Draw with an explicit Shader (nullptr = default textured pipeline). | |
| virtual void | drawTexturedRectUV (Texture *texture, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color)=0 |
| Draw a textured sub-rect (atlas / tile UVs). texture may be null → solid. | |
| virtual void | drawTexturedRectShaderUV (Texture *texture, Shader *shader, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0 |
| UV draw with an explicit Shader (nullptr = default textured pipeline). | |
| virtual void | drawTexturedRectShaderUVRotated (Texture *texture, Shader *shader, float cx, float cy, float w, float h, float degrees, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0 |
UV draw rotated degrees clockwise (screen Y-down) around the rect center. texture may be null → solid. Shader nullptr = default textured pipeline. | |
| virtual void | drawTexturedRectShaderDepth (Texture *color, Texture *depth, Shader *shader, float x, float y, float w, float h, const Color &tint)=0 |
Fullscreen/post draw sampling color at binding 0 and depth at binding 1 (hardware D32, .r = Vulkan NDC z). depth may be null → color is bound twice. | |
| virtual void | drawTexturedRectLitUV (Texture *albedo, Texture *normal, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color)=0 |
| Lit 2D draw (albedo + normal map). Uses Lighting2DUBO from setLighting2D. normal may be null → treated as flat (0.5,0.5,1) only if a default normal tex exists. | |
| virtual void | setLighting2D (const Lighting2DUBO &ubo)=0 |
| Upload per-frame / per-canvas 2D lighting constants for subsequent lit draws. | |
| Quad * | newQuad (int x, int y, int w, int h) |
| Pixel-space atlas rect. Caller owns Quad* (not tracked by Graphics). | |
| virtual Mesh * | newMeshFromAssimp (const ::aiMesh &mesh)=0 |
| virtual Mesh * | newMeshFromAssimp (const ::aiMesh &mesh, const aiMatrix4x4 &worldTransform)=0 |
| Like newMeshFromAssimp, but bakes an Assimp node world transform into positions and transforms normals by the inverse-transpose of the upper 3x3. Required for hierarchical glTF/FBX scenes — raw aiMesh verts are in local space. | |
| virtual Mesh * | newMeshFromArrays (const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0 |
| Upload a triangle mesh from packed CPU arrays. Owned by Graphics. posXYZ required (vertexCount*3). nrmXYZ/uvST may be null (flat normal / zero UV). indices required (indexCount, triangles). | |
| virtual bool | updateMeshVertices (Mesh *mesh, const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0 |
| In-place update of a mesh's vertex/index data (CPU -> host-visible VBO). Mirrors bakeMeshMorph: the update synchronizes with in-flight GPU work, so prefer rebuilding only when content actually changes. The mesh's buffer is reused while it fits (stable GPU handle) and reallocated when the new size grows. Returns false when unsupported (WebGPU backend). posXYZ/nrmXYZ follow newMeshFromArrays layout (uvST may be null); indices/indexCount may be null/0 to keep the mesh's existing indices. | |
| virtual bool | bakeMeshMorph (Mesh *mesh)=0 |
| If mesh morph weights are dirty, bake blended positions and upload to the GPU VBO. Returns true when an upload happened. No-op when no morph data / not dirty / null. | |
| virtual Mesh * | newMeshSphere (int slices=32, int stacks=16)=0 |
| Procedural UV sphere (radius 1, Y-up). Owned by Graphics. slices = longitude divisions, stacks = latitude divisions. | |
| virtual Mesh * | newMeshCylinder (int slices=32, int stacks=1, bool caps=true)=0 |
| Procedural Y-up cylinder (radius 1, height 2 centered at origin). slices = longitude divisions; stacks = height bands; caps = include end discs. Owned by Graphics. | |
| Mesh * | newMeshCube (float size=1.f) |
Procedural cube (edge length size, centered at origin, outward CCW for RH Y-up), with per-face normals and a full 0..1 UV per face. Owned by Graphics. | |
| virtual bool | releaseMesh (Mesh *mesh) |
| Eagerly releases a mesh created by this Graphics. | |
| virtual void | render3D () |
| Run RenderSystem3D (begin3DFrame + draw visible Renderable3D). | |
| virtual void | renderScene3DToCanvas (Canvas *canvas, Camera3D *camera) |
| virtual void | setDirectionalLight (float dx, float dy, float dz, float r=1.f, float g=1.f, float b=1.f) |
| 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). virtual * 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) |
| virtual void | pushValidationScope ()=0 |
| Backend hooks so the platform-independent render3D() can wrap its work in a GPU validation error scope (used on WebGPU to catch early device errors). | |
| virtual void | popValidationScope ()=0 |
| Material * | newMaterial () |
| Create a Material asset (shading model + textures + PBR knobs). Caller owns Material*; not tracked by Graphics. | |
| RenderControl * | getRenderControl () |
| Shared compilable 3D render control (features → pass list + GBuffer). Owned by Graphics; valid for the module lifetime. | |
| virtual void | beginGBufferPass (int width, int height)=0 |
| Depth/normal(/albedo) fill pass for mid/post effects. One-shot submit (like shadow); call before begin3DFrame when enabled. After endGBufferPass, textures are available via getRenderControl()->getGBuffer(). | |
| virtual void | drawMeshGBuffer (Mesh *mesh, const glm::mat4 &mvp, const glm::mat4 &model, float nearZ, float farZ, Texture *albedo=nullptr, float tintR=1.f, float tintG=1.f, float tintB=1.f)=0 |
| virtual void | drawMeshGBufferAlpha (Mesh *mesh, const glm::mat4 &mvp, const glm::mat4 &model, float nearZ, float farZ, Texture *albedo=nullptr, float tintR=1.f, float tintG=1.f, float tintB=1.f)=0 |
| GBuffer fill with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): same outputs as drawMeshGBuffer, but transparent texels are discarded so depth/normal follow the silhouette. No-op on backends without the alpha pipeline (WebGPU). | |
| virtual void | endGBufferPass ()=0 |
| virtual void | begin3DFrame ()=0 |
| Begin a 3D frame: shadow/gbuffer (if pending) then a sampleable scene color pass (color+depth). Leaves the pass open for drawMesh and a following RenderSystem::render (2D). Does not present. flushToSwapchain resolves the scene color (FXAA when "aa" is on) into the swapchain, then draws 2D overlays. Soft-fails (no throw) when the swapchain cannot be acquired yet — check had3DThisFrame(). | |
| virtual void | begin3DFrameToCanvas (Canvas *canvas)=0 |
Open a 3D render pass targeting an offscreen Canvas (color + depth) at the canvas size. Uses setMesh3DViewProj/View/CameraPos/Env as the camera. Draw meshes with drawMeshShader, then call end3DFrameToCanvas(). The canvas texture then holds the rendered scene (e.g. a planar reflection). Unsupported if canvas is not an offscreen canvas (screen). | |
| virtual void | end3DFrameToCanvas ()=0 |
| virtual void | setMesh3DViewProj (const glm::mat4 &viewProj)=0 |
| virtual void | setMesh3DView (const glm::mat4 &view)=0 |
| Camera view matrix for subsequent drawMesh (view-space depth / CSM select). | |
| virtual void | setMesh3DClip (float nearZ, float farZ)=0 |
| Near/far used to pack linear depth into scene color A (SSGI). | |
| virtual Texture * | getSceneColorTexture () |
| Sampleable 3D color target for the current frame (RGB = lit, A = linear depth). Valid after begin3DFrame until present; nullptr when 3D did not run offscreen. | |
| virtual image::ImageData * | renderEntityIdMask (const std::vector< EntityIdDraw > &draws, const glm::mat4 &viewProj, int width, int height) |
| virtual image::ImageData * | readGBufferToImageData (const std::string &name) |
| Read a G-buffer attachment back to CPU as RGBA8. name is one of "depth" (RGBA8 linear depth), "normal" (world normal*0.5+0.5), "albedo". Valid only after a G-buffer or entity-ID offscreen pass filled it. Caller owns the returned ImageData*. Returns nullptr when unsupported. | |
| virtual void | drawMesh (Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint)=0 |
| Draw one mesh with model matrix. Requires begin3DFrame() (or an open swapchain pass). | |
| virtual void | drawMeshShader (Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint, Shader *shader)=0 |
| Draw mesh with an explicit Mesh3D Shader (nullptr = default PBR pipeline). | |
| virtual void | setMesh3DNormalTexture (Texture *normal)=0 |
| Optional normal map for the next drawMesh / drawMeshShader (nullptr = flat). | |
| virtual void | setMesh3DHeightTexture (Texture *height)=0 |
| Optional height map for parallax (R channel; nullptr = flat / off). | |
| virtual void | setMesh3DSceneDepth (Texture *depth)=0 |
| Optional scene hardware depth (G-buffer hwDepth, Vulkan NDC z) bound to mesh3d shader binding 7. X-ray mesh shaders sample it to discard visible (non-occluded) fragments. nullptr falls back to a placeholder. | |
| virtual void | setMesh3DMaterial (float metallic, float roughness)=0 |
| Metallic (0..1) and roughness (0..1) for the next default mesh draw. | |
| virtual void | setMesh3DTexCellBomb (float cellScale, float strength, float rotAmount=1.f)=0 |
| Texture cell bombing for the next default mesh draw (breaks tiling). cellScale: cells per UV unit (typical 2..16). strength: 0=off, 1=full. rotAmount: 0..1 per-cell rotation scale (default 1). | |
| virtual void | setMesh3DParallax (float scale, float minLayers=8.f, float maxLayers=32.f)=0 |
| Parallax occlusion mapping for the next default mesh draw. scale: UV displacement strength (0=off). Typical 0.02..0.08. minLayers / maxLayers: adaptive POM ray-march steps (more when glancing). | |
| virtual void | setMesh3DLighting (const Lighting3DPack &pack)=0 |
| Per-frame ambient + up to 8 lights packed into Mesh3DUBO. | |
| virtual void | setCloudShadows (float strength, float worldCell, float time, float windSpeed, float windAngle, float coverage, float detail)=0 |
| Dynamic cloud shadows cast on the ground by the default PBR mesh path. strength 0 disables (no change to rendering). time advances wind drift. Packed into Mesh3DUBO.cloud / cloudWind and consumed by mesh3d shaders. | |
| virtual void | setMesh3DClusteredLighting (const ClusteredLightingUpload &upload)=0 |
| Enable clustered forward path for subsequent default mesh draws (SSBO light lists). Pass upload.active=false (or empty) to disable and return to the ≤8 UBO path. | |
| virtual void | setMesh3DClusteredActive (bool active)=0 |
| Cheap per-draw toggle for the already-uploaded clustered light table. Unlike setMesh3DClusteredLighting it never re-uploads SSBO data, so the per-frame clustered build happens exactly once per camera. | |
| virtual void | setMesh3DLight (const glm::vec3 &dir, const glm::vec3 &color)=0 |
| Directional light for subsequent drawMesh calls (world-space direction toward surface). | |
| virtual void | setMesh3DCameraPos (const glm::vec3 &eye)=0 |
| Camera eye used by mesh shaders that need view/rim (stored in Mesh3DUBO). | |
| virtual void | drawVoxelFaceInstances (const uint32_t *packed, int count, float originX, float originY, float originZ, const std::string &faceDir, Texture *atlas, int tilesPerRow=16, const uint32_t *ao=nullptr)=0 |
| Instanced voxel face rectangles (32-bit packed instances). ao: optional per-instance ambient-occlusion words (2 bits per corner, 0..3, shader corner order); null → full bright. faceDir: "posX"|"negX"|"posY"|"negY"|"posZ"|"negZ" (also "+x"/"-x"/…). Requires begin3DFrame(); uses viewProj from setMesh3DViewProj. atlas may be null → white; tilesPerRow subdivides atlas for texture indices. | |
| virtual void | setMesh3DEnv (Texture *cube, float intensity)=0 |
| Specular IBL environment for subsequent default mesh draws. cube must be from newCubemap (or nullptr → black / intensity 0). intensity is packed into Mesh3DUBO lightColor.w. | |
| virtual void | setMesh3DShadows (const ShadowUpload &upload)=0 |
| Upload CSM constants for subsequent default mesh draws (active=false disables). | |
| virtual void | setMesh3DShadowReceive (bool receive)=0 |
| Per-draw: when false, shadow sampling is forced off for the next mesh draw. | |
| virtual void | beginShadowPass (int cascadeIndex)=0 |
| Depth-only shadow pass for one cascade layer (0..2). Draws are recorded into the next begin3DFrame command buffer (ping-pong map per frame slot). Call before begin3DFrame. | |
| virtual void | drawMeshShadow (Mesh *mesh, const glm::mat4 &lightMVP)=0 |
| virtual void | drawMeshShadowAlpha (Mesh *mesh, const glm::mat4 &lightMVP, Texture *albedo=nullptr)=0 |
Shadow pass draw with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): transparent texels of albedo are discarded so the slice casts a silhouette shadow instead of a solid quad. Requires an active shadow pass (beginShadowPass). No-op on backends without the alpha shadow pipeline (WebGPU). | |
| virtual void | endShadowPass ()=0 |
| bool | consumeFrameHad3D () |
| True after begin3DFrame until present completes. | |
| bool | had3DThisFrame () const |
| Color | getBackgroundColor () const |
| void | setBackgroundColor (const Color &c) |
| 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 |
| bool | saveFramePng (const std::string &path) |
Save the last presented frame to a PNG at path. Enables screen readback if needed. Returns false if no presented frame is available or encoding fails. | |
| virtual void | setVSync (bool enabled) |
| Prefer uncapped present (IMMEDIATE/MAILBOX) when false, vsync (MAILBOX/FIFO) when true. Takes effect on the next swapchain recreate. | |
| bool | isVSync () const |
| virtual void | setMsaaSamples (int samples) |
| Hardware MSAA sample count for the 3D scene color pass (0 disables, then 2/4/8 are used when the device supports them). 0 or 1 mean no MSAA. Takes effect on the next begin3DFrame. | |
| virtual int | getMsaaSamples () const |
| void | setActive (bool active) override |
| Pause/resume presenting (Android background / foreground). | |
| bool | isActive () const |
| virtual void | markSwapchainDirty () |
| Request swapchain recreation on next present/begin3DFrame. | |
| void | requestSurfaceRecreate () override |
| Request recreation of the platform render surface on the next frame (Android background/foreground destroys the native window). Safe to call from a non-render thread; the actual work happens on the render thread. | |
| virtual void | onNativeWindowDestroyed () |
| Called by the Window module when the native window backing the render surface is destroyed (window close / recreation). Backends that keep a platform surface tied to the native window must drop it here so the next initWithWindow() rebuilds it against a fresh window — even when SDL hands back the same pointer for the recreated window. | |
| void | clearPresentOverlay () |
| Drop the present overlay callback (window gone; re-register on UI init). | |
| void | addWindowDestroyedCallback (WindowDestroyedCallback cb, void *userdata) |
| void | setPresentOverlay (PresentOverlayFn fn, void *userdata) |
| PresentOverlayFn | getPresentOverlay () const |
| void * | getPresentOverlayUser () const |
| 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; virtual * codepoints outside it still advance in print() but aren't drawn. Caller owns Font* (not tracked by Graphics — unlike newTexture / newMesh / newShader handles, which Graphics owns). | |
| virtual void | setFont (Font *font) |
| Font used by subsequent print() calls; nullptr = none set. | |
| Font * | getFont () const |
| 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) |
Draws UTF-8 text with the current font (see setFont), baseline-aligned so that (x,y) is the top-left of the line. Throws if no font is set. | |
| virtual void | setShader (Shader *shader) |
| Custom fragment pipeline for subsequent textured 2D draws. | |
| virtual void | setShader () |
| Shader * | getShader () const |
| virtual Shader * | newShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0 |
| Create a custom 2D shader from SPIR-V words (vert + frag). Owned by Graphics. Vertex stage may be empty → uses the default textured vertex shader. | |
| virtual Shader * | newShaderFromSpvFile (const std::string &vertPath, const std::string &fragPath)=0 |
| Load SPIR-V from files via Filesystem (empty vertPath → default textured vert). | |
| Shader * | newShaderFromSpvFile (const std::string &fragPath) |
| virtual Shader * | newShader (const std::string &vertGlsl, const std::string &fragGlsl)=0 |
| Compile GLSL source with glslc (must be on PATH). Empty vertGlsl → default textured vert. Throws if compilation fails. | |
| Shader * | newShader (const std::string &fragGlsl) |
| virtual Shader * | newMeshShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0 |
| Create a Mesh3D custom shader (MeshVertex + Frame UBO + albedo). Empty vert → default mesh3d.vert. Owned by Graphics. | |
| virtual Shader * | newMeshShaderFromWgsl (const std::string &vertWgsl, const std::string &fragWgsl)=0 |
| Create a Mesh3D custom shader from WGSL source (WebGPU backend). The WGSL must declare the engine's Frame UBO (group 0 binding 0) and the shared mesh3d bindings (albedo 1, normal 2, env 3, shadow UBO 4, shadow depth 5, height 6, main sampler 7, shadow compare sampler 8, scene depth 9). Vulkan throws (uses SPIR-V via newMeshShaderFromSpv). | |
| virtual Shader * | newMeshShader (const std::string &vertGlsl, const std::string &fragGlsl)=0 |
| Shader * | newMeshShader (const std::string &fragGlsl) |
| virtual Shader * | newHairShaderFromSpv (const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv)=0 |
| Hair/fur card shader (alpha blend + Kajiya-Kay). Empty vert → mesh3d_hair.vert. Owned by Graphics. | |
| Shader * | newHairShader () |
| Built-in hair shader with default anisotropic parameters. | |
| virtual bool | releaseShader (Shader *shader) |
| Eagerly releases a shader created by this Graphics. | |
| Shader * | newGrassShader () |
| t3ssel8r-style grass billboard shader (alpha test + shadow two-tone). Owned by Graphics. See grass:: / GrassField. | |
| GrassField * | newGrassField () |
| Dense + sparse stylized grass field. Caller owns GrassField*; its Mesh / Shader / Texture are owned by Graphics. | |
| 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. | |
| virtual Canvas * | newCanvas (int width, int height)=0 |
| Create an offscreen render target (sampleable). Owned by Graphics. | |
| virtual void | setCanvas (Canvas *canvas)=0 |
| nullptr or this → screen. Switching flushes pending draws to the previous target. | |
| void | setCanvas () |
| virtual bool | isCanvasActive () const =0 |
| virtual Canvas * | getCanvas () const =0 |
| Volumetric * | newVolumetric () |
| Volumetric light + fog (screenspace / raymarch / fog). Caller owns Volumetric*; its Shaders are owned by Graphics. | |
| 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. | |
| 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 () |
| AntiAliasing * | pipelineAntiAliasing () |
| 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) |
| 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) |
| virtual void | drawOcclusionTexture (Texture *texture, float x, float y, float w, float h) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| void | pop () |
| const glm::mat4 & | getTransform () const |
| const glm::mat4 & | getProjection () const |
| void | rotate (float r) |
| void | scale (float x, float y=1.0f) |
| void | translate (float x, float y) |
| void | origin () |
| glm::vec2 | transformPoint (glm::vec2 point) |
| glm::vec2 | inverseTransformPoint (glm::vec2 point) |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
Public 成员函数 继承自 eve::graphics::Canvas | |
| Canvas () | |
| ~Canvas () override | |
| virtual Texture * | getTexture ()=0 |
| Sampleable color buffer; screen Canvas returns nullptr. | |
| virtual void | clear (std::optional< Color > color, std::optional< int > stencil, std::optional< double > depth)=0 |
| virtual Color | getPixel (int x, int y)=0 |
| virtual image::ImageData * | newImageData ()=0 |
| virtual void | draw (Canvas *C, const glm::mat4 &matrix) const =0 |
Public 成员函数 继承自 eve::graphics::Drawable | |
| virtual | ~Drawable () |
| virtual void | draw (Graphics *gfx, const glm::mat4 &matrix) const =0 |
| Draws the object with the specified transformation matrix. | |
| bool | getCastOcclusion () const |
| When false, skipped by Graphics::drawOcclusion / volumetric occluder passes. | |
| void | setCastOcclusion (bool cast) |
| 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 |
Public 成员函数 继承自 eve::graphics::IGraphics2D | |
| virtual | ~IGraphics2D ()=default |
Public 成员函数 继承自 eve::graphics::IGraphics3D | |
| virtual | ~IGraphics3D ()=default |
Public 成员函数 继承自 eve::graphics::IResourceFactory | |
| virtual | ~IResourceFactory ()=default |
Public 成员函数 继承自 eve::graphics::IPostFX | |
| virtual | ~IPostFX ()=default |
Protected 成员函数 | |
| Shader * | prepareSceneColorResolveShader (Texture *scene) |
| FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha). | |
Protected 属性 | |
| 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 |
| 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::unique_ptr< AmbientOcclusion > | pipelineAO_ |
| std::unique_ptr< GlobalIllumination > | pipelineGI_ |
| std::unique_ptr< AntiAliasing > | pipelineAA_ |
| std::unique_ptr< Outline > | pipelineOutline_ |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::IWindowSurfaceHost | |
| static constexpr const char * | capabilityName = "IWindowSurfaceHost" |
详细描述
在文件 Graphics.h 第 50 行定义.
成员类型定义说明
◆ PresentOverlayFn
| using eve::graphics::Graphics::PresentOverlayFn = void (*)(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*.
在文件 Graphics.h 第 672 行定义.
◆ WindowDestroyedCallback
| using eve::graphics::Graphics::WindowDestroyedCallback = void (*)(void *userdata) |
Register a callback invoked when the native window is destroyed. Used by the UI backend to tear down its ImGui context; callbacks are cleared (and invoked) on onNativeWindowDestroyed().
在文件 Graphics.h 第 663 行定义.
构造及析构函数说明
◆ Graphics()
| eve::graphics::Graphics::Graphics | ( | ) |
在文件 Graphics.cpp 第 97 行定义.
引用了 eve::cap::query() , 以及 eve::graphics::registerGraphicsCapabilities().
◆ ~Graphics()
|
override |
在文件 Graphics.cpp 第 106 行定义.
成员函数说明
◆ addWindowDestroyedCallback()
|
inline |
◆ arc() [1/2]
| void eve::graphics::Graphics::arc | ( | std::string | mode, |
| std::string | arcmode, | ||
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| float | angle1, | ||
| float | angle2 | ||
| ) |
◆ arc() [2/2]
| void eve::graphics::Graphics::arc | ( | std::string | mode, |
| std::string | arcmode, | ||
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| float | angle1, | ||
| float | angle2, | ||
| int | points | ||
| ) |
Draws an arc using the specified arguments.
- 参数
-
drawmode The mode of drawing (line/filled). arcmode The type of arc. x X-coordinate. y Y-coordinate. radius Radius of the arc. angle1 The angle at which the arc begins. angle2 The angle at which the arc terminates. points Number of points to use to draw the arc.
◆ bakeMeshMorph()
|
pure virtual |
If mesh morph weights are dirty, bake blended positions and upload to the GPU VBO. Returns true when an upload happened. No-op when no morph data / not dirty / null.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ begin3DFrame()
|
pure virtual |
Begin a 3D frame: shadow/gbuffer (if pending) then a sampleable scene color pass (color+depth). Leaves the pass open for drawMesh and a following RenderSystem::render (2D). Does not present. flushToSwapchain resolves the scene color (FXAA when "aa" is on) into the swapchain, then draws 2D overlays. Soft-fails (no throw) when the swapchain cannot be acquired yet — check had3DThisFrame().
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ begin3DFrameToCanvas()
|
pure virtual |
Open a 3D render pass targeting an offscreen Canvas (color + depth) at the canvas size. Uses setMesh3DViewProj/View/CameraPos/Env as the camera. Draw meshes with drawMeshShader, then call end3DFrameToCanvas(). The canvas texture then holds the rendered scene (e.g. a planar reflection). Unsupported if canvas is not an offscreen canvas (screen).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ beginGBufferPass()
|
pure virtual |
Depth/normal(/albedo) fill pass for mid/post effects. One-shot submit (like shadow); call before begin3DFrame when enabled. After endGBufferPass, textures are available via getRenderControl()->getGBuffer().
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ beginShadowPass()
|
pure virtual |
Depth-only shadow pass for one cascade layer (0..2). Draws are recorded into the next begin3DFrame command buffer (ping-pong map per frame slot). Call before begin3DFrame.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ circle() [1/2]
| void eve::graphics::Graphics::circle | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | radius | ||
| ) |
◆ circle() [2/2]
| void eve::graphics::Graphics::circle | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| int | points | ||
| ) |
Draws a circle using the specified arguments.
- 参数
-
mode The mode of drawing (line/filled). x X-coordinate. y Y-coordinate. radius Radius of the circle. points Number of points to use to draw the circle.
◆ clearPresentOverlay()
|
inline |
Drop the present overlay callback (window gone; re-register on UI init).
在文件 Graphics.h 第 653 行定义.
引用了 presentOverlayFn_ , 以及 presentOverlayUser_.
被这些函数引用 onNativeWindowDestroyed() , 以及 eve::graphics::vulkan::Graphics::onNativeWindowDestroyed().
◆ clearScreen()
|
virtual |
Script-friendly wrappers (r,g,b[,a] floats — no Color type in Squirrel).
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 865 行定义.
◆ consumeFrameHad3D()
|
inline |
◆ draw()
|
virtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 848 行定义.
引用了 eve::graphics::Drawable::draw() , 以及 m.
◆ drawCanvas()
|
inline |
在文件 Graphics.h 第 355 行定义.
引用了 drawCanvasRGBA(), h, w, x , 以及 y.
◆ drawCanvasRGBA()
|
virtual |
Draw a Canvas color buffer as a textured rect (same batch order as other 2D).
实现了 eve::graphics::IGraphics3D.
在文件 Graphics.cpp 第 160 行定义.
引用了 a, b, drawTexturedRect(), eve::graphics::Canvas::getTexture(), h, w, x , 以及 y.
被这些函数引用 drawCanvas().
◆ drawMesh()
|
pure virtual |
Draw one mesh with model matrix. Requires begin3DFrame() (or an open swapchain pass).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawMeshGBuffer()
◆ drawMeshGBufferAlpha()
|
pure virtual |
GBuffer fill with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): same outputs as drawMeshGBuffer, but transparent texels are discarded so depth/normal follow the silhouette. No-op on backends without the alpha pipeline (WebGPU).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawMeshShader()
|
pure virtual |
Draw mesh with an explicit Mesh3D Shader (nullptr = default PBR pipeline).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Water::draw(), eve::graphics::Waterfall::draw(), eve::graphics::GrassField::draw(), eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStack3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ drawMeshShadow()
|
pure virtual |
◆ drawMeshShadowAlpha()
|
pure virtual |
Shadow pass draw with alpha-cutout discard (card/billboard geometry such as sprite-stack slices): transparent texels of albedo are discarded so the slice casts a silhouette shadow instead of a solid quad. Requires an active shadow pass (beginShadowPass). No-op on backends without the alpha shadow pipeline (WebGPU).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawOcclusion()
|
virtual |
Volumetric occlusion helpers (shadow-pass analogue for light shafts). drawOcclusion skips drawables with castOcclusion=false.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 852 行定义.
引用了 eve::graphics::Drawable::drawOcclusion(), eve::graphics::Drawable::getCastOcclusion() , 以及 m.
◆ drawOcclusionSolid()
|
virtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 856 行定义.
引用了 drawSolidRect(), h, w, x , 以及 y.
被这些函数引用 eve::graphics::Volumetric::drawOccluders2D(), eve::graphics::Volumetric::drawOccluderSolid() , 以及 eve::graphics::Mesh::drawOcclusion().
◆ drawOcclusionTexture()
|
virtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 860 行定义.
引用了 drawTexturedRect(), h, w, x , 以及 y.
被这些函数引用 eve::graphics::Volumetric::drawOccluders2D(), eve::graphics::Volumetric::drawOccluderTexture() , 以及 eve::graphics::Texture::drawOcclusion().
◆ drawScene3D()
|
inline |
Script-friendly 4-arg form (simplesquirrel does not apply C++ defaults).
在文件 Graphics.h 第 348 行定义.
引用了 drawScene3DRGBA(), h, w, x , 以及 y.
◆ drawScene3DRGBA()
|
virtual |
Composite this frame's 3D scene color into a rect (screen or active Canvas). virtual * Call after render3D(); order vs drawSolidRect / drawTexturedRect is preserved. If never called, present() still blits the 3D scene fullscreen under 2D. RGB is blitted opaque (scene A is linear depth, not transparency).
实现了 eve::graphics::IGraphics3D.
在文件 Graphics.cpp 第 147 行定义.
引用了 a, b, drawTexturedRect(), drawTexturedRectShader(), getSceneColorTexture(), h, prepareSceneColorResolveShader(), w, x , 以及 y.
被这些函数引用 drawScene3D().
◆ drawSolidRect()
|
pure virtual |
Internal immediate-mode helper used by RenderSystem / Batcher.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Volumetric::beginOcclusionMap(), eve::physics::Cloth::draw(), eve::physics::Fluid::draw(), eve::buildingfx::BuildingFx::drawGrid2D(), eve::graphics::RenderSystem::drawItems(), drawOcclusionSolid(), eve::physics::DebugDraw::DrawSegment(), drawSolidRectRGBA(), eve::graphics::vulkan::Graphics::drawTexturedRectLitUV(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderDepth(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUV(), eve::graphics::vulkan::Graphics::drawTexturedRectShaderUVRotated() , 以及 eve::card::Zone::render().
◆ drawSolidRectRGBA()
|
virtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 869 行定义.
◆ drawSolidRectRotated()
|
pure virtual |
Rotated solid quad degrees clockwise (screen Y-down) around (cx, cy).
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawTexturedRect()
|
pure virtual |
Draw a textured quad (full UV 0..1). texture may be null → solid. Uses currentShader when set (or per-call override via drawTexturedRectShader).
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::StyleChain::apply(), drawCanvasRGBA(), drawOcclusionTexture(), drawScene3DRGBA() , 以及 drawTexturedRectRGBA().
◆ drawTexturedRectLitUV()
|
pure virtual |
Lit 2D draw (albedo + normal map). Uses Lighting2DUBO from setLighting2D. normal may be null → treated as flat (0.5,0.5,1) only if a default normal tex exists.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawTexturedRectRGBA()
|
virtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 873 行定义.
◆ drawTexturedRectShader()
|
pure virtual |
Draw with an explicit Shader (nullptr = default textured pipeline).
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::StylePass::apply(), drawScene3DRGBA() , 以及 eve::graphics::vulkan::Graphics::drawTexturedRectShaderDepth().
◆ drawTexturedRectShaderDepth()
|
pure virtual |
Fullscreen/post draw sampling color at binding 0 and depth at binding 1 (hardware D32, .r = Vulkan NDC z). depth may be null → color is bound twice.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Outline::apply(), eve::graphics::AmbientOcclusion::applyFromGBuffer() , 以及 eve::graphics::ScreenSpaceReflection::applyFromScene().
◆ drawTexturedRectShaderUV()
|
pure virtual |
UV draw with an explicit Shader (nullptr = default textured pipeline).
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem::drawItems(), eve::graphics::vulkan::Graphics::drawTexturedRectShader() , 以及 eve::graphics::vulkan::Graphics::drawTexturedRectUV().
◆ drawTexturedRectShaderUVRotated()
|
pure virtual |
UV draw rotated degrees clockwise (screen Y-down) around the rect center. texture may be null → solid. Shader nullptr = default textured pipeline.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ drawTexturedRectUV()
|
pure virtual |
Draw a textured sub-rect (atlas / tile UVs). texture may be null → solid.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::vulkan::Graphics::drawTexturedRect() , 以及 print().
◆ drawVoxelFaceInstances()
|
pure virtual |
Instanced voxel face rectangles (32-bit packed instances). ao: optional per-instance ambient-occlusion words (2 bits per corner, 0..3, shader corner order); null → full bright. faceDir: "posX"|"negX"|"posY"|"negY"|"posZ"|"negZ" (also "+x"/"-x"/…). Requires begin3DFrame(); uses viewProj from setMesh3DViewProj. atlas may be null → white; tilesPerRow subdivides atlas for texture indices.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ ellipse() [1/2]
| void eve::graphics::Graphics::ellipse | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | a, | ||
| float | b | ||
| ) |
◆ ellipse() [2/2]
| void eve::graphics::Graphics::ellipse | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | a, | ||
| float | b, | ||
| int | points | ||
| ) |
Draws an ellipse using the specified arguments.
- 参数
-
mode The mode of drawing (line/filled). x X-coordinate of center y Y-coordinate of center a Radius in x-direction b Radius in y-direction points Number of points to use to draw the circle.
◆ end3DFrameToCanvas()
|
pure virtual |
◆ endGBufferPass()
|
pure virtual |
◆ endShadowPass()
|
pure virtual |
◆ getBackendName()
|
pure virtual |
Renderer backend id used by sibling modules (e.g. Gpgpu).
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::createMeshShader().
◆ getBackgroundColor()
|
inline |
◆ getCanvas()
|
pure virtual |
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Outline::apply(), eve::stylize::StylePass::apply(), eve::stylize::StyleChain::apply(), eve::graphics::Volumetric::applyFogTo(), eve::graphics::AmbientOcclusion::applyFromDepthTo(), eve::graphics::GlobalIllumination::applyFromDepthTo(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::ScreenSpaceReflection::applyFromScene(), eve::graphics::Volumetric::applyFromSceneTo(), eve::graphics::ScreenSpaceReflection::applyFromSceneTo(), eve::graphics::AmbientOcclusion::applyOverlayTo(), eve::graphics::Outline::applyTo(), eve::graphics::AntiAliasing::applyTo(), eve::stylize::StylePass::applyTo(), eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::AmbientOcclusion::blurTo(), eve::graphics::AmbientOcclusion::computeTo(), eve::graphics::Volumetric::rayMarchTo() , 以及 eve::graphics::Volumetric::scatterTo().
◆ getCurrentDPIScale()
|
inline |
◆ getFont()
|
inlinevirtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.h 第 691 行定义.
引用了 currentFont.
被这些函数引用 eve::card::printCentered(), eve::card::Zone::render(), eve::card::renderCard(), eve::card::renderCardBack() , 以及 eve::card::Card::renderDeck().
◆ getHeight()
|
inlinevirtual |
在文件 Graphics.h 第 118 行定义.
引用了 height.
被这些函数引用 eve::graphics::Outline::apply(), eve::stylize::StylePass::apply(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::ScreenSpaceReflection::applyFromScene(), eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::RenderSystem::drawItems(), eve::graphics::ScreenSpaceReflection::getReflectionCanvas(), eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render() , 以及 eve::spritestack::SpriteStack3D::render().
◆ getMaxAnisotropy()
|
pure virtual |
Device max supported anisotropy (1 if unsupported). Valid after initWithWindow.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ getMsaaSamples()
|
inlinevirtual |
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 613 行定义.
引用了 msaaSamples.
◆ getPixelHeight()
|
inline |
◆ getPixelWidth()
|
inline |
◆ getPresentOverlay()
|
inline |
在文件 Graphics.h 第 677 行定义.
引用了 presentOverlayFn_.
◆ getPresentOverlayUser()
|
inline |
◆ getProjection()
| const glm::mat4 & eve::graphics::Graphics::getProjection | ( | ) | const |
◆ getRenderControl()
| RenderControl * eve::graphics::Graphics::getRenderControl | ( | ) |
Shared compilable 3D render control (features → pass list + GBuffer). Owned by Graphics; valid for the module lifetime.
在文件 Graphics.cpp 第 173 行定义.
引用了 renderControl_.
◆ getSceneColorTexture()
|
inlinevirtual |
Sampleable 3D color target for the current frame (RGB = lit, A = linear depth). Valid after begin3DFrame until present; nullptr when 3D did not run offscreen.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 432 行定义.
被这些函数引用 drawScene3DRGBA().
◆ getScreenDPIScale()
|
inline |
在文件 Graphics.h 第 125 行定义.
引用了 getCurrentDPIScale().
◆ getShader()
|
inlinevirtual |
◆ getTransform()
| const glm::mat4 & eve::graphics::Graphics::getTransform | ( | ) | const |
◆ getWidth()
|
inlinevirtual |
在文件 Graphics.h 第 117 行定义.
引用了 width.
被这些函数引用 eve::graphics::Outline::apply(), eve::stylize::StylePass::apply(), eve::graphics::AmbientOcclusion::applyFromGBuffer(), eve::graphics::ScreenSpaceReflection::applyFromScene(), eve::graphics::Volumetric::beginOcclusionMap(), eve::graphics::RenderSystem::drawItems(), eve::graphics::ScreenSpaceReflection::getReflectionCanvas(), eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render() , 以及 eve::spritestack::SpriteStack3D::render().
◆ had3DThisFrame()
|
inline |
◆ initWithWindow()
|
pure virtual |
Bind to an existing native window (SDL_Window*) and create Vulkan device/swapchain. Must be called after the window exists (SDL_WINDOW_VULKAN).
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ inverseTransformPoint()
| glm::vec2 eve::graphics::Graphics::inverseTransformPoint | ( | glm::vec2 | point | ) |
◆ isActive()
|
inline |
◆ isCanvasActive()
|
pure virtual |
◆ isScreenReadbackEnabled()
|
inline |
在文件 Graphics.h 第 592 行定义.
◆ isVSync()
|
inline |
在文件 Graphics.h 第 605 行定义.
引用了 vsyncEnabled.
◆ markSwapchainDirty()
|
inlinevirtual |
Request swapchain recreation on next present/begin3DFrame.
在文件 Graphics.h 第 624 行定义.
被这些函数引用 setActive().
◆ Module_REG()
| eve::graphics::Graphics::Module_REG | ( | Graphics | ) |
◆ newAmbientOcclusion()
|
virtual |
Screen-space ambient occlusion (ssao / hbao / gtao). Caller owns AmbientOcclusion*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 751 行定义.
◆ newAntiAliasing()
|
virtual |
Classic image-space AA (FXAA / SMAA / SSAA / NFAA). Caller owns AntiAliasing*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 779 行定义.
◆ newCanvas()
|
pure virtual |
Create an offscreen render target (sampleable). Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::ScreenSpaceReflection::getReflectionCanvas().
◆ newCubemap() [1/2]
|
pure virtual |
Create an RGBA8 cubemap from 6 faces packed as +X,-X,+Y,-Y,+Z,-Z (each faceSize×faceSize, total bytes = faceSize²×4×6). Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::vulkan::Graphics::newCubemap() , 以及 eve::daynight::DayNight::update().
◆ newCubemap() [2/2]
|
pure virtual |
Cubemap with mipmap / sampler options (IBL-friendly when generateMipmaps=true).
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newFont()
|
virtual |
Build a GPU font (glyph atlas texture) from decoded font data. Rasterizes charset (UTF-8, default: printable ASCII) up front; virtual * codepoints outside it still advance in print() but aren't drawn. Caller owns Font* (not tracked by Graphics — unlike newTexture / newMesh / newShader handles, which Graphics owns).
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 934 行定义.
引用了 data.
◆ newGlobalIllumination()
|
virtual |
Screen-space single-bounce GI. Caller owns GlobalIllumination*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 755 行定义.
◆ newGrassField()
|
virtual |
◆ newGrassShader()
|
virtual |
t3ssel8r-style grass billboard shader (alpha test + shadow two-tone). Owned by Graphics. See grass:: / GrassField.
在文件 Graphics.cpp 第 783 行定义.
◆ newHairShader()
| Shader * eve::graphics::Graphics::newHairShader | ( | ) |
Built-in hair shader with default anisotropic parameters.
在文件 Graphics.cpp 第 781 行定义.
◆ newHairShaderFromSpv()
|
pure virtual |
Hair/fur card shader (alpha blend + Kajiya-Kay). Empty vert → mesh3d_hair.vert. Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::hair::createShader().
◆ newMaterial()
| Material * eve::graphics::Graphics::newMaterial | ( | ) |
Create a Material asset (shading model + textures + PBR knobs). Caller owns Material*; not tracked by Graphics.
在文件 Graphics.cpp 第 171 行定义.
被这些函数引用 eve::weather::Weather::init().
◆ newMeshCube()
Procedural cube (edge length size, centered at origin, outward CCW for RH Y-up), with per-face normals and a full 0..1 UV per face. Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 790 行定义.
引用了 c, f, h, newMeshFromArrays() , 以及 pos.
◆ newMeshCylinder()
|
pure virtual |
Procedural Y-up cylinder (radius 1, height 2 centered at origin). slices = longitude divisions; stacks = height bands; caps = include end discs. Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newMeshFromArrays()
|
pure virtual |
Upload a triangle mesh from packed CPU arrays. Owned by Graphics. posXYZ required (vertexCount*3). nrmXYZ/uvST may be null (flat normal / zero UV). indices required (indexCount, triangles).
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::GrassField::bake(), eve::graphics::Water::createPlane(), eve::graphics::Waterfall::createSheet(), eve::procgen::Procgen::generateMesh() , 以及 newMeshCube().
◆ newMeshFromAssimp() [1/2]
|
pure virtual |
Upload triangulated mesh from Assimp (pos/normal/uv + indices). Owned by Graphics. Also captures Assimp morph targets (aiAnimMesh) into Mesh CPU morph data when present.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newMeshFromAssimp() [2/2]
|
pure virtual |
Like newMeshFromAssimp, but bakes an Assimp node world transform into positions and transforms normals by the inverse-transpose of the upper 3x3. Required for hierarchical glTF/FBX scenes — raw aiMesh verts are in local space.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newMeshShader() [1/2]
|
inline |
在文件 Graphics.h 第 741 行定义.
引用了 newMeshShader().
◆ newMeshShader() [2/2]
|
pure virtual |
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 newMeshShader().
◆ newMeshShaderFromSpv()
|
pure virtual |
Create a Mesh3D custom shader (MeshVertex + Frame UBO + albedo). Empty vert → default mesh3d.vert. Owned by Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::createMeshShader(), eve::graphics::grass::createShader(), eve::weather::Weather::init(), eve::graphics::vulkan::Graphics::newMeshShader(), eve::graphics::newWaterfallShader() , 以及 eve::graphics::newWaterShader().
◆ newMeshShaderFromWgsl()
|
pure virtual |
Create a Mesh3D custom shader from WGSL source (WebGPU backend). The WGSL must declare the engine's Frame UBO (group 0 binding 0) and the shared mesh3d bindings (albedo 1, normal 2, env 3, shadow UBO 4, shadow depth 5, height 6, main sampler 7, shadow compare sampler 8, scene depth 9). Vulkan throws (uses SPIR-V via newMeshShaderFromSpv).
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::createMeshShader().
◆ newMeshSphere()
|
pure virtual |
Procedural UV sphere (radius 1, Y-up). Owned by Graphics. slices = longitude divisions, stacks = latitude divisions.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newOutline()
|
virtual |
Screen-space model outline (t3ssel8r-style) from GBuffer depth + normal. Caller owns Outline*; its Shader is owned by Graphics.
在文件 Graphics.cpp 第 753 行定义.
◆ newQuad()
| Quad * eve::graphics::Graphics::newQuad | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
◆ newScreenSpaceReflection()
|
virtual |
Screen-space reflections (ray-marched over scene color + hw depth). Caller owns ScreenSpaceReflection*; its Shader is owned by Graphics.
在文件 Graphics.cpp 第 757 行定义.
◆ newShader() [1/2]
|
inline |
◆ newShader() [2/2]
|
pure virtual |
Compile GLSL source with glslc (must be on PATH). Empty vertGlsl → default textured vert. Throws if compilation fails.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newShaderFromSpv()
|
pure virtual |
Create a custom 2D shader from SPIR-V words (vert + frag). Owned by Graphics. Vertex stage may be empty → uses the default textured vertex shader.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::createPostShader(), eve::graphics::vulkan::Graphics::newShader() , 以及 eve::graphics::vulkan::Graphics::newShaderFromSpvFile().
◆ newShaderFromSpvFile() [1/2]
|
inline |
在文件 Graphics.h 第 714 行定义.
◆ newShaderFromSpvFile() [2/2]
|
pure virtual |
Load SPIR-V from files via Filesystem (empty vertPath → default textured vert).
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 newShaderFromSpvFile().
◆ newTexture() [1/4]
|
pure virtual |
Create texture from ImageData (RGBA8 required for now).
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newTexture() [2/4]
|
pure virtual |
Create texture from ImageData with sampler / mipmap options.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newTexture() [3/4]
|
pure virtual |
Create RGBA8 texture from CPU pixels (size = width*height*4). Borrowed handle: Graphics owns the texture (freed at shutdown or via releaseTexture); callers must not delete it.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::map::Fov::buildMaskTextureSlice(), eve::graphics::grass::createSwayAtlas(), eve::graphics::grass::createSwayAtlasFromFiles(), eve::graphics::Font::Font(), eve::procgen::Procgen::generateTexture(), eve::weather::Weather::init(), eve::graphics::AmbientOcclusion::newLinearDepthTexture(), eve::graphics::Volumetric::newLinearDepthTexture(), eve::demo::Demo::newPlanetTexture(), eve::graphics::vulkan::Graphics::newTexture(), eve::graphics::vulkan::Graphics::newTexture(), eve::graphics::vulkan::Graphics::newTexture(), eve::graphics::vulkan::Graphics::newTextureFromFile(), newTextureFromImageData() , 以及 newTextureFromImageData().
◆ newTexture() [4/4]
|
pure virtual |
Create RGBA8 texture with explicit sampler / mipmap options. Borrowed handle: Graphics owns the texture (freed at shutdown or via releaseTexture); callers must not delete it.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newTextureFromFile()
|
pure virtual |
Load file via Filesystem + Image decode, then upload (RGBA8). Throws on failure. Same path returns the same Texture* and reloads pixels in place on repeat calls.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ newTextureFromFileRepeated()
|
virtual |
Load a texture from disk with wrap/repeat sampling (for tiling structures). Non-virtual helper (same pattern as newTextureFromImageData); reads + decodes via Filesystem/Image then uploads with the requested repeat modes.
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 893 行定义.
引用了 data, newTextureFromImageData(), repeatU , 以及 repeatV.
◆ newTextureFromImageData() [1/2]
|
virtual |
Upload RGBA8 ImageData; optional seamless repeat on U/V. Borrowed handle: Graphics owns the texture (freed at shutdown or via releaseTexture); callers must not delete it.
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 878 行定义.
引用了 data, newTexture(), eve::graphics::TextureSampler::repeatU, repeatU, eve::graphics::TextureSampler::repeatV, repeatV , 以及 eve::graphics::TextureCreateInfo::sampler.
被这些函数引用 newTextureFromFileRepeated(), newTextureWithSampler() , 以及 eve::spritestack::SpriteStack3D::setLayerImage().
◆ newTextureFromImageData() [2/2]
|
virtual |
Upload RGBA8 ImageData with mipmaps / filter / anisotropy options.
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 887 行定义.
引用了 data , 以及 newTexture().
◆ newTextureWithSampler()
|
virtual |
Script-friendly texture create: filter = "linear"|"nearest", mipmap = "none"|"linear"|"nearest". generateMipmaps builds a full mip chain; maxAnisotropy > 1 enables anisotropic filtering.
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 903 行定义.
引用了 data, eve::graphics::Disabled, filter, eve::graphics::TextureCreateInfo::generateMipmaps, eve::graphics::Linear, eve::graphics::TextureSampler::lodBias, eve::graphics::TextureSampler::mag, eve::graphics::TextureSampler::maxAnisotropy, eve::graphics::TextureSampler::min, eve::graphics::TextureSampler::mipmap, mipmap, newTextureFromImageData(), eve::graphics::TextureSampler::parseFilter(), eve::graphics::TextureSampler::parseMipmap(), eve::graphics::TextureSampler::repeatU, repeatU, eve::graphics::TextureSampler::repeatV, repeatV , 以及 eve::graphics::TextureCreateInfo::sampler.
◆ newVolumetric()
|
virtual |
Volumetric light + fog (screenspace / raymarch / fog). Caller owns Volumetric*; its Shaders are owned by Graphics.
在文件 Graphics.cpp 第 749 行定义.
◆ newWater()
|
virtual |
Dynamic water surface (sky reflection + animated edge waves + middle drop ripples). Caller owns Water*; its Mesh / Shader are owned by Graphics.
在文件 Graphics.cpp 第 788 行定义.
◆ newWaterfall()
|
virtual |
Flowing waterfall (falling water sheet) with sky reflection, downward velocity streaks and animated foam at the top lip and bottom splash pool. Caller owns Waterfall*; its Mesh / Shader are owned by Graphics.
在文件 Graphics.cpp 第 787 行定义.
◆ onNativeWindowDestroyed()
|
inlinevirtual |
Called by the Window module when the native window backing the render surface is destroyed (window close / recreation). Backends that keep a platform surface tied to the native window must drop it here so the next initWithWindow() rebuilds it against a fresh window — even when SDL hands back the same pointer for the recreated window.
The present overlay is bound to the destroyed window, so it is also dropped here: a stale ImGui callback would otherwise keep drawing into later presents of unrelated windows. Registered window-destroyed callbacks (e.g. the UI backend's ImGui teardown) fire first so they can release their ImGui context while the surface is still valid.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 646 行定义.
◆ origin()
| void eve::graphics::Graphics::origin | ( | ) |
◆ pipelineAmbientOcclusion()
|
virtual |
Pipeline-owned AO / GI / AA used by RenderSystem3D when features "ao" / "gi" / "aa" are enabled. Created on first use; Graphics owns them.
在文件 Graphics.cpp 第 759 行定义.
引用了 pipelineAO_.
◆ pipelineAntiAliasing()
|
virtual |
◆ pipelineGlobalIllumination()
|
virtual |
◆ pipelineOutline()
|
virtual |
Pipeline-owned Outline used by RenderSystem3D when the "outline" feature is on.
在文件 Graphics.cpp 第 774 行定义.
引用了 pipelineOutline_.
◆ points()
| void eve::graphics::Graphics::points | ( | const std::vector< glm::vec2 > & | positions, |
| const std::vector< Color > & | colors | ||
| ) |
Draws a series of points at the specified positions.
◆ polygon()
| void eve::graphics::Graphics::polygon | ( | std::string | mode, |
| const std::vector< glm::vec2 > & | vertices, | ||
| bool | skipLastFilledVertex = true |
||
| ) |
Draws a polygon with an arbitrary number of vertices.
- 参数
-
mode The type of drawing (line/filled). coords Vertex positions. count Vertex array size.
◆ polyline()
| void eve::graphics::Graphics::polyline | ( | const glm::mat4 * | vertices, |
| size_t | count | ||
| ) |
Draws a series of lines connecting the given vertices.
- 参数
-
coords Vertex positions (v1, ..., vn). If v1 == vn the line will be drawn closed. count Number of vertices.
◆ pop()
| void eve::graphics::Graphics::pop | ( | ) |
◆ popValidationScope()
|
pure virtual |
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 render3D().
◆ prepareSceneColorResolveShader()
FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha).
在文件 Graphics.cpp 第 131 行定义.
引用了 eve::graphics::AntiAliasing::getShader(), pipelineAntiAliasing(), eve::graphics::AntiAliasing::prepareSource(), renderControl_, eve::graphics::AntiAliasing::setFloat(), eve::graphics::AntiAliasing::setMode() , 以及 eve::graphics::AntiAliasing::setQuality().
被这些函数引用 drawScene3DRGBA().
◆ present()
|
pure virtual |
◆ print()
|
virtual |
Draws UTF-8 text with the current font (see setFont), baseline-aligned so that (x,y) is the top-left of the line. Throws if no font is set.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 936 行定义.
引用了 color, currentFont, data, drawTexturedRectUV(), eve::graphics::Font::findGlyph(), eve::graphics::Font::getBaseline(), eve::graphics::Font::getData(), eve::graphics::Font::getTexture(), eve::graphics::nextCodepointUtf8(), eve::debug::rtBind(), eve::debug::rtDraw(), scale, x , 以及 y.
被这些函数引用 eve::card::printCentered().
◆ push()
| void eve::graphics::Graphics::push | ( | bool | all | ) |
◆ pushValidationScope()
|
pure virtual |
Backend hooks so the platform-independent render3D() can wrap its work in a GPU validation error scope (used on WebGPU to catch early device errors).
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 render3D().
◆ readGBufferToImageData()
|
inlinevirtual |
Read a G-buffer attachment back to CPU as RGBA8. name is one of "depth" (RGBA8 linear depth), "normal" (world normal*0.5+0.5), "albedo". Valid only after a G-buffer or entity-ID offscreen pass filled it. Caller owns the returned ImageData*. Returns nullptr when unsupported.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 461 行定义.
引用了 name.
◆ rectangle() [1/3]
| void eve::graphics::Graphics::rectangle | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
Draws a rectangle.
- 参数
-
x Position along x-axis for top-left corner. y Position along y-axis for top-left corner. w The width of the rectangle. h The height of the rectangle.
◆ rectangle() [2/3]
| void eve::graphics::Graphics::rectangle | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h, | ||
| float | rx, | ||
| float | ry | ||
| ) |
◆ rectangle() [3/3]
| void eve::graphics::Graphics::rectangle | ( | std::string | mode, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h, | ||
| float | rx, | ||
| float | ry, | ||
| int | points | ||
| ) |
Variant of rectangle that draws a rounded rectangle.
- 参数
-
mode The mode of drawing (line/filled). x X-coordinate of top-left corner y Y-coordinate of top-left corner w The width of the rectangle. h The height of the rectangle. rx The radius of the corners on the x axis ry The radius of the corners on the y axis points The number of points to use per corner
◆ releaseMesh()
|
inlinevirtual |
Eagerly releases a mesh created by this Graphics.
Mirrors releaseTexture: the returned handle is borrowed, a successful release frees the GPU buffers, detaches the handle (gpuHandle becomes null) and transfers the CPU facade to the caller for deletion.
- 参数
-
mesh Handle returned by a previous create call (may be null).
- 返回
- true when released; false for null, foreign or already-released handles.
实现了 eve::graphics::IResourceFactory.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 324 行定义.
引用了 mesh.
◆ releaseShader()
|
inlinevirtual |
Eagerly releases a shader created by this Graphics.
Mirrors releaseTexture: the returned handle is borrowed, a successful release destroys the GPU pipelines, detaches the handle (gpuHandle becomes null) and transfers the CPU facade to the caller for deletion. Only call this on shaders you created yourself; shaders owned by Graphics pipeline objects (AA / AO / GI / grass / ...) are still reachable through their owning objects and must not be released.
- 参数
-
shader Handle returned by a previous create call (may be null).
- 返回
- true when released; false for null, foreign or already-released handles.
实现了 eve::graphics::IResourceFactory.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 768 行定义.
引用了 shader.
◆ releaseTexture()
|
inlinevirtual |
Eagerly releases a texture created by this Graphics.
All newTexture* / newCubemap results are borrowed handles: the Graphics backend owns both the CPU facade and the GPU resource, and the handle must not be deleted directly. A successful release frees the GPU resource (after in-flight frames drain), detaches the handle (gpuHandle becomes null) and transfers the CPU facade to the caller, who may then delete it. Renderer-owned fallback textures (white / flat-normal / environment) and resources created by another Graphics are never released here.
- 参数
-
texture Handle returned by a previous create call (may be null).
- 返回
- true when released; false for null, foreign, internal or already-released handles.
实现了 eve::graphics::IResourceFactory.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 200 行定义.
◆ reloadTextureFromFile()
|
pure virtual |
Reload a path-cached texture from disk in place (pointer stable). False if unbound.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ render3D()
|
virtual |
Run RenderSystem3D (begin3DFrame + draw visible Renderable3D).
实现了 eve::graphics::IGraphics3D.
在文件 Graphics.cpp 第 117 行定义.
引用了 popValidationScope(), pushValidationScope(), recordingEngine3D_, eve::graphics::RenderSystem3D::render(), eve::debug::rtFrameBegin() , 以及 eve::debug::rtFrameEnd().
◆ renderEntityIdMask()
|
inlinevirtual |
在文件 Graphics.h 第 446 行定义.
◆ renderScene3DToCanvas()
Preview-quality 3D pass into an offscreen Canvas (editor viewport): renders visible Renderable3D with camera into canvas, whose texture can then be shown inside a UI Viewport widget. See RenderSystem3D::renderToCanvas.
实现了 eve::graphics::IGraphics3D.
在文件 Graphics.cpp 第 127 行定义.
◆ requestSurfaceRecreate()
|
inlineoverridevirtual |
Request recreation of the platform render surface on the next frame (Android background/foreground destroys the native window). Safe to call from a non-render thread; the actual work happens on the render thread.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 631 行定义.
◆ reset()
|
virtual |
Resets the current color, background color, line style, and so forth.
在文件 Graphics.cpp 第 740 行定义.
引用了 currentFont , 以及 currentShader.
◆ rotate()
| void eve::graphics::Graphics::rotate | ( | float | r | ) |
◆ saveFramePng()
| bool eve::graphics::Graphics::saveFramePng | ( | const std::string & | path | ) |
Save the last presented frame to a PNG at path. Enables screen readback if needed. Returns false if no presented frame is available or encoding fails.
在文件 Graphics.cpp 第 828 行定义.
引用了 eve::graphics::Canvas::newImageData(), screenReadbackEnabled , 以及 setScreenReadbackEnabled().
◆ scale()
| void eve::graphics::Graphics::scale | ( | float | x, |
| float | y = 1.0f |
||
| ) |
◆ setActive()
|
inlineoverridevirtual |
Pause/resume presenting (Android background / foreground).
在文件 Graphics.h 第 616 行定义.
引用了 active, graphicsActive , 以及 markSwapchainDirty().
◆ setBackgroundColor()
|
inline |
◆ setBackgroundColorRGBA()
|
virtual |
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 867 行定义.
引用了 a, b , 以及 setBackgroundColor().
被这些函数引用 eve::daynight::DayNight::update() , 以及 eve::weather::Weather::update().
◆ setCanvas() [1/2]
|
inline |
◆ setCanvas() [2/2]
|
pure virtual |
nullptr or this → screen. Switching flushes pending draws to the previous target.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::stylize::StyleChain::apply(), eve::graphics::Volumetric::applyFogTo(), eve::graphics::AmbientOcclusion::applyFromDepthTo(), eve::graphics::GlobalIllumination::applyFromDepthTo(), eve::graphics::Volumetric::applyFromSceneTo(), eve::graphics::ScreenSpaceReflection::applyFromSceneTo(), eve::graphics::AmbientOcclusion::applyOverlayTo(), eve::graphics::Outline::applyTo(), eve::graphics::AntiAliasing::applyTo(), eve::stylize::StylePass::applyTo(), eve::graphics::AmbientOcclusion::blurTo(), eve::graphics::AmbientOcclusion::computeTo(), eve::graphics::RenderSystem::drawItems(), eve::graphics::Volumetric::rayMarchTo(), eve::particles::ParticleRenderSystem::render() , 以及 eve::graphics::Volumetric::scatterTo().
◆ setCloudShadows()
|
pure virtual |
Dynamic cloud shadows cast on the ground by the default PBR mesh path. strength 0 disables (no change to rendering). time advances wind drift. Packed into Mesh3DUBO.cloud / cloudWind and consumed by mesh3d shaders.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setDirectionalLight()
|
virtual |
实现了 eve::graphics::IGraphics3D.
在文件 Graphics.cpp 第 167 行定义.
引用了 b , 以及 eve::graphics::RenderSystem3D::setDirectionalLight().
被这些函数引用 eve::daynight::DayNight::update() , 以及 eve::weather::Weather::update().
◆ setFont()
|
inlinevirtual |
Font used by subsequent print() calls; nullptr = none set.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.h 第 690 行定义.
引用了 currentFont.
◆ setLighting2D()
|
pure virtual |
Upload per-frame / per-canvas 2D lighting constants for subsequent lit draws.
实现了 eve::graphics::IGraphics2D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setMesh3DCameraPos()
|
pure virtual |
Camera eye used by mesh shaders that need view/rim (stored in Mesh3DUBO).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render(), eve::spritestack::SpriteStack3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DClip()
|
pure virtual |
Near/far used to pack linear depth into scene color A (SSGI).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render(), eve::spritestack::SpriteStack3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DClusteredActive()
|
pure virtual |
Cheap per-draw toggle for the already-uploaded clustered light table. Unlike setMesh3DClusteredLighting it never re-uploads SSBO data, so the per-frame clustered build happens exactly once per camera.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind() , 以及 eve::graphics::RenderSystem3D::render().
◆ setMesh3DClusteredLighting()
|
pure virtual |
Enable clustered forward path for subsequent default mesh draws (SSBO light lists). Pass upload.active=false (or empty) to disable and return to the ≤8 UBO path.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DEnv()
|
pure virtual |
Specular IBL environment for subsequent default mesh draws. cube must be from newCubemap (or nullptr → black / intensity 0). intensity is packed into Mesh3DUBO lightColor.w.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render(), eve::spritestack::SpriteStack3D::render(), eve::graphics::RenderSystem3D::renderToCanvas() , 以及 eve::daynight::DayNight::update().
◆ setMesh3DHeightTexture()
|
pure virtual |
Optional height map for parallax (R channel; nullptr = flat / off).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DLight()
|
pure virtual |
Directional light for subsequent drawMesh calls (world-space direction toward surface).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setMesh3DLighting()
|
pure virtual |
Per-frame ambient + up to 8 lights packed into Mesh3DUBO.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DMaterial()
|
pure virtual |
Metallic (0..1) and roughness (0..1) for the next default mesh draw.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DNormalTexture()
|
pure virtual |
Optional normal map for the next drawMesh / drawMeshShader (nullptr = flat).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DParallax()
|
pure virtual |
Parallax occlusion mapping for the next default mesh draw. scale: UV displacement strength (0=off). Typical 0.02..0.08. minLayers / maxLayers: adaptive POM ray-march steps (more when glancing).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DSceneDepth()
|
pure virtual |
Optional scene hardware depth (G-buffer hwDepth, Vulkan NDC z) bound to mesh3d shader binding 7. X-ray mesh shaders sample it to discard visible (non-occluded) fragments. nullptr falls back to a placeholder.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setMesh3DShadowReceive()
|
pure virtual |
Per-draw: when false, shadow sampling is forced off for the next mesh draw.
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DShadows()
|
pure virtual |
Upload CSM constants for subsequent default mesh draws (active=false disables).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DTexCellBomb()
|
pure virtual |
Texture cell bombing for the next default mesh draw (breaks tiling). cellScale: cells per UV unit (typical 2..16). strength: 0=off, 1=full. rotAmount: 0..1 per-cell rotation scale (default 1).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::Material::bind(), eve::graphics::RenderSystem3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DView()
|
pure virtual |
Camera view matrix for subsequent drawMesh (view-space depth / CSM select).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render(), eve::spritestack::SpriteStack3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMesh3DViewProj()
|
pure virtual |
viewProj used by subsequent drawMesh (mvp = viewProj * model). Expect RH + ZO with Vulkan NDC Y (see perspectiveVulkanRH_ZO).
实现了 eve::graphics::IGraphics3D.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 eve::graphics::RenderSystem3D::render(), eve::spritestack::SpriteStackBatch::render(), eve::spritestack::SpriteStack3D::render() , 以及 eve::graphics::RenderSystem3D::renderToCanvas().
◆ setMsaaSamples()
|
inlinevirtual |
Hardware MSAA sample count for the 3D scene color pass (0 disables, then 2/4/8 are used when the device supports them). 0 or 1 mean no MSAA. Takes effect on the next begin3DFrame.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 612 行定义.
引用了 msaaSamples.
◆ setPresentOverlay()
|
inline |
在文件 Graphics.h 第 673 行定义.
引用了 fn, presentOverlayFn_ , 以及 presentOverlayUser_.
被这些函数引用 eve::ui::ImGuiBackend::init() , 以及 eve::ui::ImGuiBackend::shutdown().
◆ setScreenReadbackEnabled()
|
inlinevirtual |
When true, each present copies the swapchain to a CPU buffer for getPixel/newImageData. Default false — full-frame readback is expensive; enable only for tests / tools.
被 eve::graphics::vulkan::Graphics 重载.
在文件 Graphics.h 第 591 行定义.
引用了 enabled , 以及 screenReadbackEnabled.
被这些函数引用 saveFramePng() , 以及 eve::graphics::vulkan::Graphics::setScreenReadbackEnabled().
◆ setShader() [1/2]
|
virtual |
◆ setShader() [2/2]
|
virtual |
Custom fragment pipeline for subsequent textured 2D draws.
实现了 eve::graphics::IGraphics2D.
在文件 Graphics.cpp 第 745 行定义.
引用了 currentShader , 以及 shader.
◆ setTextureSampler()
|
pure virtual |
Recreate the sampler for an existing texture (keeps image / mip chain). No-op when texture is null or not owned by this Graphics.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
被这些函数引用 setTextureSamplerParams().
◆ setTextureSamplerParams()
|
virtual |
Update sampler state without re-uploading pixels (filter / mip / aniso / LOD bias).
实现了 eve::graphics::IResourceFactory.
在文件 Graphics.cpp 第 919 行定义.
引用了 filter, eve::graphics::Texture::getSampler(), eve::graphics::TextureSampler::min, mipmap, eve::graphics::TextureSampler::parseFilter(), eve::graphics::TextureSampler::parseMipmap(), s , 以及 setTextureSampler().
◆ setViewportSize()
|
pure virtual |
Sets the current graphics display viewport dimensions.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
◆ setVSync()
|
inlinevirtual |
Prefer uncapped present (IMMEDIATE/MAILBOX) when false, vsync (MAILBOX/FIFO) when true. Takes effect on the next swapchain recreate.
被 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 604 行定义.
引用了 enabled , 以及 vsyncEnabled.
被这些函数引用 eve::graphics::vulkan::Graphics::setVSync() , 以及 eve::graphics::webgpu::Graphics::setVSync().
◆ supportsGBufferPost()
|
inlinevirtual |
Whether gbuffer-based post-process shaders (AO, GI) can be created on this backend. False on WebGPU, whose custom post shaders are WGSL-only (the built-in AO/GI use SPIR-V), so RenderSystem3D skips them there.
被 eve::graphics::webgpu::Graphics 重载.
在文件 Graphics.h 第 104 行定义.
◆ transformPoint()
| glm::vec2 eve::graphics::Graphics::transformPoint | ( | glm::vec2 | point | ) |
◆ translate()
| void eve::graphics::Graphics::translate | ( | float | x, |
| float | y | ||
| ) |
◆ updateMeshVertices()
|
pure virtual |
In-place update of a mesh's vertex/index data (CPU -> host-visible VBO). Mirrors bakeMeshMorph: the update synchronizes with in-flight GPU work, so prefer rebuilding only when content actually changes. The mesh's buffer is reused while it fits (stable GPU handle) and reallocated when the new size grows. Returns false when unsupported (WebGPU backend). posXYZ/nrmXYZ follow newMeshFromArrays layout (uvST may be null); indices/indexCount may be null/0 to keep the mesh's existing indices.
实现了 eve::graphics::IResourceFactory.
在 eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 内被实现.
类成员变量说明
◆ backgroundColor
在文件 Graphics.h 第 977 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::begin3DFrame(), eve::graphics::vulkan::Graphics::begin3DFrameToCanvas(), eve::graphics::vulkan::Graphics::clear(), eve::graphics::webgpu::Graphics::clear(), getBackgroundColor(), eve::graphics::webgpu::Graphics::present() , 以及 setBackgroundColor().
◆ currentFont
|
protected |
◆ currentShader
|
protected |
◆ frameHad3D
|
protected |
在文件 Graphics.h 第 978 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::begin3DFrame(), eve::graphics::webgpu::Graphics::begin3DFrame(), eve::graphics::vulkan::Graphics::begin3DFrameToCanvas(), eve::graphics::vulkan::Graphics::clear(), consumeFrameHad3D(), eve::graphics::webgpu::Graphics::drawMeshShader(), eve::graphics::webgpu::Graphics::drawVoxelFaceInstances(), had3DThisFrame() , 以及 eve::graphics::webgpu::Graphics::present().
◆ graphicsActive
|
protected |
在文件 Graphics.h 第 983 行定义.
被这些函数引用 isActive() , 以及 setActive().
◆ height
|
protected |
在文件 Graphics.h 第 974 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::beginGBufferPass(), eve::graphics::webgpu::Graphics::beginGBufferPass(), getHeight(), eve::graphics::vulkan::Graphics::getPixel(), eve::graphics::webgpu::Graphics::newCanvas(), eve::graphics::webgpu::Graphics::newTexture(), eve::graphics::webgpu::Graphics::newTexture(), renderEntityIdMask(), eve::graphics::vulkan::Graphics::renderEntityIdMask(), eve::graphics::vulkan::Graphics::setMesh3DHeightTexture(), eve::graphics::webgpu::Graphics::setMesh3DHeightTexture(), eve::graphics::vulkan::Graphics::setViewportSize() , 以及 eve::graphics::webgpu::Graphics::setViewportSize().
◆ msaaSamples
|
protected |
◆ pipelineAA_
|
protected |
在文件 Graphics.h 第 993 行定义.
被这些函数引用 pipelineAntiAliasing() , 以及 eve::graphics::vulkan::Graphics::~Graphics().
◆ pipelineAO_
|
protected |
在文件 Graphics.h 第 991 行定义.
被这些函数引用 pipelineAmbientOcclusion() , 以及 eve::graphics::vulkan::Graphics::~Graphics().
◆ pipelineGI_
|
protected |
在文件 Graphics.h 第 992 行定义.
被这些函数引用 pipelineGlobalIllumination() , 以及 eve::graphics::vulkan::Graphics::~Graphics().
◆ pipelineOutline_
|
protected |
在文件 Graphics.h 第 994 行定义.
被这些函数引用 pipelineOutline().
◆ pixelHeight
|
protected |
◆ pixelWidth
|
protected |
◆ presentOverlayFn_
|
protected |
在文件 Graphics.h 第 985 行定义.
被这些函数引用 clearPresentOverlay(), getPresentOverlay(), eve::graphics::webgpu::Graphics::present() , 以及 setPresentOverlay().
◆ presentOverlayUser_
|
protected |
在文件 Graphics.h 第 986 行定义.
被这些函数引用 clearPresentOverlay(), getPresentOverlayUser(), eve::graphics::webgpu::Graphics::present() , 以及 setPresentOverlay().
◆ recordingEngine3D_
|
protected |
True while RenderSystem3D is submitting (AO / engine overlays).
在文件 Graphics.h 第 980 行定义.
被这些函数引用 render3D().
◆ renderControl_
|
protected |
◆ screenReadbackEnabled
|
protected |
在文件 Graphics.h 第 981 行定义.
被这些函数引用 isScreenReadbackEnabled(), saveFramePng() , 以及 setScreenReadbackEnabled().
◆ vsyncEnabled
|
protected |
在文件 Graphics.h 第 982 行定义.
被这些函数引用 isVSync(), setVSync(), eve::graphics::vulkan::Graphics::setVSync() , 以及 eve::graphics::webgpu::Graphics::setVSync().
◆ width
|
protected |
在文件 Graphics.h 第 973 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::beginGBufferPass(), eve::graphics::webgpu::Graphics::beginGBufferPass(), getCurrentDPIScale(), eve::graphics::vulkan::Graphics::getPixel(), getWidth(), eve::graphics::webgpu::Graphics::newCanvas(), eve::graphics::webgpu::Graphics::newTexture(), eve::graphics::webgpu::Graphics::newTexture(), renderEntityIdMask(), eve::graphics::vulkan::Graphics::renderEntityIdMask(), eve::graphics::vulkan::Graphics::setViewportSize() , 以及 eve::graphics::webgpu::Graphics::setViewportSize().
◆ windowDestroyedCallbacks_
|
protected |
该类的文档由以下文件生成:
- src/modules/graphics/Graphics.h
- src/modules/graphics/Graphics.cpp
- src/modules/graphics/webgpu/Graphics.cpp
Public 成员函数 继承自