itfrombit / osx_handmade

OS X port of Handmade Hero
152 stars 18 forks source link

Just a heads up on opengl pixelformat stuff #4

Closed joekarl closed 4 years ago

joekarl commented 9 years ago

So I had someone run into this when they were running the swift platform code on an older macbook air and got a failure when trying to init the display link.

Specifically it seems that the user's macbook air didn't support double buffering (which is weird because basically all macs support double buffering via opengl, but that's what the machine reported :/ ).

I made the following changes to support him and add some fallback for machines without double buffer support. https://github.com/joekarl/swift_handmade_hero/commit/100f658fea60cc2c33a2569c4a0d341bf62d7cd7?diff=unified

Also needed to add a glFlush() inside of the display link callback to handle flushing for single buffer devices.

So just a heads up in case you run into anything like that...

itfrombit commented 9 years ago

Thanks for the head's up. Nice find!

itfrombit commented 4 years ago

Finally closing this one. The OpenGL version requirements have been updated, the event loop no longer uses display link, and it is probably safe now to exclude 10.7.5 from the list of supported versions. :)