Tex size

BlitzMax Forums/BlitzMax Programming/Tex size

AKJ(Posted 2005) [#1]
I am trying to use BlitzMax for the first time on Windows.

Why I try to compile/link/run the MAC OS examples (under Windows) I quite often get the error message:
"Unable to calculate tex size".

What does this message actually mean?

Is the error raised because of cross-platform differences or am I doing something wrong?

Anthony Jordan


Dreamora(Posted 2005) [#2]
Problem with PearPC
Only running in window mode is possible on PearPC

As windows user you better take the windows beta.


AKJ(Posted 2005) [#3]
I AM using the Windows beta to run the MAC OS sample programs. It is then that I get the "Unable to calculate tex size" error.

By-the-way, what is a PearPC?

Anthony Jordan


Floyd(Posted 2005) [#4]
Experiment with different screen resolutions.

Also try windowed mode by setting a depth of zero: Graphics 640, 480, 0.


xlsior(Posted 2005) [#5]
PearPC is an Apple emulator for Windows, allowing you to run Mac OS X on a windows PC. One major shortcoming is that it emulates OpenGL in software rather than using the hardware openGL, and it doesn't support full-screen OpenGL, but only in windowed mode.

Most people that ran into the Invalid Tex Size error so far were running the Mac version of BlitzMax under PearPC, or ran on ancient mac's that didn't support full screen openGL.

Apparently you are running the native windows version on Windows, it sounds like your computer has limited support for OpenGL, which would be a major issue.

You can try to change the graphic mode of a program to use windowed mode as mentioned by Floyd above. However, since you are getting this error in the first place, it might indicate that your video adapter doesn't support the full range of openGL features... In which case you might be limited to windowed mode, and possibly extremely slow graphical performance.

It could also simply be a driver issue -- what make/model video adapter is in your computer?

You may want to try to locate & install the latest drivers from the manufacturer, that can make a huge difference for some cards.


Wayward(Posted 2005) [#6]
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.