Anti-aliasing

brad789 wrote on Thursday, April 23, 2009:

I’ve been having problems getting anti-aliasing working. I’m building my program on vista with the latest drivers for my card(NVidia GeForce 7300GT). In NV control panel anti-aliasing is set to application controlled.

Here are the relevant parts of my code:

if \(\!glfwInit\(\)\)
\{
	LOG\_GEN\("GLFW init failed\!"\);
	return 0;
\}

LOG\_GEN\("\[main\] about to open glfw window with width: " << width << " height: " << height\);

glfwOpenWindowHint\(GLFW\_FSAA\_SAMPLES, 2\);

if\( \!glfwOpenWindow\( width, height, 8, 8, 8, 8, 32, 0, GLFW\_WINDOW \) \)
\{
    glfwTerminate\(\);
    return 0;
\}

LOG\_GEN\("\[main\] window creation succeeded " << width << " height: " << height\);

LOG\_GEN\("\[main\] fsaa samples: " << glfwGetWindowParam\(GLFW\_FSAA\_SAMPLES\)\);

in my log file I get {20:12:17} (3268) [main] fsaa samples: 0

I’ve tried a smaller depth buffer but didn’t have any luck.

brad789 wrote on Friday, April 24, 2009:

I should also mention that I’m using GLEW for opengl extensions and I include it before glfw.

brad789 wrote on Friday, April 24, 2009:

I got it working, when I reduced the depth buffer to 16 bits before I didn’t have it logging the result of glfwGetWindowParam(GLFW_FSAA_SAMPLES), I just visually checked it. Apparently it was working then, it just wasn’t as visible at 2x AA as I expected. Also just tested it at 24 bits for a depth buffer and that worked fine too. I guess my card just doesn’t support anti-aliasing at 32 bits.