Files
FlaxEngine/Source/Engine/Graphics/Textures/GPUSampler.h
Wojciech Figat a7e428a21c Merge branch 'master' into 1.5
# Conflicts:
#	Content/Shaders/GI/DDGI.flax
#	Content/Shaders/GI/GlobalSurfaceAtlas.flax
#	Content/Shaders/TAA.flax
#	Content/Shaders/VolumetricFog.flax
#	Source/Editor/CustomEditors/Editors/ActorTagEditor.cs
#	Source/Engine/Core/Config/GraphicsSettings.cpp
#	Source/Engine/Engine/PostProcessEffect.cs
#	Source/Engine/Graphics/GPUResourcesCollection.cpp
#	Source/Engine/Graphics/GPUResourcesCollection.h
#	Source/Engine/Graphics/PostProcessBase.h
#	Source/FlaxEngine.Gen.cs
2023-01-10 15:37:55 +01:00

52 lines
1.2 KiB
C++

// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#include "GPUSamplerDescription.h"
#include "../GPUResource.h"
/// <summary>
/// GPU texture sampler object.
/// </summary>
/// <seealso cref="GPUResource" />
API_CLASS(Sealed) class FLAXENGINE_API GPUSampler : public GPUResource
{
DECLARE_SCRIPTING_TYPE_NO_SPAWN(GPUSampler);
static GPUSampler* Spawn(const SpawnParams& params);
static GPUSampler* New();
protected:
GPUSamplerDescription _desc;
GPUSampler();
public:
/// <summary>
/// Gets sampler description structure.
/// </summary>
API_PROPERTY() const GPUSamplerDescription& GetDescription() const
{
return _desc;
}
public:
/// <summary>
/// Creates new sampler.
/// </summary>
/// <param name="desc">The sampler description.</param>
/// <returns>True if cannot create sampler, otherwise false.</returns>
API_FUNCTION() bool Init(API_PARAM(Ref) const GPUSamplerDescription& desc);
protected:
virtual bool OnInit() = 0;
public:
// [GPUResource]
String ToString() const override;
GPUResourceType GetResourceType() const final override;
protected:
// [GPUResource]
void OnReleaseGPU() override;
};