载入中...
搜索中...
未找到
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)
 
 ~OffscreenCanvas () override
 
int getWidth () const override
 
int getHeight () const override
 
TexturegetTexture () override
 Sampleable color buffer; screen Canvas returns nullptr.
 
void clear (std::optional< Color > color, std::optional< int > stencil, std::optional< double > depth) override
 
Color getPixel (int x, int y) override
 
image::ImageDatanewImageData () override
 
void draw (Canvas *, const glm::mat4 &) const override
 
void draw (eve::graphics::Graphics *, const glm::mat4 &) const override
 Draws the object with the specified transformation matrix.
 
- Public 成员函数 继承自 eve::graphics::Canvas
 Canvas ()
 
 ~Canvas () override
 
- Public 成员函数 继承自 eve::graphics::Drawable
virtual ~Drawable ()
 
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 属性

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.h16 行定义.

构造及析构函数说明

◆ OffscreenCanvas()

◆ ~OffscreenCanvas()

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

成员函数说明

◆ clear()

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

实现了 eve::graphics::Canvas.

在文件 Canvas.cpp69 行定义.

引用了 clearColor, clearRequested , 以及 color.

◆ draw() [1/2]

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

实现了 eve::graphics::Canvas.

在文件 Canvas.h30 行定义.

◆ draw() [2/2]

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

Draws the object with the specified transformation matrix.

实现了 eve::graphics::Drawable.

在文件 Canvas.h31 行定义.

◆ getHeight()

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

◆ getPixel()

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

实现了 eve::graphics::Canvas.

在文件 Canvas.cpp75 行定义.

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

◆ getTexture()

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

Sampleable color buffer; screen Canvas returns nullptr.

实现了 eve::graphics::Canvas.

在文件 Canvas.h23 行定义.

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

◆ getWidth()

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

◆ newImageData()

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

Full RGBA8 copy; caller owns ImageData*.

实现了 eve::graphics::Canvas.

在文件 Canvas.cpp79 行定义.

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

友元及相关函数文档

◆ Graphics

friend class Graphics
friend

在文件 Canvas.h36 行定义.

类成员变量说明

◆ clearColor

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

在文件 Canvas.h34 行定义.

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

◆ clearRequested

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

在文件 Canvas.h33 行定义.

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


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