sources and include in the same folder

This commit is contained in:
arthur.jamet
2021-05-21 09:48:13 +02:00
parent 125bad49f1
commit 1f13756500
71 changed files with 71 additions and 71 deletions

View File

@@ -0,0 +1,45 @@
/*
** EPITECH PROJECT, 2021
** Bomberman
** File description:
** Texture
*/
#include "Drawables/Texture.hpp"
RAY::Texture::Texture(const std::string &filename):
_texture(LoadTexture(filename.c_str()))
{
}
RAY::Texture::Texture(const Image &image):
_texture(LoadTextureFromImage(image))
{
}
RAY::Texture::Texture()
{
}
RAY::Texture::~Texture()
{
UnloadTexture(this->_texture);
}
bool RAY::Texture::load(const std::string &filename)
{
this->_texture = LoadTexture(filename.c_str());
return true;
}
Image RAY::Texture::toImage(void) const
{
return GetTextureData(_texture);
}
const ::Texture &RAY::Texture::getTexture(void) const
{
return this->_texture;
}