LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-02-2009, 09:54 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
graphics in gcc


In our department we did c programmes in linux ,in gcc in previous semester.In this semester we have graphics programming in c.
We use turbo c in xp in our lab to do graphics programming .
can any one help me to do the graphics programing in gcc.............
we use rhel5 in our lab...
 
Old 02-02-2009, 10:07 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
...what do you mean by "graphics programming"? Graphics engines for games and such, or graphical user interfaces, or...?
 
Old 02-02-2009, 10:11 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by indienick View Post
...what do you mean by "graphics programming"? Graphics engines for games and such, or graphical user interfaces, or...?
graphics programming such as drawing circle,line etc.. using c
 
Old 02-02-2009, 10:16 AM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Did you write your own rendering library, or did you #include one when using Turbo C?

If you included a library, look into Cairo.
 
Old 02-02-2009, 11:59 AM   #5
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Rep: Reputation: 17
Turbo C has a built in graphics library (you're talking about graphics.h, right?), however it's not part of the C language. On linux you'll have to use a separate library.

The most similar one to Turbo C's library is svgalib so learning it won't take long. However this library is a bit restricted to use under linux, for instance it works only on the console (not X) and it requires root permissions. If you prefer something more general I would recommend GGI or SDL.

What library you choose in the end has little or nothing to do with gcc.
 
Old 02-02-2009, 01:18 PM   #6
alex1983-0112
Member
 
Registered: Apr 2008
Location: Russia
Distribution: Fedora Core
Posts: 30

Rep: Reputation: 16
I recommend you to use libjpeg, libpng. If you don't want it - use QT or GTK widgets to draw lines, circles, etc.
 
Old 02-02-2009, 01:30 PM   #7
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by divyashree View Post
In our department we did c programmes in linux ,in gcc in previous semester.In this semester we have graphics programming in c.
We use turbo c in xp in our lab to do graphics programming .
can any one help me to do the graphics programing in gcc.............
we use rhel5 in our lab...
Take a look at libSDL.
 
Old 02-02-2009, 01:44 PM   #8
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by ErV View Post
Take a look at libSDL.
it's already installed
 
Old 02-02-2009, 02:12 PM   #9
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by divyashree View Post
it's already installed
Which doesn't mean you are already using it in your projects. Besides you didn't tell anything about SDL in your first post.
Either use SDL surfaces with per-pixel operations in DOS style, or OpenGL for higher-level drawing (lines, polygons, etc).

Last edited by ErV; 02-02-2009 at 03:37 PM.
 
Old 03-08-2009, 11:45 AM   #10
FragBoog
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Rep: Reputation: 0
Can an opengl app be run from the command line? or does it need some flavor of xwin framework in the background?
 
Old 03-08-2009, 01:43 PM   #11
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
http://cairographics.org/
 
  


Reply



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
Graphics programming in gcc? vipul jain Programming 1 11-08-2008 07:27 AM
support for graphics in gcc alice_neo Programming 5 11-30-2007 12:12 PM
GCC c library for graphics on Linux seminumerical Linux - Software 1 12-22-2005 10:06 AM
Graphics mode in GCC alexiezt Programming 1 01-28-2005 06:56 AM
graphics programming with gcc mamta_k Linux - Software 1 06-01-2004 07:28 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration