Can't load ANY textures!

Blitz3D Forums/Blitz3D Beginners Area/Can't load ANY textures!

chwaga(Posted 2008) [#1]
Blitz3D is acting up, I think. I'm running on windows vista, and I can't load any textures at all using loadtexture(). The code is:

tex = LoadTexture("fire.bmp")
ScaleTexture tex, .1, .1
EntityTexture room, tex


and the image "fire.bmp" is in the same folder as the .bb file. No matter what I do, I simply can't load textures into blitz, unless the texture is set in a .b3d file!! Anybody got any ideas?? This was working fine on my old XP machine. Textures work fine if they're created in blitz, but I can't load textures. I can load images, but not textures.


KillerX(Posted 2008) [#2]
What are the dimensions of the image?


Cp(Posted 2008) [#3]
Is this all you have for the program??? Post the ENTIRE source.
+ I have vista too, it works fine.
Did you save it in that folder before you ran it(The blitz file)? I make the same mistake a lot.
If you scale the texture that small, and its already small, you probably wont be able to see the texture at all.
Another idea...Did you make/load the room and tex BEFORE you textured it?Check the order of the commands.


Ross C(Posted 2008) [#4]
Make sure your using the most up to date blitz version. One of the recent blitz versions had a bug where you had to type the correct case of the text.

if the file was called Fire.BMP and you do:

loadimage("fire.bmp")

It wouldn't load. But i suppose, if you can load images, it's unlikely.


chwaga(Posted 2008) [#5]
I'm using blitz version 1.99, it works fine on my other computer.


markcw(Posted 2008) [#6]
Does LoadImage work?


Cp(Posted 2008) [#7]
Loadimage and loadtexture are two different things.


Warner(Posted 2008) [#8]
And are the texture width and height a power of two ?


Mortiis(Posted 2008) [#9]
I'm using blitz version 1.99, it works fine on my other computer.


Maybe you should update your vista drivers for the graphics card.


Gabriel(Posted 2008) [#10]
You haven't, by any chance, defined Tex as a float, have you? I've seen that work on some computers and fail on others. ( You wouldn't expect it to always work on one computer and always fail on another, I know, but I have seen it reported that way.)


markcw(Posted 2008) [#11]
Post a full code example, otherwise we'll just be guessing.


Floyd(Posted 2008) [#12]
LoadTexture() is used in many of the sample programs which come with Blitz3D. Do they fail?


Warner(Posted 2008) [#13]
Actually .. I've had this problem once with Maplet, where a certain texture wouldn't load. The workaround I found was opening a working texture in paint and copy-pasting the one that wouldn't load into it and save it under a different name.


Dreamora(Posted 2008) [#14]
sounds like you are using non power of 2 non square textures -> breaking DX7 specification -> modern drivers will just drop the texture, not like old ones "internaly handle it"

Blitz3D compensates part of the incapability to read by stretching the texture to power of two. but they still won't be square so on GF6 for example they will not show up at all.


Cp(Posted 2008) [#15]
If none of us are right...BUG REPORTS!


*(Posted 2008) [#16]
I would resave the image as a png and try that, tbh some bmp's ive used have caused problem in the past but I havent had a problem with png's :)


chwaga(Posted 2008) [#17]
okay, when I changed the texture dimensions to power of two's, it worked, except that doesn't make any sense that it would would with non-power-of-two textures on XP


KillerX(Posted 2008) [#18]
It depends on the graphics card, not on the operating system.