this post was submitted on 20 Jul 2023
1 points (66.7% liked)
Game Development
3409 readers
35 users here now
Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
@nexusnovaz I recommend at-least checking out the official documentation.
Yeah, ive been referring a lot to it. Just wanted to see if there were any videos as i prefer watching over reading but i have been using Lazy Foo's tutorial. But thanks, ill keep reading and seeing what i can find
Just a quick heads-up: I've been working with SDL2 and OpenGL lately, using LazyFoo's tutorials, and there's a tiny point that could save you hours of head scratching. I e-mailed them about it but either they didn't read it or thought I was mistaken, because the page hasn't changed.
In the part where they talk about "SDL and Modern OpenGL", they use OpenGL 3.1, and make a very explicit note at the bottom of the page that you DON'T need to create a vertex array object, because that only became a requirement in OpenGL 3.2 and above. That appears to be correct according to the specification, but from my searches it lools like there is more than one OpenGL implementation/driver that incorrectly DOES require VAOs, even for OpenGL 3.1. If you compile the Lazy Foo example code and it mysteriously does nothing (it won't crash, it just won't draw anything), this might be why. It may be that all you need to do is add one line that creates a VAO in the initialization. Since the example code never changes any settings, you won't have to actually do anything with it.
Oh, i hadnt gotten that far yet, but ill keep that in mind. Thanks!