103% of use cases use the returned value directly without checking, so
we might as well do the check ourselves. Added new function hasCurrent()
and added deprecated backward-compatibility conversion and -> operators.
Wow, that creeped to a lot of places.
Last dinosaur from the pointer age.
It returns different value based on whether the cube map is immutable
(allocated using setStorage()) or a sequence of setImage() calls, well,
at least on my NVidia. That should not happen, workaround incoming.
I expect the drivers to return size of *one* face when I'm querying that
particular face using the pre-DSA or EXT_DSA API and size of *all* six
faces when I'm querying whole texture using DSA API.
One can dream, eh?
It appears that, at least on my NVidia, the returned value does not
depend on whether I'm querying all faces or a single one, but RATHER
is based on whether the texture is immutable or not. How's that
predictable at all?! Workaround in the next commit.
Pre-DSA code paths need to specify for which face we are querying the
level parameters, which meant that all other calls had to specify the
(implicit) target too. I'm also preparing to put a cubemap-specific
workaround in the level parameter query and that really shouldn't be
present in the generic implementation for all texture types.
The other place where a specific target is needed is in setImage()
implementations, but these are rather big chunks of code and I don't
feel like copying these verbatim to cubemap implementation just to
isolate the workaround in one place.
I'm experiencing weird inconsistencies when querying
GL_TEXTURE_COMPRESSED_IMAGE_SIZE on cube map textures, it seems to
depend on whether the texture is complete/immutable or not, this is a
first part of an attempt to nail it down.
That was unprofessional from me, sorry, because it didn't even compile.
When I got it to compile, it crashed right away, because I was querying
GLX function instead of WGL function. But even after that it was still
crashing BECAUSE APPARENTLY YOU HAVE TO CREATE CONTEXT TO BE ABLE TO
CREATE CONTEXT, YO DAWG.
Fuck all this GL shit. Gimme something sane already. Ugh.