clang-tidy (amb el fuck de que no feien bona parella el clang de macos i el tidy de llvm)

This commit is contained in:
2026-03-23 12:03:07 +01:00
parent 3ca744ee46
commit a1d17ccf99
72 changed files with 487 additions and 484 deletions

View File

@@ -203,7 +203,7 @@ namespace Rendering {
checkGLError("glVertexAttribPointer(position)");
// Atributo 1: Coordenadas de textura (2 floats)
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), static_cast<const void*>(static_cast<const char*>(nullptr) + 2 * sizeof(float)));
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), static_cast<const void*>(static_cast<const char*>(nullptr) + (2 * sizeof(float))));
glEnableVertexAttribArray(1);
checkGLError("glVertexAttribPointer(texcoord)");
@@ -221,14 +221,14 @@ namespace Rendering {
GLuint texture_id = 0;
// Intentar obtener ID de textura OpenGL
texture_id = (GLuint)(uintptr_t)SDL_GetPointerProperty(props, "SDL.texture.opengl.texture", nullptr);
texture_id = static_cast<GLuint>(reinterpret_cast<uintptr_t>(SDL_GetPointerProperty(props, "SDL.texture.opengl.texture", nullptr)));
if (texture_id == 0) {
texture_id = (GLuint)(uintptr_t)SDL_GetPointerProperty(props, "texture.opengl.texture", nullptr);
texture_id = static_cast<GLuint>(reinterpret_cast<uintptr_t>(SDL_GetPointerProperty(props, "texture.opengl.texture", nullptr)));
}
if (texture_id == 0) {
texture_id = (GLuint)SDL_GetNumberProperty(props, "SDL.texture.opengl.texture", 1);
texture_id = static_cast<GLuint>(SDL_GetNumberProperty(props, "SDL.texture.opengl.texture", 1));
}
if (texture_id == 0) {

View File

@@ -36,8 +36,8 @@ namespace Rendering {
private:
// Funciones auxiliares
auto initGLExtensions() -> bool;
auto compileShader(const std::string& source, GLenum shader_type) -> GLuint;
auto linkProgram(GLuint vertex_shader, GLuint fragment_shader) -> GLuint;
static auto compileShader(const std::string& source, GLenum shader_type) -> GLuint;
static auto linkProgram(GLuint vertex_shader, GLuint fragment_shader) -> GLuint;
void createQuadGeometry();
static auto getTextureID(SDL_Texture* texture) -> GLuint;
static void checkGLError(const char* operation);