Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Public Attributes | List of all members
impeller::scene::SceneContextOptions Struct Reference

#include <scene_context.h>

Classes

struct  Equal
 
struct  Hash
 

Public Member Functions

void ApplyToPipelineDescriptor (const Capabilities &capabilities, PipelineDescriptor &desc) const
 

Public Attributes

SampleCount sample_count = SampleCount::kCount1
 
PrimitiveType primitive_type = PrimitiveType::kTriangle
 

Detailed Description

Definition at line 19 of file scene_context.h.

Member Function Documentation

◆ ApplyToPipelineDescriptor()

void impeller::scene::SceneContextOptions::ApplyToPipelineDescriptor ( const Capabilities capabilities,
PipelineDescriptor desc 
) const

Definition at line 16 of file scene_context.cc.

18 {
19 DepthAttachmentDescriptor depth;
20 depth.depth_compare = CompareFunction::kLess;
21 depth.depth_write_enabled = true;
22 desc.SetDepthStencilAttachmentDescriptor(depth);
23 desc.SetDepthPixelFormat(capabilities.GetDefaultDepthStencilFormat());
24
25 StencilAttachmentDescriptor stencil;
26 stencil.stencil_compare = CompareFunction::kAlways;
27 stencil.depth_stencil_pass = StencilOperation::kKeep;
28 desc.SetStencilAttachmentDescriptors(stencil);
29 desc.SetStencilPixelFormat(capabilities.GetDefaultDepthStencilFormat());
30
31 desc.SetSampleCount(sample_count);
32 desc.SetPrimitiveType(primitive_type);
33
35 desc.SetCullMode(CullMode::kBackFace);
36}
@ kAlways
Comparison test passes always passes.
@ kLess
Comparison test passes if new_value < current_value.
@ kKeep
Don't modify the current stencil value.

Member Data Documentation

◆ primitive_type

PrimitiveType impeller::scene::SceneContextOptions::primitive_type = PrimitiveType::kTriangle

Definition at line 21 of file scene_context.h.

◆ sample_count

SampleCount impeller::scene::SceneContextOptions::sample_count = SampleCount::kCount1

Definition at line 20 of file scene_context.h.


The documentation for this struct was generated from the following files: