Unable to calculate tex size

BlitzMax Forums/BlitzMax OpenGL Programming/Unable to calculate tex size

Got a bit of a problem using OpenGL on XP...

The game works just fine on Mac OSX 10.3.9 but crashes with the following error message on Win XP sp2:

Unhandled Exception: Unable to calculate tex size


at the line with GLTexFromPixmap here:

	Local pix:tpixmap
	
	pix = LoadPixmap( "data/misc/flare.png" )
	flare_tex = GLTexFromPixmap( pix )


Not sure if it's relevant but here is how I setup the grahics:

SetGraphicsDriver GLGraphicsDriver()
Graphics screen_w,screen_h,0

MoveMouse screen_w_half, screen_h_half
HideMouse()

glClear GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT

glenable GL_TEXTURE_2D
glenable GL_DEPTH_TEST								'Enables Depth Testing
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST)
glBlendFunc(GL_SRC_ALPHA, GL_ONE)
glEnable(GL_BLEND)


Anyone got any solution?

Edit:
I am setting the graphics before trying to load the image, so this was not a solution for me: http://www.blitzmax.com/Community/posts.php?topic=43320
This didn't work either: http://www.blitzmax.com/Community/posts.php?topic=53842