LineWidth(1) invisible?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

LineWidth(1) invisible?

Post by miko »

Hello,
I can not see lines of width 1. Is it only me? Attached is a sample program and the screenshot of what I get.
I am on linux, using love 0.7.1 compiled with luajit2. Can anyone confirm/deny this error?
Screenshot of what I get
Screenshot of what I get
linewidth.png (7.54 KiB) Viewed 5467 times
Attachments
LineWidthError.love
Shows problem with lines of width 1
(7.25 KiB) Downloaded 172 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: LineWidth(1) invisible?

Post by Boolsheet »

Do you have a intel graphics card? It's possible that the intel linux driver does something fishy.
The code that draws the line will change in LÖVE 0.8.0 and fix this problem.
Shallow indentations.
User avatar
Ghuntar
Prole
Posts: 29
Joined: Wed Nov 25, 2009 8:56 am

Re: LineWidth(1) invisible?

Post by Ghuntar »

And You can test by drawing the same "1 width line" but not exactly horizontal or vertical ==> They will appear.
Crazy Little Thing Called LÖVE.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: LineWidth(1) invisible?

Post by miko »

Boolsheet wrote:Do you have a intel graphics card? It's possible that the intel linux driver does something fishy.
The code that draws the line will change in LÖVE 0.8.0 and fix this problem.
Yes, that would be the case, its i950 driver, Intel GM45 Chipset. Thanks for the info.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: LineWidth(1) invisible?

Post by miko »

Ghuntar wrote:And You can test by drawing the same "1 width line" but not exactly horizontal or vertical ==> They will appear.
That's what I have shown in the original screenshot: the circle was drawn, but the rectangle was not (for the LineWidth of 1). But I guess you have not looked at the code, so there should be 2 rectangles and 2 circles, each of linewidth 1 (red) or 2 (green).
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LineWidth(1) invisible?

Post by bartbes »

This is because the line is drawn between pixels, if you use an axis-aligned line with width 1, but at coordinates offset by 0.5, you'll probably see them pop up. (So love.graphics.line(0, 50.5, 800, 50.5) for example.)

EDIT: Note that this is a workaround for the bug, it's no solution.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: LineWidth(1) invisible?

Post by Lafolie »

I'm not showing off in any way whatsoever here, but I'd like to demonstrate what is going on here with a screenshot. Take a look at the difference between these two windows, both using the exact same code provided here:
Image

There's quite a stark difference here. I feel that this serves as a good reminder that what you see one your screen is not always what other people see on theirs, regardless of the cross-platform nature of the framework. There is always going to be some differences created through external factors. Although, in this case, I was quite surprised at the level of difference. It's all so very interesting.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Ghuntar
Prole
Posts: 29
Joined: Wed Nov 25, 2009 8:56 am

Re: LineWidth(1) invisible?

Post by Ghuntar »

miko wrote:
Ghuntar wrote:And You can test by drawing the same "1 width line" but not exactly horizontal or vertical ==> They will appear.
That's what I have shown in the original screenshot: the circle was drawn, but the rectangle was not (for the LineWidth of 1). But I guess you have not looked at the code, so there should be 2 rectangles and 2 circles, each of linewidth 1 (red) or 2 (green).
No need to read your code, I have the same driver problem : Intel GMA900 under linux.
Crazy Little Thing Called LÖVE.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: LineWidth(1) invisible?

Post by TechnoCat »

Boolsheet wrote:Do you have a intel graphics card? It's possible that the intel linux driver does something fishy.
The code that draws the line will change in LÖVE 0.8.0 and fix this problem.
Is it going to force points to be at 0.5 offsets?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LineWidth(1) invisible?

Post by bartbes »

No, it changes the way lines are drawn (fixing another issue with scaling).
Post Reply

Who is online

Users browsing this forum: No registered users and 77 guests