User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 391,120 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,375 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 1010 | Replies: 6
Reply
Join Date: Jul 2007
Posts: 8
Reputation: sainiricha is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sainiricha's Avatar
sainiricha sainiricha is offline Offline
Newbie Poster

Help Starting Graphics in C

  #1  
Jul 9th, 2007
Can anyone help me out to start graphics in C!!!
i cant understand what books i need to reffer n which online tutorials i should take!!
Last edited by sainiricha : Jul 9th, 2007 at 6:38 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 3,252
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 20
Solved Threads: 367
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: Starting Graphics in C

  #2  
Jul 9th, 2007
Graphics invariably requires some kind of library.
But to choose a library which might suit you, we need to know which operating system and compiler you're intending to use.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Mar 2005
Posts: 154
Reputation: TkTkorrovi is on a distinguished road 
Rep Power: 4
Solved Threads: 11
TkTkorrovi's Avatar
TkTkorrovi TkTkorrovi is offline Offline
Junior Poster

Re: Starting Graphics in C

  #3  
Jul 9th, 2007
What do you mean by graphics? If you want to write some games, you should use either opengl for 3d or sdl for 2d (both cross-platform). But if you want edit boxes, menus etc, and 2d graphics also, the best is GTK http://www.gtk.org. Because it's not commercial like qt, and it's for C, using it you'll also understand how to do the object-oriented programming in C (I mean C, not C++). GTK is available for Linux, Windows and Mac OS X. It's the best joice because it is cross-platform, it is not right to choose a library based on Windows API, because Windows API always changes, and one day we may have not Windows, but a new operating systems, so if you want that your programs would work and there would also be any use of your knowledge in the future, write programs which at least can be ported to Linux. GTK can be installed in Windows, and used no matter what compiler you have, but its installation is somewhat complicated, as you have to manually install many components into a directory tree. So in Windows, the best is to use cygwin, which installs everything automatically, just like Linux.
Reply With Quote  
Join Date: Aug 2007
Posts: 8
Reputation: siddharthrainit is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
siddharthrainit siddharthrainit is offline Offline
Newbie Poster

Re: Starting Graphics in C

  #4  
Aug 18th, 2007
Originally Posted by sainiricha View Post
Can anyone help me out to start graphics in C!!!
i cant understand what books i need to reffer n which online tutorials i should take!!

you need not to refer any book for c graphic if u want to learn the graphic programing in c then just go help and read and annalyes the graphic.h there are all function are given there which may help you to know about the c graphic
Reply With Quote  
Join Date: Mar 2005
Posts: 154
Reputation: TkTkorrovi is on a distinguished road 
Rep Power: 4
Solved Threads: 11
TkTkorrovi's Avatar
TkTkorrovi TkTkorrovi is offline Offline
Junior Poster

Re: Starting Graphics in C

  #5  
Aug 18th, 2007
graphics.h is a turbo c header, turbo c is an old commercial compiler which is not maintained any more, there is no practical use of such compiler. Try not to learn useless things, use cross-platform compiler like gcc, this would never go out of use. These are the GTK drawing functions http://developer.gnome.org/doc/API/2...rimitives.html This is a very simpel drawing kit as well. If you want to do some more advanced drawing, like gradients, antialiased drawing etc, then you should use something more advanced, like libcairo. If all you are ever going to do, is writing games, use SDL, or even better opengl if these have to be 3d games. But even then when there once should be menus and dialog boxes in your game, a full GUI like GTK might still be better.
Knowledge is regarded by the fool as ignorance, and the things that are profitable are to him hurtful. He liveth in death. -- Thoth the Atlantean
Reply With Quote  
Join Date: Aug 2005
Posts: 595
Reputation: SpS is on a distinguished road 
Rep Power: 4
Solved Threads: 30
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: Starting Graphics in C

  #6  
Aug 18th, 2007
Originally Posted by sainiricha View Post
Can anyone help me out to start graphics in C!!!
i cant understand what books i need to reffer n which online tutorials i should take!!

You can make use of AGAR
Agar is a set of libraries for developing graphical applications that are portable to numerous platforms. Agar is free software. The Agar source code is freely usable and re-usable by everyone under the BSD license. The Agar libraries are implemented in ANSI C and are portable to every platform supported by the SDL library.
Last edited by SpS : Aug 18th, 2007 at 9:38 am.
Reply With Quote  
Join Date: Mar 2005
Posts: 154
Reputation: TkTkorrovi is on a distinguished road 
Rep Power: 4
Solved Threads: 11
TkTkorrovi's Avatar
TkTkorrovi TkTkorrovi is offline Offline
Junior Poster

Re: Starting Graphics in C

  #7  
Aug 18th, 2007
Yes i know about agar, there are also several other graphics libraries which are built on opengl. Opengl is a cross-platform library itself, therefore anything built on it is also cross-platform... But, when i last looked agar, it was still kind of half thing, maybe they finished it now... But, none of these libraries is very widespread, and the reason is that who use opengl or sdl, is mostly interested only in games, and not in any gui... And also these who already use some gui library, are not interested in any game libraries such as sdl and opengl... Therefore, such libraries have not much users, so also cannot be expected that they would be well-developed, and so such library can hardly ever be any universal solution... Well and, it would also not be considered a serious solution... This is why i also didn't start to use agar, but use gtk, which is widely used and the most free of such...
Last edited by TkTkorrovi : Aug 18th, 2007 at 1:09 pm.
Knowledge is regarded by the fool as ignorance, and the things that are profitable are to him hurtful. He liveth in death. -- Thoth the Atlantean
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 6:06 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC