bglTexFromBitmap problem

BlitzMax Forums/OpenGL Module/bglTexFromBitmap problem

Sweenie(Posted 2005) [#1]
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)


bradford6(Posted 2005) [#2]
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


Suco-X(Posted 2005) [#3]
Use Graphics before you load a Texture.
Mfg Suco


bradford6(Posted 2005) [#4]
it appears he is using openGL not Max2d. Graphics command should not apply. he needs to create a context


ImaginaryHuman(Posted 2005) [#5]
You can use OpenGl commands with Graphics, it doesn't have to be a specific context.


Sweenie(Posted 2005) [#6]
Aha!, thanks guys.
Now it works.


DH(Posted 2005) [#7]
Aha!, thanks guys.
Now it works.



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