Interesting discoveries about 4.3
It's been a couple of days since 4.3 hit, so I was wondering if you've found anything interesting in the new extensions, besides the obvious of course. Things like unexpected ways one could use the new stuff and so forth.
I found something interesting in ARB_copy_image. Normally, it doesn't allow format conversions; it's a straight-up mem-copy. However, it does allow format conversions in certain respects. Namely, from compressed formats to uncompressed ones and back.
It doesn't actually do the decompression; it basically just copies the block data into integer texture formats as is. But by doing it this way, it becomes possible to read the block data directly and thus implement a decompressor with a rendering pass (that does the actual decompression by sourcing the integer texture containing the blocks). Of course, that's not particularly sexy.
Where it gets interesting is that you can implement a shader-based compressor, by writing blocks to an integer texture and then copying it to a compressed one of the proper format. One could even implement an OpenCL/etc solution, where you write the blocks to an integer texture and copy_image them into the compressed texture.
Any other discoveries you'd like to share?
I ran across something interesting when upgrading the GLSDK. Namely, these enumerators:
The latter is just an enumerator for the state that says whether an attribute is a double or not. The former is more interesting.
See, GL 4.3 added the ability to actually find out which versions of GLSL that a particular GL implementation supports. Each version of GL is required to support specific versions of GLSL, but this query (with glGetIntegerv and glGetStringi) allows you to ask which GLSL versions beyond these are supported.
This is interesting because this is pure-core behavior. There is no extension governing this. Which means that you must have 4.x-class hardware to ask what shaders it is compatible with.
That seems... silly.