Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Sprite clipping

DBPro Master
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Sep 2013 07:23
I was thrilled when I first discovered that AppGameKit supported sprite clipping (scissor). I always wished DB had such a function. Tonight, I thought to myself, why couldn't it be created?

By resizing the sprite and manipulating its UV data, it is possible. It does have limitations, however, such as if the sprite you want to clip has already changed its size from default or uses an offset. In that case, you would have to adapt the function to retrieve the proper default size dimensions elsewhere (you'd have to keep track manually)

French gui
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 28th Sep 2013 13:05
Nice and useful as always. Thanks for sharing.

Login to post a reply

Server time is: 2023-10-03 03:00:02
Your offset time is: 2023-10-03 03:00:02