bglTexFromBitmap problem

BlitzMax Forums/BlitzMax OpenGL Programming/bglTexFromBitmap problem

Can anyone see what I'm doing wrong?

Local pm:TPixMap = LoadPixmap("dude.bmp")
Local Texture = bglTexFromPixmap(pm,True)


All I get is a runtime error saying:
"Unable to calculate tex size"

I've tried different images&formats but all I get is that error.

I'm using an Intel 82845 gfxcard.(Newest drivers installed)

Function bglAdjustTexSize( width Var,height Var )

Helper Function To calculate nearest valid texture size

This functions rounds width And height up To the nearest valid texture size

Use Graphics before you load a Texture.
Mfg Suco

it appears he is using openGL not Max2d. Graphics command should not apply. he needs to create a context

You can use OpenGl commands with Graphics, it doesn't have to be a specific context.

Aha!, thanks guys.
Now it works.

Aha!, thanks guys.
Now it works.



GREAT! now what did you do to get it working? Cause I am having the exact same problem!