On Tue, 31 Jul 2012 07:02:30 -0700, bob smith wrote:
> Yes, glGetString(GL_EXTENSIONS) did fail with GL_INVALID_ENUM.
>
> Here's a list of the extensions on my Macbook Pro:
[snip]
> I guess my textures have to be power of two?
Have you tried?
It's possible (and quite likely) that it's just not listed as an
extension. The OpenGL 2.0 specification says:
I.3 Non-Power-Of-Two Textures
The restriction of textures to power-of-two dimensions has been relaxed
for all texture targets, so that non-power-of-two textures may be
specified without generating errors. Non-power-of-two textures was
promoted from the ARB texture non power of two extension.
So in theory, anything reporting an API version of 2.0 or greater should
support non-2^n textures regardless of any extension.
In theory, you should check whether the functionality is available via the
core OpenGL API (via glGetIntegerv() with GL_MAJOR_VERSION and
GL_MINOR_VERSION), and check whether it's available as an extension as a
fallback. For extensions which add new functions, the function will have a
vendor or ARB suffix if it's an extension, but not if it's part of the
core API.
Most of the implementations I've encountered retain extensions even after
the extension has been incorporated into the core API[1], in order to
maintain compatibility with legacy code. E.g. my (fairly recent) ATI card
reports an API version of 4.2 yet lists 281 extensions, the majority of
which have long since been promoted to the API.
[1] With modern cards, this can result in glGetString(GL_EXTENSIONS) being
long enough to cause problems with older programs (either a buffer overrun
or truncating the string and missing some extensions), which probably
explains the introduction of glGetStringi().
Apparently, Apple's implementation doesn't do this (all of your extensions
are either GL_APPLE_* or are fairly new features). If you're getting
GL_INVALID_ENUM for glGetString(GL_EXTENSIONS), you appear to be getting a
3.x "core profile" context, so backwards compatibility isn't applicable
(lack of support for extensions will probably be less of an issue than the
lack of support for most of the 1.x API).
However: the glTexImage2D manual page for both 3.3 and 4.2 still says:
GL_INVALID_VALUE is generated if non-power-of-two textures are not
supported and the width or height cannot be represented as 2^k+2(border)
for some integer value of k.
In my experience, the manual pages can contain outdated information,
sometimes for long periods. It's likely that the 3.x and 4.x manual pages
were based upon the 2.x manual pages, with new details added and old
details not necessarily removed.