views:

2641

answers:

7

As in title, i need a 2d graphics library that is cross-platform, and provides simple functions, like in Basic; essentially, i only need to paint a pixel a certain color-I do not need hardware acceleration, or any kind of 3d support. I've found a couple ones, but they're not cross-platform.

Anyone knows a solution for me?

+5  A: 

[In no particular order.] However, if you have any other requirements, let us know. BTW: I am not just posting results of a Google query here, I have used all of these (and SDL -- wrote my first few games in SDL :) and I'd say without a set of requirements, it's very difficult to choose among the ones listed.

dirkgently
why qt 4.2? the latest version of qt is also good i reckon :)
Emile Vrijdags
I had the doc links for 4.2 handy -- so mentioned it in the post.
dirkgently
Agreed, Qt (4.5) is also an excellent choice.
Lucas Cardoso
+2  A: 

I would recommend DISLIN. It's cross platform, has support for many languages, and has very intuitive naming of routines.

Also, just noticed that nobody mentioned PLPLOT, also cross platform, multi lingual ...

ldigas
While DISLIN seems pretty cool, it is worth noting that it cost $180 pr developer for non-commercial use.
@dagw - you mean for commercial use. It is free for non commercial use.
ldigas
+13  A: 

What about SDL?

Perhaps it's a bit too complex for your needs, but it's certainly cross-platform.

Lucas Cardoso
SDL is indeed more than Agasa needs, but it should be straightforward enough to use.
Matt Olenik
It worked with minimal effort. The fact that sdl-config exist and that debian had all the stuff preinstalled helped a lot. I agree it's overkill but it's simple enough for what i need. Thanks a lot for everything!
+1  A: 

GTK, QT, WxWidgets - heavy-weight; FLTK, Fox, Tk, Lua IUP, Ultimate++, dlib - lightweight; SDL, Cairo - drawing frameworks without GUI widgets

qwer
A: 

Am I missing something to wonder why noone suggests OpenGL? To use it for 2d would be very simple. The OP only wants to color a pixel. It doesn't get simpler than glBegin/glColor/glVertex/glEnd.

Jim Buck
OpenGL doesn't guarantee identical pixel output across implementations.
Blank Xavier
If the guy is using it for 2d pixel coloring, meaning lighting/texturing/etc. is turned off, it should absolutely have identical output.
Jim Buck
A: 

One neat engine I came across is Angel-Engine. Info from the project site:

  • Cross-Platform functionality (Windows and Mac)
  • Actors (game objects with color, shape, responses, attributes, etc.)
  • Texturing with Transparency
  • "Animations" (texture swapping at defined intervals)
  • Rigid-Body Physics
    • A clever programmer can do soft-body physics with it
  • Sound
  • Text Rendering with multiple fonts
  • Particle Systems
  • Some basic AI (state machine and pathfinding)
  • Config File Processing
  • Logging
  • Input from a mouse, keyboard, or Xbox 360 controller
    • Binding inputs from a config file
  • Python Scripting
    • In-Game Console

Some users (including me) have succesfully (without any major problems) compiled it under linux.

schmrz