LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-27-2012, 12:55 PM   #1
jvinodu
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
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: LFS-7.6, Slackware 14.1, FreeBSD 10.1
Posts: 3,676
Blog Entries: 15

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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
jvinodu
LQ Newbie
 
Registered: Sep 2012
Posts: 3

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

Hi,

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
resetreset
Senior Member
 
Registered: Mar 2008
Location: India
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,320

Rep: Reputation: 62
Out of curiosity, what are you writing?
 
Old 10-01-2012, 03:20 AM   #5
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
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
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,619
Blog Entries: 2

Rep: Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076
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.
  


Reply

Tags
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 11:30 AM.

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