mirror of
https://github.com/guezoloic/LearnOpenGL.git
synced 2026-01-25 09:34:16 +00:00
fix(texture): move stb_image into texture.cpp file
This commit is contained in:
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <filesystem>
|
|
||||||
#include <stb_image.h>
|
|
||||||
|
|
||||||
class Texture
|
class Texture
|
||||||
{
|
{
|
||||||
@@ -13,11 +11,9 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Texture(const std::string& path);
|
Texture(const std::string& path);
|
||||||
|
|
||||||
~Texture();
|
~Texture();
|
||||||
|
|
||||||
void bind(GLenum textureUnit) const;
|
void bind(GLenum textureUnit) const;
|
||||||
|
|
||||||
unsigned int getID() const;
|
unsigned int getID() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#include "texture.hpp"
|
#include "texture.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
|
#include "stb_image.h"
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user