How to doing a transparency clearscreen?

Previous topic - Next topic

spacefractal

I dont use clearscreen at all for the main drawings of the backgrounds.

But I doing drawing sprites using pngs with alpha, and I drawing them to a offscreen screen (USESCREEN 2). This is for avoid eventuelly seams artifact when scaled down.

This is not a option of course for the backbuffer, but its would been very neat to do that on offscreen screens aswell.

etc doing someting like CLEARSCREEN -2 for no color wipeout? (howover -1 could do that IF used other than screen 0).


I tried using CREATESCREEN in each frame, but is painfully slow....

Code (glbasic) Select

LOCAL frame, animframe, w, h
USESCREEN 2
frame=imageGet("Game")
GETSPRITESIZE frame, w, h
CREATESCREEN 2, frame, w, h
animframe=imageGet("tiles")
USESCREEN 2
DrawMap(animframe, scr_X, 40, 0, 0, w, h)

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

Nice idea. So far try:
Code (glbasic) Select

USESCREEN 2
SETTRANSPARENCY RGB(0,0,0)
DRAWRECT 0,0,999,999,RGB(0,0,0) // will draw black colour _AND_ transparent alpha