puklaus's picture

List of FSAA levels

Project:The Open Toolkit library
Version:1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:open
Description

Method that returns available list of supported FSAA levels, so can list them to menu.


Comments

JTalton's picture

#1

I was having problems getting FSAA working. It came down to that I was requesting a 32-bit depth buffer and that was causing it not to use FSAA. GraphicsMode(32, 32, 0, 4)
Once I moved to a 24-bit depth, it works good. GraphicsMode(32, 24, 0, 4)

I then wanted to enumerate what sampling modes the video card supported so I did:

foreach (int samplecount in new int[] { 0, 2, 4, 6, 8, 16, 32, 48, 64 })
{
    Console.WriteLine(new GraphicsMode(32, 24, 0, samplecount).Samples);
}

It writes out 0, 2, 4, 6, 8, 16, 32, 48, 64 which does not seem right as it does not do all those modes.

I know internally that OpenTK can enumerate all the GraphicsModes that are supported. Is there any way we can expose that list?

the Fiddler's picture

#2

I've fixed the bug that caused GraphicsMode to return incorrect results to your code (simple lazy evaluation gone awry): r2654 of 1.0 branch (or wait for 1.0 rc2).

Quote:

I know internally that OpenTK can enumerate all the GraphicsModes that are supported. Is there any way we can expose that list?

That would be too easy. :-)

No, OpenTK doesn't enumerate all GraphicsModes internally. It queries the driver and returns the closest match directly.

Getting such a list would require a non-trivial rewrite of the relevant code, plus an amount of duplicated logic (we'd have to find the best match ourselves instead of relying on the driver). I plan to do this eventually, but this is one of those features that don't fare very well in the "implementation difficulty versus value" scale.