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

Author Topic: Antialiasing Stepdown and Available Antialiasing Levels  (Read 4279 times)

0 Members and 1 Guest are viewing this topic.

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Antialiasing Stepdown and Available Antialiasing Levels
« on: December 22, 2009, 06:01:57 pm »
I have an idea for you. Instead of just defaulting to an Antialiasing level of 2/0 if an attempt at a higher level of Antialiasing fails, why don't you "step down" much like the OpenGL Contexts? For example, my ATi Drivers allow Antialiasing Levels that are Powers of 2, why don't you step down between those Powers?

Also, could you possibly create a function that will allow us to see which Antialiasing Levels are available?
I use the latest build of SFML2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #1 on: December 22, 2009, 07:38:36 pm »
You're right, I should probably do that.

Quote
Also, could you possibly create a function that will allow us to see which Antialiasing Levels are available?

I don't know if it is possible.
Laurent Gomila - SFML developer

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #2 on: December 22, 2009, 10:30:39 pm »
Quote from: "Laurent"
You're right, I should probably do that.

Quote
Also, could you possibly create a function that will allow us to see which Antialiasing Levels are available?

I don't know if it is possible.
Well, Valve was able to do it in their Source Engine games, except that was DirectX, so depending on how they did it, there MIGHT be a way in OpenGL. Maybe have a function that returns whether an AA Level passed to it is valid or not by attempting to create a context? Then again, I don't know how creating contexts works, so it could take too long.
I use the latest build of SFML2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #3 on: December 22, 2009, 10:44:26 pm »
DirectX indeed provides an easy way of doing this. But it's completely different with OpenGL, the context creation totally depends on the API provided by the OS (WGL, GLX, AGL, EGL), and those generally provide no way of retrieving the supported antialiasing levels. Testing a given value would be possible though, but it needs a valid context to be created first (at least on Windows).
Laurent Gomila - SFML developer

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #4 on: December 23, 2009, 06:28:58 pm »
dunno about normal window-level multisamplin, but EXT_Framebuffer_Multisample defines MAX_SAMPLES_EXT for glGetIntegerv

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #5 on: December 23, 2009, 06:38:36 pm »
This one is just related to the FBO extension (rendering to texture).
Laurent Gomila - SFML developer

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #6 on: December 23, 2009, 07:13:05 pm »
I know, but I would expect something similar to exist for regular multisampling

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #7 on: December 23, 2009, 08:42:15 pm »
Nop, this is completely different. Rendering to texture is handled 100% by OpenGL, whereas creating a context for a window relies on the API provided by the OS, which has nothing to do with OpenGL itself.
Laurent Gomila - SFML developer

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #8 on: December 23, 2009, 09:05:06 pm »
so the wgl and glx extensions don't define anything? oh well... you could probably just make a couple hidden windows to check for support of the individual modes.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #9 on: December 23, 2009, 09:50:12 pm »
I already do it, it's not a big deal. I could loop on antialiasing values from 0 to N and check if they are supported by trying to create a context; but it's not the only parameter, and if it fails I have no way to know what's not supported (can be antialiasing, but also depth or stencil buffer for example).
Laurent Gomila - SFML developer

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #10 on: December 29, 2009, 06:47:58 am »
I'm just curious, since it's been 5 days, but is the step-down at least going to be implemented soon?
I use the latest build of SFML2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Antialiasing Stepdown and Available Antialiasing Levels
« Reply #11 on: December 29, 2009, 10:06:49 am »
Absolutely.
Laurent Gomila - SFML developer