Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Antialiasing le broken?  (Read 4819 times)

0 Members and 2 Guests are viewing this topic.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Antialiasing le broken?
« on: March 26, 2011, 12:46:37 pm »
Hi, I'm having trouble getting antialiasing to work, causing my shapes to look ugly.

Le minimal code: https://gist.github.com/888217

Result:
Code: [Select]
g++ -lsfml-graphics -lsfml-window -lsfml-system antialiasing_test.cpp
./a.out
Antialiasing level: 0
and thus a ugly pixelated shape.

I tested this on two computers running Arch Linux x86_64, one with NVIDIA proprietary drivers, one with Gallium3D drivers.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Antialiasing le broken?
« Reply #1 on: March 26, 2011, 07:24:46 pm »
Are you sure that your graphics driver supports it?
Laurent Gomila - SFML developer

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Antialiasing le broken?
« Reply #2 on: March 26, 2011, 07:43:34 pm »
Yes absolutely, at least the NVIDIA proprietary has been able to do it for ages and I can get smoothed edges in various games.

EDIT: glxinfo shows ms (multi sampling) capabilities. Perhaps the mechanism for getting ms capabilities is broken in SFML?

timesqueezer

  • Newbie
  • *
  • Posts: 3
    • View Profile
Antialiasing le broken?
« Reply #3 on: March 26, 2011, 09:14:09 pm »
It doesn't work on my x86_64 arch notebook too.
My output is exactly the same one sven gets.
I have the proprietary nvidia drivers installed.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Antialiasing le broken?
« Reply #4 on: March 26, 2011, 11:17:59 pm »
That would require some debugging. The GlxContext class chooses the best configuration using a custom algorithm (which is not very complex); maybe it chooses a configuration that doesn't have multisampling whereas there are some others available that have it. But as far as I remember, it works fine on my own Linux, so it will be hard for me to test.
Laurent Gomila - SFML developer

Ockonal

  • Jr. Member
  • **
  • Posts: 58
    • ICQ Messenger - 449909010
    • View Profile
    • WinCode
Antialiasing le broken?
« Reply #5 on: April 25, 2011, 12:44:37 pm »
Okay, latest sfml (from git), latest proprietary nvidia drivers (from testing repo in arch)
Quote
Antialiasing level: 0


And my glxinfo: http://pastebin.com/bBKQYv0w
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Antialiasing le broken?
« Reply #6 on: April 25, 2011, 12:50:41 pm »
I did some testing and it appears that sfml always picks the first entry of glxinfo even if that mode doesn't do ms (multisampling antialiasing). I hacked the code quite a bit but I can't seem to be able to come up with a better algorithm for picking the best display mode available.

gavintlgold

  • Newbie
  • *
  • Posts: 21
    • View Profile
Antialiasing le broken?
« Reply #7 on: May 16, 2011, 01:55:26 am »
A bit of a bump here, but I am having the same problem. Tried the test program and got the same result. Happens on one of my 64-bit systems. Nvidia proprietary driver.

I too was bumbling around with the code and noticed that only one visual was being returned by XGetVisualInfo (nbVisual is always 1), so the whole sorting by best visual does nothing.

I am running SFML 2.0 latest git (I changed the test code to use PollEvent rather than GetEvent).

glxinfo reports quite a few views that support multisampling. They all have Ncon caveats though.

Sorry, but I don't know too much about the details. Would be nice to have antialiasing though. My glxinfo is near precisely Ockonal's.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Antialiasing le broken?
« Reply #8 on: May 16, 2011, 02:09:25 am »

 

anything