texture does not exist

Blitz3D Forums/Blitz3D Beginners Area/texture does not exist

Polarix(Posted 2016) [#1]
i checked so many times it does exist!!!


Zethrax(Posted 2016) [#2]
Good to know bud, but if you want any actual help with that you're going to have to post a code example.

Normally you'll load your texture and store the handle value output by the loading command in an integer variable, type field, array slot, etc.

tex = LoadTexture( "my_texture_file.jpg" )

If the 'tex' variable holds a zero at this point then either the 'LoadTexture' command couldn't find the texture file, or the texture file is not something the 'LoadTexture' command could actually recognize as a texture image.

If the problem occurs when you try to use the texture in some way then either the texture object has been deleted or the texture handle value has been changed by your program (possibly by a global-local variable scope issue). Check the value of the texture handle before you apply it and see if the value is the same as it was when you loaded it.

Looks like we've had this exact same conversation a couple of times before though, and apparently you've learned nothing about asking intelligent questions since then. Kind of a waste of time answering you if you have no interest in learning anything from the answers.

http://www.blitzbasic.com/Community/posts.php?topic=106924
http://www.blitzbasic.com/Community/posts.php?topic=106888


RemiD(Posted 2016) [#3]
See how Zethrax keeps his calm and doesn't become angry that the question has been already answered 2 times by several people. This is a great demonstration of self control. :P


Dan(Posted 2016) [#4]
post the code example and please .zip your picture and upload it. > google search for tiny file upload.<


or use following example to test your picture


Graphics 800,600,32,2
Graphics 800,600,32,3

picturepath$="example.jpg"

If FileType(picturepath$)=0 Then RuntimeError("File does not exist")

pic= LoadImage(picturepath$)

If pic=0 Then RuntimeError "File was not loaded, it is, maybe, in a wrong Format."

Repeat
	Cls
	DrawImage pic,0,0
	Delay 1
Until KeyDown(1)



RemiD(Posted 2016) [#5]
Try to load one of the textures which you can find in one of the Blitz3d demos (in Blitz3d\samples\), at least you know that these are not corrupted files.
Then once you know your code is correct and it works well, try to load your own texture file and see what happens.
Maybe your texture file is corrupted ?