Issue #538 resolved

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

Boolsheet avatarBoolsheet 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.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.