Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I am looking for a simple graphics library for c, I would like it to work cross platform, and do simple things like draw lines in various colors, or turn points on and off. If anyone knows of a good graphics library to do this simply, please let me know.
Is it important that it's for C? For stuff like that, Java is amazing.
Yes, because I know c and have the tools to use it, and I do not feel like having a large number of tools for a large number of languages on my computer, and I do not feel like learning a new programming language at the moment, because I am still learning c and have to get used to my new school.
Ncurses will let you do colors and arrangement for text, but you're going to be hard-pressed to do drawing without learning OpenGL 2D commands.
foamy3 wrote:
Is it important that it's for C? For stuff like that, Java is amazing.


Java uses C libraries for things like that Wink

@OP: Enter SDL: http://www.libsdl.org/

SDL + OpenGL (its simple - really) will do anything you want. However, if you want something up and running really quickly and don't need much in the way of keyboard, mouse, networking, and audio, try GLUT + OpenGL.

The OpenGL Redbook should get you started (and then some): http://www.glprogramming.com/red/
"@OP"? What is this, Fark or something? But ignoring that for a second, I found OpenGL surprisingly easy to learn for one of my projects that required 2D graphics in C/C++, and I strongly recommend getting familiar with it.
KermMartian wrote:
"@OP"? What is this, Fark or something?


No... It was so that it was easy to tell where the response to foamy ended and my response to the OP began...

You been hanging it out in the wrong parts of the internet lately, Kerm?
Kllrnohj wrote:
KermMartian wrote:
"@OP"? What is this, Fark or something?


No... It was so that it was easy to tell where the response to foamy ended and my response to the OP began...

You been hanging it out in the wrong parts of the internet lately, Kerm?
Apparently. Razz 4Chan is still strictly off-limits, though. Ignoring that and getting back on topic, what advantages does GLUT have other than dumbing down OpenGL substantially?
KermMartian wrote:
Apparently. Razz 4Chan is still strictly off-limits, though. Ignoring that and getting back on topic, what advantages does GLUT have other than dumbing down OpenGL substantially?


No, GLUT doesn't dumb down OpenGL, GLUT dumbs down the GUI code needed to get an OpenGL window. GLUT gives you an opengl window, a very basic event manager (keyboard, mouse, and joystick, thats about it), and is cross platform.

Just to illustrate how simple I mean, look at: http://www.sgi.com/products/software/opengl/examples/glut/examples/source/simple.c

In 5 lines of code an OpenGL window was created, a reshape and redraw event callback was wired, and the main even loop was entered. Doesn't get much simpler than that. The rest is all standard OpenGL stuff. As it happens, the example sets up drawing for 2D mode...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement