Fixed non standard error messages

This commit is contained in:
Daniel 2023-07-17 12:20:17 +02:00
parent 8d4ec28aa1
commit 2d230155a7

View File

@ -46,7 +46,7 @@ int main()
if (window == nullptr) if (window == nullptr)
{ {
std::cerr << "Failed to create GLFW window"; std::cerr << "ERROR::GLFW::CREATE_WINDOW";
glfwTerminate(); glfwTerminate();
return -1; return -1;
@ -56,7 +56,7 @@ int main()
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{ {
std::cerr << "Failed to initialise GLAD"; std::cerr << "ERROR::GLAD::INITILISE";
return -1; return -1;
} }
@ -69,7 +69,7 @@ int main()
-0.5f, -0.5f, 0.0f, // bottom left -0.5f, -0.5f, 0.0f, // bottom left
-0.5f, 0.5f, 0.0f // top left -0.5f, 0.5f, 0.0f // top left
}; };
GLuint indices[]{ GLuint faces[]{
0, 1, 3, 0, 1, 3,
1, 2, 3 1, 2, 3
}; };
@ -85,7 +85,7 @@ int main()
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBufferObject); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBufferObject);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(faces), faces, GL_STATIC_DRAW);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0);
glEnableVertexAttribArray(0); glEnableVertexAttribArray(0);