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

Offscreen render target (RGBA8Unorm color, optional Depth32Float). 2D batches are flushed into the canvas texture by Graphics::flush2DToCanvas. 更多...

#include <Canvas.h>

类 eve::graphics::webgpu::OffscreenCanvas 继承关系图:
eve::graphics::Canvas eve::graphics::Drawable

Public 成员函数

 OffscreenCanvas (Graphics *gfx, 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.
 
bool isHDR () const
 True when hdr.
 
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 (Canvas *, const glm::mat4 &) const override
 Draws .
 
void draw (eve::graphics::Graphics *, const glm::mat4 &) const override
 Draws .
 
- 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).
 

Public 属性

bool clearRequested = false
 
Color clearColor {0.f, 0.f, 0.f, 1.f}
 

友元

class Graphics
 

详细描述

Offscreen render target (RGBA8Unorm color, optional Depth32Float). 2D batches are flushed into the canvas texture by Graphics::flush2DToCanvas.

在文件 Canvas.h 第 16 行定义.

构造及析构函数说明

◆ OffscreenCanvas()

◆ ~OffscreenCanvas()

eve::graphics::webgpu::OffscreenCanvas::~OffscreenCanvas ( )
overridedefault

Releases OffscreenCanvas resources.

成员函数说明

◆ clear()

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

Clears .

实现了 eve::graphics::Canvas.

在文件 Canvas.cpp 第 65 行定义.

引用了 clearColor, clearRequested , 以及 color.

◆ draw() [1/2]

void eve::graphics::webgpu::OffscreenCanvas::draw ( Canvas *  ,
const glm::mat4 &   
) const
inlineoverridevirtual

Draws .

实现了 eve::graphics::Canvas.

在文件 Canvas.h 第 44 行定义.

◆ draw() [2/2]

void eve::graphics::webgpu::OffscreenCanvas::draw ( eve::graphics::Graphics *  ,
const glm::mat4 &   
) const
inlineoverridevirtual

Draws .

重载 eve::graphics::Canvas .

在文件 Canvas.h 第 46 行定义.

◆ getHeight()

int eve::graphics::webgpu::OffscreenCanvas::getHeight ( ) const
inlineoverridevirtual

◆ getPixel()

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

Returns the pixel.

实现了 eve::graphics::Canvas.

在文件 Canvas.cpp 第 71 行定义.

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

◆ getTexture()

Texture * eve::graphics::webgpu::OffscreenCanvas::getTexture ( )
inlineoverridevirtual

Returns the texture.

实现了 eve::graphics::Canvas.

在文件 Canvas.h 第 28 行定义.

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

◆ getWidth()

int eve::graphics::webgpu::OffscreenCanvas::getWidth ( ) const
inlineoverridevirtual

◆ isHDR()

bool eve::graphics::webgpu::OffscreenCanvas::isHDR ( ) const
inline

True when hdr.

在文件 Canvas.h 第 30 行定义.

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

◆ newHDRImageData()

image::ImageData * eve::graphics::webgpu::OffscreenCanvas::newHDRImageData ( )
overridevirtual

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

@ownership The caller owns the returned HDR image data.

重载 eve::graphics::Canvas .

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

引用了 eve::graphics::webgpu::Graphics::newHDRImageDataImpl().

◆ newImageData()

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

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

实现了 eve::graphics::Canvas.

在文件 Canvas.cpp 第 76 行定义.

引用了 eve::graphics::webgpu::Graphics::newImageDataImpl().

友元及相关函数文档

◆ Graphics

friend class Graphics
friend

在文件 Canvas.h 第 51 行定义.

类成员变量说明

◆ clearColor

Color eve::graphics::webgpu::OffscreenCanvas::clearColor {0.f, 0.f, 0.f, 1.f}

◆ clearRequested

bool eve::graphics::webgpu::OffscreenCanvas::clearRequested = false

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