OpenGL extension GL_ARB_texture_non_power_of_two was not found.
GrantG

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

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

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

Richard Phipps

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

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

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

Arthur Kalliokoski

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.

Fladimir da Gorf

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.

Richard Phipps

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

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

Richard Phipps

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
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?

Thread #589712. Printed from Allegro.cc