refactor: format code

This commit is contained in:
2021-09-19 17:33:16 +02:00
parent 52a143769e
commit 0856ca47ca
71 changed files with 1102 additions and 1110 deletions

View File

@@ -21,8 +21,8 @@ const unsigned int loadGLTexture(const char* fileName) {
const unsigned char* image = stbi_load(fileName, &width, &height, &comp, STBI_rgb_alpha);
if (image == nullptr) {
std::cerr << "Erreur lors du chargement de la texture !" << std::endl;
throw(std::runtime_error("Failed to load texture"));
std::cerr << "Erreur lors du chargement de la texture !" << std::endl;
throw(std::runtime_error("Failed to load texture"));
}
GLuint textureID;
@@ -34,13 +34,13 @@ const unsigned int loadGLTexture(const char* fileName) {
if (comp == 3)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,
GL_UNSIGNED_BYTE, image);
GL_UNSIGNED_BYTE, image);
else if (comp == 4)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA,
GL_UNSIGNED_BYTE, image);
GL_UNSIGNED_BYTE, image);
glBindTexture(GL_TEXTURE_2D, 0);
stbi_image_free((void*) image);
stbi_image_free((void*)image);
return textureID;
}
}