Removed readfile function from main
This commit is contained in:
parent
4ca89d3439
commit
9cac126141
1 changed files with 0 additions and 20 deletions
20
src/main.cpp
20
src/main.cpp
|
|
@ -17,26 +17,6 @@
|
||||||
#include "Error.h"
|
#include "Error.h"
|
||||||
Error error("main");
|
Error error("main");
|
||||||
|
|
||||||
// Create method of retrieving GLSL shaders from file
|
|
||||||
std::string readFile(const char *filepath) {
|
|
||||||
std::string content;
|
|
||||||
std::ifstream fileStream(filepath, std::ios::in);
|
|
||||||
|
|
||||||
if (!fileStream.is_open()) {
|
|
||||||
error.log("Error could not read file: " +
|
|
||||||
std::string(filepath, sizeof(filepath)));
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
std::string line = "";
|
|
||||||
while (!fileStream.eof()) {
|
|
||||||
std::getline(fileStream, line);
|
|
||||||
content.append(line + "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
fileStream.close();
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
// Initialise SDL2
|
// Initialise SDL2
|
||||||
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
|
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue