Texture Size confirmation

BlitzMax Forums/BlitzMax Programming/Texture Size confirmation

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm still not convinced about the minimum texture size in GL, so I'll move stuff from my previous post here..

As far as I can tell, Bmax makes no attempt at limiting the minimum texture size and GL seems to allow textures under 64x64...
Strict

SetGraphicsDriver GLMax2DDriver()

Graphics 800, 600, 0
SeedRnd MilliSecs()

Local pmap:TPixmap = CreatePixmap(16, 17, PF_RGBA8888)
For Local p=0 Until (pmap.capacity / 4)
	Int Ptr(pmap.pixels)[p] = $ff000000 | Rand($ffffff)
Next

Local image:TImage = LoadImage(pmap, 0)

Local width, height
glBindTexture(GL_TEXTURE_2D, TGLImageFrame(image.Frame(0)).name)
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, Varptr(width))
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, Varptr(height))

Local scl = 10

Cls
DrawText "Image size   = " + image.width + " x " + image.height, 12, 12
DrawText "Texture size = " + width + " x " + height, 12, 24

SetScale scl, scl
DrawImage image, 24, 48

DrawLine 24, 48, 24 + width, 48, False
DrawLine 24 + (width * scl), 48, 24 + (width * scl), 48 + height
DrawLine 24, 48 + (height * scl), 24 + width, 48 + (height * scl),False
DrawLine 24, 48, 24, 48 + height, False  

Flip

WaitKey()

End

...GL appears to create a 16x32 texture and even returns those figures as the texture size (unless I've misunderstood what glGetTexLevelParameteriv() does?).

??