Texture as Sprite?

Blitz3D Forums/Blitz3D Programming/Texture as Sprite?

Physt(Posted 2004) [#1]
Can anyone point me to a code sample that uses a texture as a 2d sprite? I want to load a jpg into a texture and be able to pan and zoom.

Thanks


Bot Builder(Posted 2004) [#2]
Um, I'm not sure exactly what your asking. 2d sprites don't exist. 2d images are possible. In that case you just do a copyrect. if it's a 3d sprite then just use the loadsprite command.


Physt(Posted 2004) [#3]
I want to load a jpg into a texture and the paint it on the screen using a function like CopyRect and have the ability to scale the rectangle in and out.

I know that CopyRect only works on images and not textures. I was hoping there was some code to handle textures in a 2d manner.


Who was John Galt?(Posted 2004) [#4]
The whole difference between a texture and an image is that a texture is for painting onto 3D objects and an image is for use with 2D commands. Look up createsprite (I think). You can texture,rotate and scale these.


TartanTangerine (was Indiepath)(Posted 2004) [#5]
what about.....

mysprite = LoadSprite("mytexture.bmp")

or
mysprite = CreateSprite()
mytex = LoadTexture("mytexture.bmp")
EntityTexture mysprite,mytex