OffscreenCanvas public API. 更多...
#include <Canvas.h>
Public 成员函数 | |
| OffscreenCanvas (Graphics *owner, int width, int height, bool hdr=false) | |
| Constructs a OffscreenCanvas. | |
| ~OffscreenCanvas () override | |
| Releases OffscreenCanvas resources. | |
| int | getWidth () const override |
| Returns the width. | |
| int | getHeight () const override |
| Returns the height. | |
| Texture * | getTexture () override |
| Returns the texture. | |
| 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. | |
| image::ImageData * | newImageData () override |
| Creates a image data. @ownership Caller deletes unless documented otherwise. | |
| image::ImageData * | newHDRImageData () override |
| Creates a hdr image data. @ownership Caller deletes unless documented otherwise. | |
| void | draw (eve::graphics::Graphics *, const glm::mat4 &) const override |
| Draws . | |
| void | draw (Canvas *, const glm::mat4 &) const override |
| Draws . | |
| vk::Framebuffer | framebuffer () const |
| Framebuffer. | |
| vk::Framebuffer | framebuffer3D () const |
| Framebuffer 3 d. | |
| vkb::ColorAttachmentImage & | colorImage () |
| Color image. | |
| vkb::DepthTarget & | depthImage () |
| Depth image. | |
| Color | pendingClearColor () const |
| Pending clear color. | |
| bool | takePendingClear () |
| Take pending clear. | |
| bool | isHDR () const |
| True when hdr. | |
| void | ensure3D () |
| Ensure a D32 depth attachment + 3D (color+depth) framebuffer exist. | |
Public 成员函数 继承自 eve::graphics::Canvas | |
| Canvas () | |
| Constructs a Canvas. | |
| ~Canvas () override | |
| Releases Canvas resources. | |
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). | |
详细描述
OffscreenCanvas public API.
构造及析构函数说明
◆ OffscreenCanvas()
| eve::graphics::vulkan::OffscreenCanvas::OffscreenCanvas | ( | Graphics * | owner, |
| int | width, | ||
| int | height, | ||
| bool | hdr = false |
||
| ) |
Constructs a OffscreenCanvas.
在文件 Canvas.cpp 第 12 行定义.
引用了 eve::graphics::vulkan::GpuTexture::descriptorSet, device, eve::graphics::vulkan::Graphics::getDescriptorPool(), eve::graphics::vulkan::Graphics::getDevice(), eve::graphics::vulkan::Graphics::getOffscreenRenderPass(), eve::graphics::vulkan::Graphics::getTexSetLayout(), eve::graphics::Texture::gpuHandle, height, eve::graphics::Texture::height, eve::graphics::vulkan::GpuTexture::height, eve::graphics::Texture::pixelHeight, eve::graphics::Texture::pixelWidth, eve::graphics::vulkan::GpuTexture::sampler, eve::graphics::vulkan::GpuTexture::viewOverride, width, eve::graphics::Texture::width , 以及 eve::graphics::vulkan::GpuTexture::width.
◆ ~OffscreenCanvas()
|
override |
Releases OffscreenCanvas resources.
在文件 Canvas.cpp 第 59 行定义.
引用了 device, eve::graphics::vulkan::Graphics::getDevice(), eve::graphics::Texture::gpuHandle , 以及 eve::graphics::vulkan::GpuTexture::sampler.
成员函数说明
◆ clear()
|
overridevirtual |
◆ colorImage()
|
inline |
◆ depthImage()
|
inline |
◆ draw() [1/2]
|
inlineoverridevirtual |
◆ draw() [2/2]
|
inlineoverridevirtual |
◆ ensure3D()
| void eve::graphics::vulkan::OffscreenCanvas::ensure3D | ( | ) |
Ensure a D32 depth attachment + 3D (color+depth) framebuffer exist.
在文件 Canvas.cpp 第 84 行定义.
引用了 device, eve::graphics::vulkan::Graphics::getDepthFormat(), eve::graphics::vulkan::Graphics::getDevice() , 以及 eve::graphics::vulkan::Graphics::getOffscreen3DRenderPass().
◆ framebuffer()
|
inline |
◆ framebuffer3D()
|
inline |
◆ getHeight()
|
inlineoverridevirtual |
◆ getPixel()
|
overridevirtual |
Returns the pixel.
在文件 Canvas.cpp 第 156 行定义.
◆ getTexture()
|
inlineoverridevirtual |
◆ getWidth()
|
inlineoverridevirtual |
◆ isHDR()
|
inline |
◆ newHDRImageData()
|
overridevirtual |
Creates a hdr image data. @ownership Caller deletes unless documented otherwise.
@ownership The caller owns the returned HDR image data.
在文件 Canvas.cpp 第 177 行定义.
◆ newImageData()
|
overridevirtual |
Creates a image data. @ownership Caller deletes unless documented otherwise.
在文件 Canvas.cpp 第 169 行定义.
◆ pendingClearColor()
|
inline |
◆ takePendingClear()
| bool eve::graphics::vulkan::OffscreenCanvas::takePendingClear | ( | ) |
该类的文档由以下文件生成:
- src/modules/graphics/vulkan/Canvas.h
- src/modules/graphics/vulkan/Canvas.cpp
Public 成员函数 继承自