Deduplicate shader creation function for text drawable
This commit is contained in:
@@ -13,8 +13,6 @@
|
||||
#include "UniformBuffer.hpp"
|
||||
#include "AtlasData.hpp"
|
||||
#include "Image/Image.hpp"
|
||||
#include <map>
|
||||
#include <optional>
|
||||
|
||||
namespace OpenVulkano::Scene
|
||||
{
|
||||
@@ -35,10 +33,12 @@ namespace OpenVulkano::Scene
|
||||
|
||||
class TextDrawable : public SimpleDrawable
|
||||
{
|
||||
static Shader DEFAULT_SHADER_BITMAP, DEFAULT_SHADER_SDF, DEFAULT_SHADER_MSDF;
|
||||
|
||||
public:
|
||||
static Shader& GetSdfDefaultShader();
|
||||
static Shader& GetMsdfDefaultShader();
|
||||
static Shader& GetBitmapDefaultShader();
|
||||
[[nodiscard]] static Shader& GetSdfDefaultShader() { return DEFAULT_SHADER_SDF; }
|
||||
[[nodiscard]] static Shader& GetMsdfDefaultShader() { return DEFAULT_SHADER_MSDF; }
|
||||
[[nodiscard]] static Shader& GetBitmapDefaultShader() { return DEFAULT_SHADER_BITMAP; }
|
||||
TextDrawable(const TextConfig& config = TextConfig());
|
||||
TextDrawable(const Array<char>& atlasMetadata, const TextConfig& config = TextConfig());
|
||||
TextDrawable(const std::string& atlasMetadataFile, const TextConfig& config = TextConfig());
|
||||
|
||||
Reference in New Issue
Block a user