Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-27-2012, 12:55 PM   #1
LQ Newbie
Registered: Sep 2012
Posts: 3

Rep: Reputation: Disabled
Question SDL OpenGL or DirectFB

Hi all

I need to write program which requires very high frame rate say above 200FPS.
Portability requirement is that it should run on as many Linux distributions as possible.

I would like to know which graphics library is best suited.
(SDL OpenGL or DirectFB
Old 09-27-2012, 10:08 PM   #2
LQ Guru
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,379
Blog Entries: 15

Rep: Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955Reputation: 1955
OpenGL is the primary API of choice for hardware acceleration of graphics on any variant of UNIX.
Old 09-28-2012, 07:42 AM   #3
LQ Newbie
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Smile I have tried following


I have used the following.

Use OpenGL using QGLWidget of Qt. with DRI (Direct Rendering Infrastructure) turned on.
For a window of 1200x1000 I could achieve Frame Rate = 57 frames per second.
For a window of 1200x400 I could acheive Frame Rate = 150 frames per second

I have copied a texture using glTexImage2D
each frame I am updating the texture using glTexSubImage2D

I have enabled automatic tex-coordinate generation
then set proper functions for S an T coordinates.
then simply drawing a QUAD to flash the texture on the screen.

whreas with SDL I got more FPS.

Can I improve on this.

J. Vinod Kumar
Old 10-01-2012, 02:59 AM   #4
Senior Member
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
Out of curiosity, what are you writing?
Old 10-01-2012, 03:20 AM   #5
Senior Member
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 12.04/14.04, Scientific Linux 6.3/6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,799

Rep: Reputation: 157Reputation: 157
You have to ask yourself a fundamental question...

Did he fire six shots or only five,... Nope, Sorry,... that's not it!

The question is;
Are you looking at frame rate from the perspective of display of a two dimensional video, or are you looking at displaying polygons, overlays or underlays... ???

If you are talking 2D acceleration, you very well might have better luck with SDL. If you are talking 3D,... then it's OpenGL all the way...

By the way,... the human eye cannot distinguish more than about 35-45 frames per second. So the high frame rate, does it relate to something else???
Old 10-01-2012, 06:11 AM   #6
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
The distinction between OpenGL or SDL is not of much use if you talk about 3D. SDL uses OpenGL for 3D acceleration.
Also, higher framerates are always good for two reasons:
1. The user of your app may have a less powerful 3D card, so if you optimize you app for high framerates the user may still have a good experience.
2. If you get high framerates you can activate image enhancing features, like anti-aliasing and anisotropic filtering.
1 members found this post helpful.


directfb, opengl, sdl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java vs OpenGL vs SDL vs ????? LinuxNoob75 Programming 12 12-08-2007 05:30 PM
Using SDL/OpenGL, need help. kornerr Programming 33 11-20-2005 12:19 AM
sdl / opengl - cant press up and right atrain Linux - Games 2 03-28-2005 12:29 AM
Using OpenGL (+SDL) for 2D programs R00ts Programming 4 07-16-2004 01:33 PM
OpenGL lighting with SDL MadCactus Programming 0 09-21-2003 12:52 PM

All times are GMT -5. The time now is 08:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration