light/Engine/src/Engine/Graphics/Texture.h
Light 74a6035c32 Scene Serialization
- Scenes can now be serialized and de-serialized into .yaml files
- Added yaml-cpp as Dependency
2021-10-05 13:44:32 +03:30

31 lines
No EOL
654 B
C++

#pragma once
#include "Base/Base.h"
namespace Light {
class SharedContext;
// #todo: improve textures
class Texture
{
public:
static Ref<Texture> Create(unsigned int width, unsigned int height, unsigned int components, unsigned char* pixels, Ref<SharedContext> sharedContext, const std::string& filePath);
Texture(const Texture&) = delete;
Texture& operator=(const Texture&) = delete;
virtual ~Texture() = default;
virtual void Bind(unsigned int slot = 0) = 0;
inline const std::string& GetFilePath() const { return m_FilePath; }
protected:
Texture(const std::string& filePath);
protected:
std::string m_FilePath;
};
}