problem with scaleimage and imagebuffer

Blitz3D Forums/Blitz3D Programming/problem with scaleimage and imagebuffer

vivaigiochi(Posted 2012) [#1]
I draw an image, after i try to scaleit, but when i scale to a less dimension i see two image the oldest and the newest (scaled) resized image. So seems it's a problem with imagebuffer..after scaleimage i see two image..can anyone help me?

ps when i scale to a larger dimension of original obviolsy i don't see two image because the newest is bigger.


MusicianKool(Posted 2012) [#2]
Add cls and flip in your main loop.
The Blitz3d help example for scaleimage doesn't make use of buffer swapping. So all the scaled images are drawn on only the frontbuffer. Not a problem really.

example, if you return to using backbuffer



Example if you are using frontbuffer. Just take out the flip.



vivaigiochi(Posted 2012) [#3]
Don't work, have tried two combinations but the result is equal and don't change.

; MAIN LOOP IS THIS

While Not KeyHit(1)
;CONTROLLO DI INTERAZIONE CON UTENTE
Cls()
inkey%=GetKey()
mh=MouseHit(1)
startDraw ;use fast image
; set 'alpha' blend mode for drawing
SetAlpha 0
;command for scale are inside showbuttonmodules()
ShowButtonModules()
EndDraw
Flip()
Wend

Last edited 2012


add(Posted 2012) [#4]
Make sure you refresh the image buffer after rescaling.