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!!

Recommended Answers

All 6 Replies

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.

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.

commented: Good ~SpS +3

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

commented: Nope -2

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.0/gdk/gdk-Drawing-Primitives.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.

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.

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.