Macs now have support for OGL 3.3 (or rather, have had for a while), up from 3.2. That means that we can now enjoy some “new” nice features:
- Sampler objects! Texture data is stored in texture objects as before, but how the texture is read (filtering, clamp mode, lod levels, etc) is controlled by a separate bindable sampler object, leading to cleaner set-up code.
- GLSL vertex input layouts and fragment output layours! No need to query locations anymore, you can set them directly from GLSL: [icode]layout(location = 0) in vec3 position;[/icode] and [icode]layout(location = 0) out vec4 fragColor;[/icode]
- Boolean occlusion queries, that are faster than occlusion queries that count the total number of samples that pass since it can stop occlusion testing after a single sample passes.
- And last but least: Timer queries, allowing my GPU profiling to work on Macs.
Since Macs are the lowest common denominator, it’s time to update your OGL code!