GLBasic forum

Main forum => Bug Reports => Topic started by: FutureCow on 2009-Oct-21

Title: Multisampling bug?
Post by: FutureCow on 2009-Oct-21
This bug took me ages to pin down and drove me nuts trying to find it!!!  :rant:

Create a new project, 1024x768, not fullscreen, multisampling = 4
Code (glbasic) Select

DRAWLINE 100,100,100,500, RGB(255,255,255)
SHOWSCREEN
MOUSEWAIT


If you look at the line it's drawn, instead of being perfectly straight, it gets a little pixel added to the end on the side.
Turn multisampling to 0 and it goes away.

I wouldn't have thought multisampling would only affect the end pixel, but it does. It happens regardless of whether you draw horizontal or vertical lines.

With multisampling=4, it you use a png to draw a sprite of a box, you get a perfect box, multisampling doesn't affect it. Instead if you use 4 lines to draw the same box, you get a box with pixels sticking out.
Title: Re: Multisampling bug?
Post by: Kitty Hello on 2009-Oct-21
Oops. I have no idea. I'm not using multisampling at all. Try DRAWRECT instead...maybe?
I remember drawing such a pixel when you draw a line, since it's missing otherwise when you disable multisampling...
Title: Re: Multisampling bug?
Post by: FutureCow on 2009-Oct-21
I'll turn multisampling off (I've got no need for it, I just thought things would automatically look better with it on), and I'll also use a png of a rectangle instead (from memory drawrect can only draw a filled rectangle and I need an empty one).
Title: Re: Multisampling bug?
Post by: Kitty Hello on 2009-Oct-22
With 4 drawrect calls you can draw a frame ;)
I do this a lot in DDgui.