Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » OpenGL extension GL_ARB_texture_non_power_of_two was not found.

Credits go to Richard Phipps for helping out!
This thread is locked; no one can reply to it. rss feed Print
OpenGL extension GL_ARB_texture_non_power_of_two was not found.
GrantG
Member #8,173
December 2006
avatar

That was showing up in the OpenLayer log every time an image was loaded. I don't know any OpenGL so I'm not quite sure what that means. The result of this is images not displaying on screen. Any help with this would be great. Thanks

Richard Phipps
Member #1,632
November 2001
avatar

It means your textures have to be a power of 2 in their width and height. I.e. 16 x 16, 32 x 32, 64 x 64, 128 x 128, 256 x 256, etc..

GrantG
Member #8,173
December 2006
avatar

Why does that error happen on some computers and not others though? I was loading 50x50 PNGs btw.

Richard Phipps
Member #1,632
November 2001
avatar

It depends if your openGL graphic driver supports the extension AND if your gfx card does.

Try making your images 64 x 64 PNG's and see if you see anything.

GrantG
Member #8,173
December 2006
avatar

Nope changing them to 64x64 didn't help, I suppose it's an OpenGL driver or Gfx card problem because my computer has no trouble with this error.

EDIT: What OpenGL version is needed to fix this?
EDIT: I don't think the gfx card supports OpenGL (or not very well), thanks for the help anyway.

Fladimir da Gorf
Member #1,565
October 2001
avatar

It's not an error, just a message. By the way, are you using OL 2.0 or a later version?

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Arthur Kalliokoski
Second in Command
February 2005
avatar

I would assume your program is checking for power-of-two somewhere and then aborting when it's not found, regardless of actual image dimensions. Now that you've ensured that your images are powers of two, you can remove the check.

They all watch too much MSNBC... they get ideas.

Fladimir da Gorf
Member #1,565
October 2001
avatar

It's OpenLayer that is checking for the extension, and it doesn't matter if it isn't found. I think I've disabled that message in the later (SVN) versions of OL, just not to confuse everyone.

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Richard Phipps
Member #1,632
November 2001
avatar

GrantG: What gfx card do you have? It might be that the last SVN version of OpenLayer and the SVN version of AllegroGL will work for you.

Fladimir da Gorf
Member #1,565
October 2001
avatar

He didn't say that it doesn't work, he's just wondering what the message is all about.

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Richard Phipps
Member #1,632
November 2001
avatar

No, he said in the first post:

Quote:

I don't know any OpenGL so I'm not quite sure what that means. The result of this is images not displaying on screen.

Milan Mimica
Member #3,877
September 2003
avatar

if (
!allegro_gl_extensions_GL.ARB_texture_non_power_of_two && !allegro_gl_extensions_GL.ARB_texture_rectangle && !allegro_gl_extensions_GL.NV_texture_rectangle
#ifdef ALLEGRO_MACOSX
!allegro_gl_extensions_GL.EXT_texture_rectangle
#endif
) {
create_video_bitmap() with NPOT size will fail.
}

Can someone check if OL could trigger this AGL bug?

Go to: