[MaxGUI] Texture size problem

BlitzMax Forums/BlitzMax Programming/[MaxGUI] Texture size problem

*(Posted 2012) [#1]
I'm getting "unable to calculate tex size" on canvases that are 1024x1024 in size on a intel gma 950 netbook graphics system.

My question having looked at the forum is hasanyone ever got a definitive fix for this problem as it's totally random, sometimes it will error on drawimage and others it hurls on drawtext.

Any help would be appreciated :)

I'm on blitzmax 1.45

Last edited 2012


Grisu(Posted 2012) [#2]
Has to be your code... ;o)

I would recheck the image loading functions...

Found this on the forums.
"I'm getting an 'Unable to calculate tex size' error too and I've been using images successfully with the win beta for some time.

My instance of this error seemed to occur because I tried to load a png before I'd set the graphics mode. I know doing this was a big no-no with past versions of Blitz and I didn't intend to do it, but the fact that images were being loaded before the graphics mode was set was disguised by the way I was importing types with their own images. I keep each of my types in their own file and import them. Each type uses its own images which I make global to that types file, but private to the rest of the code. My problem was I'd declared 'Global SpriteImage = LoadImage(...)', so LoadImage was called before any main code was called. The solution was to just declare 'Global SpriteImage' and defer loading the image until an instance of the class had been created. That way I could be sure the LoadImage occurred after the graphics mode had been set."


*(Posted 2012) [#3]
I will have a look but I loading is done via a request file function to get filename then its loaded then displayed so with this in mind the whole system must set graphics mode before using the images as the whole thing is created before images.


skidracer(Posted 2012) [#4]
A canvas can be no wider or taller than your display, MaxGUI should not be letting you create it.


*(Posted 2012) [#5]
Ah ok that would explain it, thanks skid.

It creates it perfectly on my Intel GMA 950 no errors nothing just loading an image into it causes the problems.


Grisu(Posted 2012) [#6]
Did you find a solution for your issue?

My dad has an old laptop with integrated intel gfx chipset.
I could give you a hand if you need another platform test.