SDL + OpenGL graphics lag or am I doing something wrong?

Hello!

Recently I decided to build my little game using SDL+OpenGL on Linux. On Windows it runs very smooth, I use vsync, all is fine!
Now I went to Linux to try to port it, but I noticed that the graphic was lagging, its very strange. I have Nvidia driver installed and the vsync option is enabled.

I made a small example that makes a white square move around the screen, I move it 5 pixels at a time, 60x per second here (as my monitor is 60 Hz), the file is attached (Main.cpp). Please check if I am doing something wrong and test on your Linux machines to see if its lagging too!

Thank you!_________________________________________________________________
Voc? sabia que pode acessar o Messenger direto do seu Hotmail? Descubra como!
http://www.microsoft.com/brasil/windows/windowslive/products/tutoriais.aspx
-------------- next part --------------
A non-text attachment was scrubbed…
Name: Main.cpp
Type: text/x-c++src
Size: 2296 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090906/cee229b8/attachment.cpp

i tried it here and i get a white box that moves quickly left to right
with little cpu usage. what is your cpu usage ? are you sure nvidia is
loaded and working ?

mattOn Sun, 6 Sep 2009, Bruno Adami wrote:

Hello!

Recently I decided to build my little game using SDL+OpenGL on Linux. On Windows it runs very smooth, I use vsync, all is fine!
Now I went to Linux to try to port it, but I noticed that the graphic was lagging, its very strange. I have Nvidia driver installed and the vsync option is enabled.

I made a small example that makes a white square move around the screen, I move it 5 pixels at a time, 60x per second here (as my monitor is 60 Hz), the file is attached (Main.cpp). Please check if I am doing something wrong and test on your Linux machines to see if its lagging too!

Thank you!


Voc? sabia que pode acessar o Messenger direto do seu Hotmail? Descubra como!
http://www.microsoft.com/brasil/windows/windowslive/products/tutoriais.aspx

Thank you matt, yesterday I figure it out. I disabled the “visual effects” from ubuntu desktop and now its very smooth. Its very weird isnt it? I dont know how I came to the conclusion to disable it, but it worked! o.O_________________________________________________________________
Voc? sabia que com o Hotmail voc? tem espa?o ilimitado para guardar seus e-mails? Come?e a usar j?!
http://www.microsoft.com/brasil/windows/windowslive/products/hotmail.aspx