I may not be fully understanding what is happening with the code below, but could anyone please tell me why the black bars appear in the CreateRenderImage() example below. I was kind of expecting just a red square to be created in the example I have give, somehow there are black borders as well.
`set window properties
SetWindowSize( 1024, 768, 0 )
SetDisplayAspect (3.0/4.0)
`create background sprite
createsprite(1,0)
setspritesize(1,GetVirtualWidth(),GetVirtualHeight())
SetSpriteColor(1,0,0,255,255)
SetSpritePosition(1,0,0)
gosub _create
do
Sync()
loop
_create:
CreateRenderImage(1,512,512,0,0)
SetRenderToImage (1,0)
squareSprite = createsprite(0)
setspritesize(squareSprite,100.00,100.00)
SetSpriteColor(squareSprite,255,0,0,255)
SetSpritePosition(squareSprite,0,0)
DrawSprite(squareSprite)
DeleteSprite(squareSprite)
setrendertoscreen ()
createsprite(2,1)
SetSpriteSize(2,50.00,-1)
SetSpritePosition(2,0,0)
return
www.polaraul.com