Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Graphics in C

Status
Not open for further replies.

rjr9999

Programmer
Apr 7, 2001
183
0
0
US
Okay, I'm at a major loss here, and I havn't been able to find any books or help otherwise in this subject. I want to incorporate graphics in A windows or unix environment using C (not C++). Are there certain draw functions as in basic? Or does anyone know where I can learn more about this? You're help would be much appriciated, thank you.

Rob
 
Depends... for DOS graphics use BIOS interrupts i.e. Mode 13h/19dec pretty easy to work with (well at least if you have a BIOS call referrence book). For Windows use DirectX free to download from Microsoft. This may be overkill for what you need and it is somewhat advanced. Rob Marriott
rob@career-connections.net
 
Like CCTC1 says, graphics are very operating system dependant. I don't know about UNIX, but Windows will NOT allow you to do direct screen writes without an API layer like directx. However, for small simple graphics and just kicking around learning programming, you can call Windows API functions such as Ellipse() Rectangle() Polygon() etc to draw onto a device context such as the screen.



Kim_Christensen@telus.net
 
Where can I learn more about implimenting programs using direct X, as well as graphics in unix (gnome, Xwindows, or the like)...I'm hoping to make my program for both. Is the C language still used in creating these graphics, or is it different, and just called by the program? (leave it to billy to make things difficult). And by the way, thanks for the help :)

Rob
 
There are cross-platform graphics environments, although they are not
standard C. One popular one is Qt (see (no
endorsement implied here; I've never used it), and there are others.

If you're planning to write a commercial application, write it so that it looks
like other Windows applications. Unix users will be reasonably comfortable
with that, whereas Windows users will not be comfortable with anything that
doesn't look Windowsy.
 
QT is GREAT!!!
Ok, Almost :), but you can live with some problems or go around them.
This is 100% portable between (WINDOWS and any UNIX) GUI. It works great, and easy then MFC.
It was as a miracle for me when programm developed on Nt has been compiled on SGI and has the same look as Windows application. And it was not just "Hello world" program.
go to and find some demos.
but this is C++.
HIGHLY RECOMENDED! Through away your MFC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top