search

Graphics in C++

I'm trying to put together a simple graphical visualiser for the simulator I'm writing. All it needs to display are a rectangular arena, a couple of circles for the agent and the object it's tracking, and some lines to represent the agent's field of vision. It seems to me that this ought to be pretty easy, but I know nothing about graphics programming at all, so I'm looking for a library that I can use to simplify the process.

The problem is that I'm working on a Mac, and so far the only things I've found are very low-level, and entail a lot more work than makes sense when my requirements are so basic. I did find one library that looked ideal and had the added bonus of claiming to be cross-platform, but it turns out to require X Windows, and I couldn't get it to work with the X terminal that's built in to Mac OS.

Can anyone point me to a suitably high-level library for Mac OS or (even better) that will give me cross-platform graphics?

Trackbacks

Trackback URL for this entry is: http://blog.case.edu/exg39/mt-tb.cgi/534 Multi-Platform Graphics Library
Excerpt: Research in Progress is looking for a C++ graphics library. This isn't my arena, but isn't GTK a good library...
Weblog: Jeremy Smith's blog
Tracked: February 28, 2005 01:45 PM

Comments

Consider using an external tool like graphviz.

If you want to actually do the graphics yourself, consider perhaps OpenGL - it actually does have 2d routines alongside the 3d ones, and it is cross platform. If you stay away from the 3d stuff, it shouldn't be too complicated.

Posted: February 28, 2005 11:42 AM

Ken,

Thanks for the advice. Unfortunately what I'm looking for is real-time; I already have a Mathematica notebook set up for putting movies of runs together after the fact.

So far I've tried CImg (the one I described in the post) and SDL, which seems to have compile errors in its source code that I really don't want to mess around trying to fix.

Posted: February 28, 2005 01:46 PM

There is no reason that OpenGL/GLUT cannot be done in realtime. Quake was done with OpenGL.

Posted: February 28, 2005 11:33 PM

perhaps I wasn't clear: that comment was about using Graphviz. OpenGL would certainly work, it just seems... more complicated than I need to be messing around with.

Posted: February 28, 2005 11:40 PM

Hello Sir,
i am a student,doing graduation,in Kerala,India.I am interested in studying graphics. can u suggest some interesting sites with nice tutorial on graphics

Posted: January 24, 2006 10:21 AM

I get a surprisingly large number of these "I am a student, can you help me?" comments in response to this particular post, and I must confess to finding them rather irritating. It's not that I object to helping people out, but that the commenter clearly has neither read this post properly nor looked at the rest of this site. If they had, two things would have been clear:

a) I don't have this information. If I did, I wouldn't have been asking other people for it.

b) I am proactive about information sharing, so if I found the answer to this question, I would have posted it online.

I am quite eager to share information and help people whom I have the knowledge to help, but I have little patience with those who are too lazy to even the read the post they're commenting on.

Until recently I had just been deleting the comments, but I decided that maybe if I leave one up and explain why I don't have anything useful to respond with, maybe other people will read this and stop bothering me.

Posted: January 24, 2006 10:58 AM

Eldan Goldenberg: I agree, some people just push it too much, and most of them know how to get the information they're looking for, but just want to be spoon fed. I mean, yes learning programming is tough, but without the motivation -putting some effort to try getting the information- it gets very boring, and they just end up annoying others.

Posted: May 3, 2007 04:00 PM

Franko: I think you're probably right, but on a purely personal level that's not what annoys me about these comments. I don't mind people asking for help—at worst I'll just point them somewhere else, and that doesn't require much of my time—it's just that they should have the courtesy to read the post, rather than just seeing a headline and ignoring the bit where I make clear that I don't have the information they're after.

Posted: May 3, 2007 04:14 PM

Post a comment