Still no FSAA on Windows

I’m now using Mikkel’s code exactly and the following code generates a
triangle with no antialiasing. I have GeForceFX 5900 Ultra and the driver has
FSAA set to “Application Controlled”. My main.cpp is:

#pragma comment(lib, “opengl32.lib”)
#pragma comment(lib, “glut32.lib”)
#pragma comment(lib, “glu32.lib”)
#pragma comment(lib, “sdl.lib”)
#pragma comment(lib, “sdlmain.lib”)

#include <windows.h>
#include <SDL.h>
#include <gl/gl.h>

int main(int argc, char** argv) {

if (SDL_Init(SDL_INIT_NOPARACHUTE | SDL_INIT_VIDEO) < 0) {
    OutputDebugString("SDL_Init failed\n");
    return -1;
}

SDL_GL_SetAttribute( SDL_GL_RED_SIZE,   8);
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE,  8);
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8);
    
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1);

SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4);

SDL_Surface* screen = SDL_SetVideoMode(640, 480, 32,

SDL_OPENGL|SDL_OPENGLBLIT);

while (true) {
    glClear(GL_COLOR_BUFFER_BIT);

    glViewport(0,0,640,480);
    glColor3f(1, 1, 1);
    glCullFace(GL_NONE);
    glBegin(GL_TRIANGLES);
        glVertex3f(-1,-1,-1);
        glVertex3f( 1,-1,-1);
        glVertex3f( 0, 1,-1);
    glEnd();

    SDL_GL_SwapBuffers();

    SDL_Event event;
    while (SDL_PollEvent(&event)) {
        switch(event.type) {
        case SDL_QUIT:
            exit(0);
        break;
        }
    }
}

return 0;

}

Can someone confirm that this code works for them? It doesn’t create any FSAA
for me. I’ll happily send you a binary to try as well, just e-mail me.

-m__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

It works fine here, win32 GeForce4 ti4200. Are you sure you havn’t set
it up so that applications isn’t allowed to enable fsaa? I’m using nvidias
drivers, and i have a little icon for it in the tray
nvidia tray icon->performance and quality settings
is where this can be set.
//Anders> ----- Original Message -----

From: morgan3d@yahoo.com (Morgan McGuire)
To:
Sent: Tuesday, November 04, 2003 1:36 AM
Subject: [SDL] Still no FSAA on Windows

I’m now using Mikkel’s code exactly and the following code generates a
triangle with no antialiasing. I have GeForceFX 5900 Ultra and the driver
has
FSAA set to “Application Controlled”. My main.cpp is:

#pragma comment(lib, “opengl32.lib”)
#pragma comment(lib, “glut32.lib”)
#pragma comment(lib, “glu32.lib”)
#pragma comment(lib, “sdl.lib”)
#pragma comment(lib, “sdlmain.lib”)

#include <windows.h>
#include <SDL.h>
#include <gl/gl.h>

int main(int argc, char** argv) {

if (SDL_Init(SDL_INIT_NOPARACHUTE | SDL_INIT_VIDEO) < 0) {
    OutputDebugString("SDL_Init failed\n");
    return -1;
}

SDL_GL_SetAttribute( SDL_GL_RED_SIZE,   8);
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE,  8);
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8);

SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1);

SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4);

SDL_Surface* screen = SDL_SetVideoMode(640, 480, 32,

SDL_OPENGL|SDL_OPENGLBLIT);

while (true) {
    glClear(GL_COLOR_BUFFER_BIT);

    glViewport(0,0,640,480);
    glColor3f(1, 1, 1);
    glCullFace(GL_NONE);
    glBegin(GL_TRIANGLES);
        glVertex3f(-1,-1,-1);
        glVertex3f( 1,-1,-1);
        glVertex3f( 0, 1,-1);
    glEnd();

    SDL_GL_SwapBuffers();

    SDL_Event event;
    while (SDL_PollEvent(&event)) {
        switch(event.type) {
        case SDL_QUIT:
            exit(0);
    break;
        }
    }
}

return 0;

}

Can someone confirm that this code works for them? It doesn’t create any
FSAA
for me. I’ll happily send you a binary to try as well, just e-mail me.

-m


Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Anders A wrote:

It works fine here, win32 GeForce4 ti4200. Are you sure you havn’t set
it up so that applications isn’t allowed to enable fsaa? I’m using nvidias
drivers, and i have a little icon for it in the tray
nvidia tray icon->performance and quality settings
is where this can be set.

No problem here either, nice and antialiased. Nvidia 52.16 drivers,
Geforce5200FX, w2k.

Regards,
\Mikkel