Cogs.Core
Classes | Public Member Functions | Public Attributes | Private Attributes | List of all members
Cogs::Core::RenderMaterial Struct Reference
Inheritance diagram for Cogs::Core::RenderMaterial:
Cogs::Core::RenderResourceBase< Material > Cogs::Core::RenderResource

Classes

struct  EffectBindingInstance
 
struct  TexturePropertyState
 

Public Member Functions

ActivationResult update (Material *material, IGraphicsDevice *device, class RenderResources *resources, struct RenderStates *renderStates)
 
void release (class Renderer *renderer)
 
EffectBindinggetBinding (const size_t permutationIndex, const MaterialInstance *materialInstance, const MeshStreamsLayout *streamsLayout, const EnginePermutation *enginePermutation, const RenderPassOptions &passOptions, const ClipShapeType clipShape)
 
- Public Member Functions inherited from Cogs::Core::RenderResourceBase< Material >
 RenderResourceBase (const RenderResourceBase &)=delete
 
void setResource (Material *resource)
 
MaterialgetResource () const
 
- Public Member Functions inherited from Cogs::Core::RenderResource
 RenderResource (const RenderResource &)=delete
 
RenderResourceoperator= (const RenderResource &)=delete
 
void setActive ()
 
void setDelayed ()
 
void setFailed ()
 
void setReleased ()
 
void setOwned ()
 
void setPersistent ()
 
void setOverride ()
 
bool isActive () const
 Get if the render resource is active and can be used for rendering.
 
bool isDelayed () const
 Get if the render resource is in a delayed state.
 
bool isSet (RenderResourceFlags flag) const
 
bool isPersistent () const
 
bool isOverride () const
 
bool hasFailed () const
 
bool isReleased () const
 
bool isOwned () const
 
void setName (const StringView &str)
 
StringView getName () const
 
RenderResourceType getType () const
 
RenderResourceFlags getFlags () const
 
void incrementGeneration ()
 
uint16_t getGeneration ()
 
Id getIdentity () const
 

Public Attributes

std::vector< EffectBindingInstancebindings
 
std::vector< EffectBindingInstancependingBindings
 
std::vector< TexturePropertyStatetexturePropertyStates
 
uint32_t updatedGeneration = ~0u
 

Private Attributes

IRendererrenderer = nullptr
 

Additional Inherited Members

- Public Types inherited from Cogs::Core::RenderResource
typedef uint32_t Id
 
- Protected Attributes inherited from Cogs::Core::RenderResource
StringRef name = NoString
 
RenderResourceType type = RenderResourceType::Unknown
 
RenderResourceFlags flags = RenderResourceFlags::None
 
uint16_t generation = 0
 
Id identity = 0
 

Detailed Description

Definition at line 24 of file RenderMaterial.h.

Member Function Documentation

◆ getBinding()

Cogs::Core::EffectBinding * Cogs::Core::RenderMaterial::getBinding ( const size_t  permutationIndex,
const MaterialInstance materialInstance,
const MeshStreamsLayout streamsLayout,
const EnginePermutation enginePermutation,
const RenderPassOptions passOptions,
const ClipShapeType  clipShape 
)

Get effect for a material variant with a given permutation/variant/streamlayout combo.

Definition at line 360 of file RenderMaterial.cpp.

References Cogs::Core::Material::getEffect(), and Cogs::Core::Renderer::getEffectBindings().

Referenced by Cogs::Core::RenderMaterialInstance::checkReady().

◆ release()

void Cogs::Core::RenderMaterial::release ( class Renderer renderer)

Definition at line 329 of file RenderMaterial.cpp.

◆ update()

Cogs::Core::ActivationResult Cogs::Core::RenderMaterial::update ( Material material,
IGraphicsDevice device,
class RenderResources resources,
struct RenderStates renderStates 
)

Definition at line 249 of file RenderMaterial.cpp.

Member Data Documentation

◆ bindings

std::vector<EffectBindingInstance> Cogs::Core::RenderMaterial::bindings

Definition at line 45 of file RenderMaterial.h.

◆ pendingBindings

std::vector<EffectBindingInstance> Cogs::Core::RenderMaterial::pendingBindings

Definition at line 46 of file RenderMaterial.h.

◆ renderer

IRenderer* Cogs::Core::RenderMaterial::renderer = nullptr
private

Definition at line 58 of file RenderMaterial.h.

◆ texturePropertyStates

std::vector<TexturePropertyState> Cogs::Core::RenderMaterial::texturePropertyStates

Definition at line 53 of file RenderMaterial.h.

◆ updatedGeneration

uint32_t Cogs::Core::RenderMaterial::updatedGeneration = ~0u

Definition at line 55 of file RenderMaterial.h.


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