Flutter Engine
 
Loading...
Searching...
No Matches
resource_binder.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_CORE_RESOURCE_BINDER_H_
6#define FLUTTER_IMPELLER_CORE_RESOURCE_BINDER_H_
7
8#include <memory>
9
16
17namespace impeller {
18
19//------------------------------------------------------------------------------
20/// @brief An interface for binding resources. This is implemented by
21/// |Command| and |ComputeCommand| to make GPU resources available
22/// to a given command's pipeline.
23///
25 virtual ~ResourceBinder() = default;
26
27 virtual bool BindResource(ShaderStage stage,
29 const ShaderUniformSlot& slot,
30 const ShaderMetadata* metadata,
31 BufferView view) = 0;
32
33 virtual bool BindResource(ShaderStage stage,
35 const SampledImageSlot& slot,
36 const ShaderMetadata* metadata,
37 std::shared_ptr<const Texture> texture,
39};
40
41} // namespace impeller
42
43#endif // FLUTTER_IMPELLER_CORE_RESOURCE_BINDER_H_
GLenum type
A wrapper around a raw ptr that adds additional unopt mode only checks.
Definition raw_ptr.h:15
FlView * view
FlTexture * texture
An interface for binding resources. This is implemented by |Command| and |ComputeCommand| to make GPU...
virtual ~ResourceBinder()=default
virtual bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata *metadata, BufferView view)=0
virtual bool BindResource(ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata *metadata, std::shared_ptr< const Texture > texture, raw_ptr< const Sampler >)=0
Metadata required to bind a combined texture and sampler.
Metadata required to bind a buffer.