[SDL] Multisampling and Resize problem

Göttling Thomas Goettling at TMC-Multimedia.de
Sun Jul 2 01:04:23 PDT 2006


Hi
 

Recently we upgrade to the newest SDL 1.2.11
Now we expect 2 Problems with the OpenGL context. May this a Problem in SDL?

Multisampling doesn’t work 
  
This is our Initialisation of the Window:

      SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1); 
      SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8); 
      SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL , 0 );
      SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );

      if(antialisingwert > 0) {
            if( SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1 ) != 0) 
                  popup("Error Multisampel Buffer");       
            if( SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,
antialisingwert) != 0)

                  popup("Error Multisamples");
            int buffers, samples;
            SDL_GL_GetAttribute( SDL_GL_MULTISAMPLEBUFFERS, &buffers );
            SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES, &samples );
           DEBUG("Buffers: %d Samples: %d", buffers, samples);

      }

             /////// SOME CODE ////////

      screen = SDL_SetVideoMode(width, high, bpp,
SDL_DOUBLEBUF|SDL_OPENGL|SDL_HWSURFACE|SDL_RESIZABLE); 

            //////// SOME CODE //////////

 
      int Buffers, Samples; 
      SDL_GL_GetAttribute( SDL_GL_MULTISAMPLEBUFFERS, &Buffers );
      SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES, &Samples );
      if( antialisingwert > 0 && ( !Buffers || !Samples ) ) {
            popup("Multisampling failure");
      } else {
        // FSAA was enabled.
      }
 
Antialisingwert is set to 4 in this Example.
The Return value by the Deub out is: Buffers: 0 Samples: 1 

Why Antialising ist´n working? Im´m Using a GForce 6600 

 
Second Problem – Resize the GL window 
Risizing do Work. I Also resize the GL Matrix, and everything else.

Problem:
- I Start with a Window 1024x786
- Now I Resize the Window biger in both directions

SDL_PollEvent
Dont generate Events, if i move the Mouse higher than 1024
 in the old Rect
of 1024x768 its working fine, but in the “new Areas” there is no
Mouse-Motion event

 Best Regards, and thanks for your Time!

 
Thomas Göttling

 







More information about the SDL mailing list