-
Notifications
You must be signed in to change notification settings - Fork 261
Description
I was stuck for over an hour trying to figure out why my triangle wasn't showing up, and by following another tutorial, I found out that a call to glViewport was the one missing thing. It's required if you want opengl to render to a resizable screen, but I'm guessing that SFML automatically does it when the window resizes, but in my case, using SDL3, it was definitely required. It's also required for GLFW. Nothing was showing up other than the screen being cleared, and I was so confused. I thought was in my code, SDL, the opengl loader I'm using (GLAD)? I poured over my code for literally over an hour just tweaking little things here and there, but it was just this one missing instruction.
Even if it might not be essential if you're using SFML, I still think it should mention it in the 'context creation' chapter, and maybe a little reminder in the drawing polygons chapter, since if you're just using the tutorial as a reference, people might skip over the context creation chapter.
I'm not exactly sure what to write, since I'm a beginner, and I don't want to get any details wrong, so sorry for not just contributing this myself.