Skip to content

[DEV BUG] NPOT capability check fails on GLES despite support for GL_OES_texture_npot extension #910

@kholbrook1303

Description

@kholbrook1303

Please confirm the following points:

  • This report is NOT about the Android apps in the Play Store
  • I have searched the project page to check if the issue was already reported

Affected Project

libprojectM (including the playlist library)

Affected Version

4.1.4

Operating Systems and Architectures

Linux (x86_64)

Build Tools

Build Tool: CMake

Additional Project, OS and Toolset Details

Working with VS 2022;
Using on Windows 11 and also in Raspberry Pi OS Bookworm

Type of Defect

Graphical issue (rendering glitches, no or broken rendering result)

Log Output

Logging I added to SOIL2 to determine what was occuring:
[2025-10-01 06:58:27] Checking NPOT texture capability...
[2025-10-01 06:58:27] Checking for GL extension: 'GL_ARB_texture_non_power_of_two'
[2025-10-01 06:58:27] Using modern glGetStringi method for GL >= 3.0
[2025-10-01 06:58:27] SOIL_GL_GetProcAddress: Trying to load function 'glGetStringi'
[2025-10-01 06:58:27] OpenGL ES platform with SOIL_NO_EGL defined: function pointer NULL for 'glGetStringi'
[2025-10-01 06:58:27] Failed to get glGetStringi function pointer.
[2025-10-01 06:58:27] Checking for GL extension: 'GL_OES_texture_npot'
[2025-10-01 06:58:27] Using modern glGetStringi method for GL >= 3.0
[2025-10-01 06:58:27] SOIL_GL_GetProcAddress: Trying to load function 'glGetStringi'
[2025-10-01 06:58:27] OpenGL ES platform with SOIL_NO_EGL defined: function pointer NULL for 'glGetStringi'
[2025-10-01 06:58:27] Failed to get glGetStringi function pointer.
[2025-10-01 06:58:27] GL_ARB_texture_non_power_of_two: NOT SUPPORTED
[2025-10-01 06:58:27] GL_OES_texture_npot: NOT SUPPORTED
[2025-10-01 06:58:27] NPOT capability: NOT PRESENT

Describe the Issue

While testing the sprite feature on Raspberry Pi 5 on Desktop OS Bookworm, I noticed that the textures were being resized. This did not occur on Windows.

The system is running:

  • OpenGL core profile version string: 3.1 Mesa 24.2.8-1~bpo12+rpt4
  • OpenGL ES profile version string: OpenGL ES 3.1 Mesa 24.2.8-1~bpo12+rpt4

The system does support NPOT textures: GL_OES_texture_npot

When using cmake with -DENABLE_GLES=ON the issue occurred, without did not, indicating this was due to GLES.
Upon checking, I noticed that in SOIL2.c there is a NPOT compatibility check which does indeed check for "GL_OES_texture_npot", however, there is an issue in SOIL_GL_ExtensionSupported.

In this case SOIL_X11_PLATFORM is defined and is running 3.1, but when trying to load 'glGetStringi' no address is returned because SOIL_GLES2 and SOIL_NO_EGL are both defined.

I have a fix for this by essentially failing over to the glGetString method (instead of returning unsupported) which does identify GL_OES_texture_npot properly therefore does not resize a NPOT texture.

If this is ok then I can post a PR, however please let me know if you would rather fix this in the SOIL_GL_GetProcAddress function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3rd-party-libBug or feature either relies/depends on or is caused by a third-party library.bugThe issue is (potentially) a bug.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions