add basic texture
This commit is contained in:
31
include/td/render/loader/TextureLoader.h
Normal file
31
include/td/render/loader/TextureLoader.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <sp/common/NonCopyable.h>
|
||||
#include <string>
|
||||
|
||||
namespace td {
|
||||
namespace GL {
|
||||
|
||||
class Texture : private sp::NonCopyable {
|
||||
public:
|
||||
Texture(const char* a_Data, int a_Width, int a_Height, int a_Comp);
|
||||
Texture(Texture&& a_Other);
|
||||
|
||||
~Texture();
|
||||
|
||||
void Bind() const;
|
||||
void Unbind() const;
|
||||
|
||||
private:
|
||||
unsigned int m_ID;
|
||||
};
|
||||
|
||||
} // namespace GL
|
||||
|
||||
namespace TextureLoader {
|
||||
|
||||
GL::Texture LoadTexture(const std::string& fileName);
|
||||
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user