Sprite Candy Memory Image to Texture?Blitz3D Forums/Blitz3D Userlibs/Sprite Candy Memory Image to Texture?
| I'm a new user to Sprite Candy and while I like a lot of it, I have some 2d images in memory that I converted to a texture using HUD_LoadMemoryResource() but for some reason, even if I specify mode 4 and declare black as transparent, it's treating black as solid black when I display the layer, blocking out everything behind. These are runtime images that I can't simply load in from the disk but disk images seem to have no problems with transparency.|
Second problem I'm having is this: None of the object commands such as scaling and originpoint seem to work as the manual describes. For example, I have used HUD_LoadImageResource to load a picture, successfully so as it displays fine on a layer but when I try to use any command like HUD_SetObjectOrigin or HUD_SetObjectScale on that image it simply says "the specified object does not exist." Here's actual code - I don't get an error on line 1 so wonder why line 2 doesn't work?
HUD_SetObjectScale(CampaignBG,0.5,0.5) ; have tried 'CampaignBG' both with and without the '#' sign and get the same error regardless
Anyone out there know what I'm doing wrong on these two issues? Thanks in advance if you do.
Last edited 1+ years ago
| First problem, I had to do this:|
Transparency worked, but it was too slow to be used real time, so I am going to try something different.
I think the command you are trying to use 'set object scale' is to be used on an image. In order to have an 'image', first you need a texture, a layer and finally an image, like this:
;load image onto texture
;make a layer to put it on
;make the actual image
;then scale it
Hope this helps!