Compare commits

...

3 Commits

Author SHA1 Message Date
8a044cbe86 feat: clang tidy corrections 2025-10-02 17:37:23 +02:00
c253fff7df feat: clang tidy correction 2025-10-02 17:33:13 +02:00
97b34962f7 feat: ignore .idea folder 2025-10-02 17:32:57 +02:00
2 changed files with 9 additions and 10 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
build/
build/
.idea/

View File

@ -55,7 +55,7 @@ int main() {
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEPTH_TEST);
glDebugMessageCallback(MessageCallback, 0);
glDebugMessageCallback(MessageCallback, nullptr);
Shader simpleShader;
simpleShader.init(
@ -73,8 +73,8 @@ int main() {
glm::mat4 model(1.f);
glm::mat4 projection = glm::perspective(
(float)M_PI_2,
(float)screenWidth / (float)screenHeight,
static_cast<float>(M_PI_2),
static_cast<float>(screenWidth) / static_cast<float>(screenHeight),
0.01f,
100.0f
);
@ -85,7 +85,7 @@ int main() {
// Object teapot = Object::LoadFile("./assets/kastrula/kastrula.obj");
// Object bricks = Object::LoadFile("./assets/bricks/bricks.obj");
Object lightSource = Object::LoadFile("./assets/cube.obj");
Object target = Object::LoadFile("./assets/car/car.obj");
Object target = Object::LoadFile("./assets/monkey.obj");
bool paused = false;
@ -99,7 +99,7 @@ int main() {
bool quit = false;
while (!quit) {
Uint64 currentTicks = SDL_GetTicks();
float deltaTime = (currentTicks - lastTicks) / 1000.0f; // seconds
float deltaTime = static_cast<float>(currentTicks - lastTicks) / 1000.0f; // seconds
lastTicks = currentTicks;
@ -133,7 +133,7 @@ int main() {
}
float mouseXRel, mouseYRel;
Uint32 mouseState = SDL_GetRelativeMouseState(&mouseXRel, &mouseYRel);
SDL_GetRelativeMouseState(&mouseXRel, &mouseYRel);
float sensitivity = 0.1f; // tweak as needed
yaw += mouseXRel * sensitivity;
@ -182,8 +182,6 @@ int main() {
}
}
// std::cout << "angle = " << angle << std::endl;
glClearColor(0x18/255.0f, 0x18/255.0f, 0x18/255.0f, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@ -225,7 +223,7 @@ int main() {
Uint64 elapsed = currentTicks - startTicks;
if (elapsed >= 1000) { // one second passed
double fps = (double)frameCount / (elapsed / 1000.0);
double fps = static_cast<double>(frameCount) / (static_cast<double>(elapsed) / 1000.0);
std::cout << "FPS: " << fps << std::endl;
frameCount = 0;
startTicks = currentTicks;