Cogs.Core
EffectsNull.h
1#pragma once
2
3#include "../Base/EffectsCommon.h"
4
5namespace Cogs {
6 class EffectsNull : public EffectsCommon {
7 virtual void annotate(EffectHandle /*handle*/, const StringView& /*name*/) override {}
8 virtual void annotateVS(EffectHandle /*handle*/, const StringView& /*name*/) override {}
9 virtual void annotateGS(EffectHandle /*handle*/, const StringView& /*name*/) override {}
10 virtual void annotatePS(EffectHandle /*handle*/, const StringView& /*name*/) override {}
11 virtual void annotateCS(EffectHandle /*handle*/, const StringView& /*name*/) override {}
12
13 virtual EffectHandle loadComputeEffect(const StringView& /*fileName*/, EffectFlags::EEffectFlags /*effectFlags*/) override {
14 return EffectHandle(reinterpret_cast<int64_t>(new EffectTag()));
15 }
16
17 virtual EffectHandle loadComputeEffect(const StringView& /*fileName*/, const PreprocessorDefinitions& /*defines*/, EffectFlags::EEffectFlags /*effectFlags*/) override {
18 return EffectHandle(reinterpret_cast<int64_t>(new EffectTag()));
19 }
20
21 virtual void releaseEffect(EffectHandle effectHandle) override {
22 delete reinterpret_cast<EffectTag*>(effectHandle.handle);
23 }
24
25 virtual void releaseResources() override {}
26
27 using EffectsCommon::load;
28
29 virtual EffectHandle load(const ProcessedContent& /*vsSource*/,
30 const ProcessedContent& /*hsSource*/,
31 const ProcessedContent& /*dsSource*/,
32 const ProcessedContent& /*gsSource*/,
33 const ProcessedContent& /*psSource*/,
34 const StringView& /*vsEntryPoint*/,
35 const StringView& /*hsEntryPoint*/,
36 const StringView& /*dsEntryPoint*/,
37 const StringView& /*gsEntryPoint*/,
38 const StringView& /*psEntryPoint*/,
39 const EffectDescription& /*desc*/) override {
40 return EffectHandle(reinterpret_cast<int64_t>(new EffectTag()));
41 }
42 };
43}
virtual void annotateVS(EffectHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
Definition: EffectsNull.h:8
virtual EffectHandle loadComputeEffect(const StringView &, const PreprocessorDefinitions &, EffectFlags::EEffectFlags) override
Load the compute shader with the given file name and create an effect.
Definition: EffectsNull.h:17
virtual void annotatePS(EffectHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
Definition: EffectsNull.h:10
virtual EffectHandle loadComputeEffect(const StringView &, EffectFlags::EEffectFlags) override
Load the compute shader with the given file name and create an effect.
Definition: EffectsNull.h:13
virtual void annotateGS(EffectHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
Definition: EffectsNull.h:9
virtual void releaseEffect(EffectHandle effectHandle) override
Release the effect with the given handle, freeing all resources generated during program loading.
Definition: EffectsNull.h:21
virtual void releaseResources() override
Release all allocated effect resources.
Definition: EffectsNull.h:25
virtual void annotateCS(EffectHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
Definition: EffectsNull.h:11
virtual void annotate(EffectHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
Definition: EffectsNull.h:7
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
std::vector< PreprocessorDefinition > PreprocessorDefinitions
A set of preprocessor definitions.
Definition: IEffects.h:13
Contains an effect description used to load a single effect.
Definition: IEffects.h:55
EEffectFlags
Effect source flags.
Definition: IEffects.h:20
handle_type handle
Internal resource handle.
Definition: Common.h:74