Graphic

Pages: 12
Hello

Firstly I dont know if this is the right part of forum to write this but I decided to do that :)

I have a question if in C++ language is some simple graphic mode/libary/something, like in Pascal (graph), but also I want some which can paint JPG images but it can be also some other (BMP,PNG,...).

Thanks for answers :)
C++ does not have native support for graphics. You'll need to use a graphics api like SDL or SFML to accomplish this.
closed account (zb0S216C)
Return 0 has mentioned some good graphics libraries but there are two others: DirectX and OpenGL. DirectX is for Windows only which is powerful, supports sound, networking, visuals and I/O. However, OpenGL is also powerful and cross-platform but only works with visuals. There are quite a few debates on which of the two libraries are better performers so you'll have to choose. Note that both libraries are free.
Last edited on
both libraries are free.
I'd say that neither is free...
Mesa 3D is a free implementation of OpenGL.
closed account (zb0S216C)
@Bazzy
I've never come across a price tag on either DirectX or OpenGL.
It's free as in beer though.
I wouldn't use the GNU's very particular definition of "freedom" as default. It's not really free if you can't do what you want with it. Certainly not free as in freedom.
closed account (z05DSL3A)
Going off topic a bit.


On topic edit:
Return 0's recommendations +1
Last edited on
Indeed. Back on topic, I wouldn't recommend DirectX or OpenGL to someone looking for a simple graphics library. I think Return 0's recommendations are just fine.
DirectX costs money - it is a Microsoft product.

OpenGL is proprietary. It is currently handled by the non-profit Khronos Group, but it wasn't always so.
DirectX costs money

That's news to me.
To me too.
It's part of Windows, and you have to pay for Windows.
Most of us already have windows though. And if we didn't have windows, using DirectX wouldn't make any sense anyways as as far as my knowledge goes, DirectX is only available on windows platforms.
thanks for all answers very much :)
when I was looking on google I found directX and OpenGL but definetly they are too difficult for me (yet :))
Thanks Return 0, Ill try them
i tried SDL, it was working great but I dont know why it started causing this error
[Linker error] undefined reference to `SDL_xyz'

where SDL_xyz is any of SDL command
I was studying SDL some time ago,you should use project templates in your IDE (at that time I was using DevC++) to avoid such linker erros,since build parameters are set for you.Opengl is free but I think it is too expensive just for dealing with image files.You can use SDL for 2D graphics,it also provides you many other things(keyboard,mouse,joystick handling,window management etc) and has libraries for audio,network etc.
Check this:

http://www.libsdl.org/libraries.php
closed account (zb0S216C)
i tried SDL, it was working great but I dont know why it started causing this error
[Linker error] undefined reference to `SDL_xyz'

Have you included the required libraries?
yes I included :D

i do it like it is writed here http://gpwiki.org/index.php/SDL:Tutorials:Setup and it is working! :D

Im using DevCpp :)

Thanks for all answers .)
Pages: 12