GLBasic forum

Main forum => Bug Reports => Topic started by: Crivens on 2011-Nov-26

Title: ROTOZOOMSPRITE strangeness
Post by: Crivens on 2011-Nov-26
Not sure how old this one is, but I have a simple circle png with one colour and just transparent colour around it (ie. no outline colour). All works fine with DRAWSPRITE. Oh and I forgot to mention I'm basically using the sprite like a simple paint package (using clearscreen -1 as it's faster than usescreen it seems on an ios device).

However if I use ROTOZOOMSPRITE then it puts an edge around it. It doesn't matter what I do with ALPHAMODE (which can cause a lesser edge with DRAWSPRITE if set to -1 but none at all with 0) ROTOZOOMSPRITE comes out with an edge.

I've included an example with DRAWSPRITE and another with ROTOZOOMSPRITE. Both with ALPHAMODE set to 0. Note that ROTOZOOMSPRITE was not rotated or scaled at all (0,1).

Cheers

[attachment deleted by admin]
Title: Re: ROTOZOOMSPRITE strangeness
Post by: MrTAToad on 2011-Nov-26
Using SMOOTHSHADING ?
Title: Re: ROTOZOOMSPRITE strangeness
Post by: Ian Price on 2011-Nov-26
Quote from: MrTAToad on 2011-Nov-26
Using SMOOTHSHADING ?
That's exactly what I was going to say!
Title: Re: ROTOZOOMSPRITE strangeness
Post by: Crivens on 2011-Nov-26
Smoothshading is false. But why would it be different between ROTOZOOMSPRITE and DRAWSPRITE? It's like ROTOZOOMSPRITE (even though not zoomed or rotated in my example) is automatically putting an outline around it.

Luckily I got around my problem by returning to DRAWSPRITE and using a POLYVECTOR line routine I found here to fill in gaps between sprites. Totally sorts out it all on mobile devices with high resolutions without slowing things down.

Cheers

Title: Re: ROTOZOOMSPRITE strangeness
Post by: MrTAToad on 2011-Nov-26
QuoteBut why would it be different between ROTOZOOMSPRITE and DRAWSPRITE?
Its possible that the rotation/zooming routine either automatically anti-aliases or Windows/OS graphics drivers do it automatically...
Title: Re: ROTOZOOMSPRITE strangeness
Post by: Crivens on 2011-Nov-26
Possibly although I can't remember seeing it before, and I used it quite a bit in my last game. On the other hand my last game wouldn't be that obvious come to think of it. 99% of the time it doesn't really matter I suppose, and is actually quite an advantage if you actually want to outline a sprite. Just is quite strange, and annoying when something doesn't do what you expect it to do.

Cheers