summaryrefslogtreecommitdiffhomepage
path: root/src/texture.cpp
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-11-25 17:36:37 -0500
committerrealtradam <[email protected]>2022-11-25 17:36:37 -0500
commit62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4 (patch)
treeb91117aabf53eb1dec0b8dc0d34c7656872f71e8 /src/texture.cpp
parent4e7226ad1b081982e5cbed349edca1c5b0e1b779 (diff)
downloadOgle-62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4.tar.gz
Ogle-62de63a0d26ece5c0dc2cd48c0a41d35de1e38d4.zip
cleanup code
Diffstat (limited to 'src/texture.cpp')
-rw-r--r--src/texture.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/texture.cpp b/src/texture.cpp
index 0697e28..6322ce7 100644
--- a/src/texture.cpp
+++ b/src/texture.cpp
@@ -1,10 +1,15 @@
-#include "texture.hpp"
-#include <iostream>
+//external libs
#include "glad/glad.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
+// project headers
+#include "texture.hpp"
+
+// std libs
+#include <iostream>
+
Texture::Texture(const char* texture_path)
{
glGenTextures(1, &id);
@@ -15,7 +20,6 @@ Texture::Texture(const char* texture_path)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
int width, height, nrChannels;
- //stbi_set_flip_vertically_on_load(true);
unsigned char *data = stbi_load(texture_path, &width, &height, &nrChannels, 0);
if (data)
{