SFML community forums

General => Feature requests => Topic started by: OniLinkPlus on December 22, 2009, 06:01:57 pm

Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: OniLinkPlus 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?
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: Laurent 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.
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: OniLinkPlus 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.
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: Laurent 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).
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: l0calh05t on December 23, 2009, 06:28:58 pm
dunno about normal window-level multisamplin, but EXT_Framebuffer_Multisample defines MAX_SAMPLES_EXT for glGetIntegerv
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: Laurent on December 23, 2009, 06:38:36 pm
This one is just related to the FBO extension (rendering to texture).
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: l0calh05t on December 23, 2009, 07:13:05 pm
I know, but I would expect something similar to exist for regular multisampling
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: Laurent 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.
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: l0calh05t 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.
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: Laurent 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).
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: OniLinkPlus 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?
Title: Antialiasing Stepdown and Available Antialiasing Levels
Post by: Laurent on December 29, 2009, 10:06:49 am
Absolutely.