Getting started content code-rework updates.

This commit is contained in:
Joey de Vries
2017-05-29 20:36:10 +02:00
parent bc718162b1
commit 5846428705
18 changed files with 131 additions and 80 deletions

View File

@@ -32,13 +32,13 @@ public:
std::stringstream vShaderStream, fShaderStream;
// read file's buffer contents into streams
vShaderStream << vShaderFile.rdbuf();
fShaderStream << fShaderFile.rdbuf();
fShaderStream << fShaderFile.rdbuf();
// close file handlers
vShaderFile.close();
fShaderFile.close();
// convert stream into string
vertexCode = vShaderStream.str();
fragmentCode = fShaderStream.str();
vertexCode = vShaderStream.str();
fragmentCode = fShaderStream.str();
}
catch (std::ifstream::failure e)
{
@@ -96,10 +96,10 @@ public:
private:
// utility function for checking shader compilation/linking errors.
// ------------------------------------------------------------------------
void checkCompileErrors(GLuint shader, std::string type)
void checkCompileErrors(unsigned int shader, std::string type)
{
GLint success;
GLchar infoLog[1024];
int success;
char infoLog[1024];
if (type != "PROGRAM")
{
glGetShaderiv(shader, GL_COMPILE_STATUS, &success);