Texture as Sprite?
Blitz3D Forums/Blitz3D Programming/Texture as Sprite?
| ||
| 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 |
| ||
| 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. |
| ||
| 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. |
| ||
| 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. |
| ||
what about.....
mysprite = LoadSprite("mytexture.bmp")
or
mysprite = CreateSprite()
mytex = LoadTexture("mytexture.bmp")
EntityTexture mysprite,mytex
|