Issues

Issue #538 resolved

Inclusion of OpenGL 2.0 and higher in the non-power-of-two texture check

Boolsheet
created an issue

The non-power-of-two texture check in Image.cpp only checks for the non-power-of-two texture ARB extension. Even though we have not encountered an implementation that didn't have the extension, I propose adding a check for OpenGL 2.0 to makes this bulletproof.

For completeness, here's the section from the OpenGL 2.0 specification that notes this "relaxation".

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.

The specification drops this text after OpenGL 3.0, but also doesn't seem to make restrictions on widths and heights of textures anymore.

Attached is a small patch that adds the GLee macro.