mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- removed unused declarations.
This commit is contained in:
parent
612fb40f3a
commit
1455111ddc
1 changed files with 0 additions and 54 deletions
|
@ -133,57 +133,3 @@ private:
|
|||
};
|
||||
|
||||
|
||||
enum class SamplerType : int
|
||||
{
|
||||
Sampler1D,
|
||||
Sampler2D,
|
||||
Sampler3D,
|
||||
SamplerCube,
|
||||
iSampler1D,
|
||||
iSampler2D,
|
||||
iSampler3D,
|
||||
iSamplerCube,
|
||||
uSampler1D,
|
||||
uSampler2D,
|
||||
uSampler3D,
|
||||
uSamplerCube,
|
||||
};
|
||||
|
||||
struct SamplerUniform
|
||||
{
|
||||
const char *GetTypeStr() const
|
||||
{
|
||||
switch (mType)
|
||||
{
|
||||
default:
|
||||
case SamplerType::Sampler1D: return "sampler1D";
|
||||
case SamplerType::Sampler2D: return "sampler2D";
|
||||
case SamplerType::Sampler3D: return "sampler3D";
|
||||
case SamplerType::SamplerCube: return "samplerCube";
|
||||
case SamplerType::iSampler1D: return "isampler1D";
|
||||
case SamplerType::iSampler2D: return "isampler2D";
|
||||
case SamplerType::iSampler3D: return "isampler3D";
|
||||
case SamplerType::iSamplerCube: return "isamplerCube";
|
||||
case SamplerType::uSampler1D: return "usampler1D";
|
||||
case SamplerType::uSampler2D: return "usampler2D";
|
||||
case SamplerType::uSampler3D: return "usampler3D";
|
||||
case SamplerType::uSamplerCube: return "usamplerCube";
|
||||
}
|
||||
}
|
||||
|
||||
static FString CreateDeclaration(std::vector<SamplerUniform> &samplers)
|
||||
{
|
||||
FString build;
|
||||
|
||||
for (auto &sampler : samplers)
|
||||
{
|
||||
if (screen->glslversion >= 4.2f) build.AppendFormat("layout(binding = %d) uniform", sampler.mBinding);
|
||||
build.AppendFormat("%s %s;\n", sampler.GetTypeStr(), sampler.mName);
|
||||
}
|
||||
return build;
|
||||
}
|
||||
|
||||
int mBinding;
|
||||
SamplerType mType;
|
||||
const char *mName;
|
||||
};
|
Loading…
Reference in a new issue