Graphics

Jun 4, 2011 at 8:00am
I have recently been teaching myself the C++ language and I think that I am quite good with it now, how do I create graphics.

I want to make a particle simulator probably. (It might be a bit ambitious I know but I'll keep it simple)

So, how would I go about just drawing a DOT. I have looked around and I cannot find anything that will just tell you how to draw a simple DOT at a point.

Any help would be appreciated, thanks in advance.
Jun 4, 2011 at 8:34am
You'll want to use a 3rd party library because graphics are OS dependent.
This is one example: http://www.sfml-dev.org
Jun 4, 2011 at 9:31am
It doesn't seem to be available in VS 2010, will the 2008 one work? Also, is that pixel-based, I'm just curious.
Jun 4, 2011 at 9:50am
It's a 3rd party library... You have to install it.

jalfor wrote:
... is that pixel-based
What do you mean? All computer graphics are pixel-based... It has support for loading icon files as well as drawing algorithms I believe.
Jun 4, 2011 at 10:08am
I don't really know what I mean. I'm quite new to this stuff.


I know I have to install it though though these are the download options for C++:

C++ | version 1.6
SFML full SDK (headers / libraries / documentation / sources / samples / external libraries)
Windows - MinGW (Code::Blocks) (34.4 MB)
Windows - Visual C++ 2005 (23.3 MB)
Windows - Visual C++ 2008 (23.5 MB) Linux - 32 bits (12.9 MB)
Linux - 64 bits (13.0 MB) Mac OS X - 32 bits (16.2 MB)
Mac OS X - 32+64 bits (17.9 MB)
SFML development files (headers / libraries / external libraries)
Windows - MinGW (17.8 MB)
Windows - Visual C++ 2005 (7.00 MB)
Windows - Visual C++ 2008 (7.20 MB) Linux - 32 bits (729 KB)
Linux - 64 bits (749 KB) Mac OS X - 32 bits (3.70 MB)
Mac OS X - 32+64 bits (5.90 MB)
SFML documentation (HTML / CHM)
All systems (3.20 MB)

None of them say VS 2010
Jun 4, 2011 at 11:15am
Which one should I download for VS 2010?
Jun 4, 2011 at 11:30am
You should download the one which says "SFML 2.0 Snapshot". This downloads the latest version of the source, which you must then compile yourself. This is the best way to move forward without experiencing compatibility problems.

Either follow Laurent's tutorial: http://sfml-dev.org/tutorials/2.0/compile-with-cmake.php

Or if you'd prefer you can watch my two part video tutorial on building SFML and making a first project with it. There are one or two errors in the video which are corrected in the text section below the video.
http://www.youtube.com/watch?v=cDNo4bzrFW8
http://www.youtube.com/watch?v=MgDFGkFDsbg
Last edited on Jun 4, 2011 at 11:30am
Jun 8, 2011 at 4:08am
may be you can make use of the open gl and open cv libraries.
It provides a lot many graphics related functions.
Jun 8, 2011 at 8:43pm
OpenGL isn't very protable as I recall (unless you use another library with it. e.g. sfml or sdl)
Jun 8, 2011 at 8:46pm
I'm pretty sure OpenGL is perfectly portable in itself. It would only become non portable if you used platform specific code to create your render window. As you say, SDL or SFML can create a cross platform window, but so can GLUT (and probably Qt, etc).
Jun 15, 2011 at 10:18pm
True, I just like sfml, its easy, and cool, and OO :)
Topic archived. No new replies allowed.