Shader loading and applying working

This commit is contained in:
Ben
2018-09-17 15:49:19 +01:00
parent 52203417e1
commit 20b6bd04bf
10 changed files with 7444 additions and 4652 deletions

View File

@@ -1,9 +1,12 @@
#include "texture.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "texture.h"
#include <cassert>
#include <iostream>
Texture::Texture(std::string fileName) {
stbi_set_flip_vertically_on_load(true);
int width, height, numComponents;
unsigned char* imageData = stbi_load(fileName.c_str(), &width, &height, &numComponents, 4);