What graphic library should I learn?

closed account (48T7M4Gy)
OpenGL would be a good place to start because it is well established and well documented, forming the basis of much to do with with following software. You can learn for free if you don't count your own time and making use of it should be no more than a few hours, obviously a little more to master.
closed account (48T7M4Gy)
Have you created a game using openGL? The short answer is no. I know enough about OpenGl that it is a good place to start for the reasons I gave, but at the same time I don't want to appear as a salesman for it.

(But if you have a very short time between now and creating a game surf around and see if other people can share their experience with alternatives. Some ppl might find OpenGL daunting because of the maths theory but they are all the same in that respect and maybe you can get by just applying it.)
closed account (48bpfSEw)
@TheSmallGuy, you didn't mention your purpose about graphics.

If you just want to print some nice graphics I would use POV-Ray to render for me.

http://www.povray.org/

http://www.povray.org/documentation/3.7.0/t2_2.html#t2_2_2_1

The syntax is extremly simple:

1
2
3
4
5
6
7
8
9
10
11
12
13
#include "colors.inc"
  camera {
    location <0, .1, -25>
    look_at 0
    angle 30
  }
  background { color Gray50 } // to make the torus easy to see
  light_source { <300, 300, -1000> White }
  torus {
    4, 1              // major and minor radius
    rotate -90*x      // so we can see it from the top
    pigment { Green }
  }



I don't know if there is a dll- and lib-file to bind in your project. But so far I could find out. POVRay is written in C:

http://news.povray.org/povray.programming/thread/%3Cweb.4f01ba3c6f2bacd09be4b6d10@news.povray.org%3E/


and I think you should change your question "How long do you think I must take to learn a typical graphic library?" to "What do I need to write my own Graphik-Class depend on my own purposes?" - This class would contain all that what you want to do with graphics and the best: it would have your own syntax. The implementation in one of the given graphic libs is the next step.

I would start with this virtual class definition:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class GraphicBase {
public:
  virtual void GraphicBase () = 0;
  virtual void Line (int x0, int y0, int x1, int y1) = 0;  // , color, penwith, etc. 
}

class GraphicImpOpenGL : public GraphicBase {
public:
   void GraphicImpOpenGL (), public GraphicBase {
       ... code of OpenGL to initialize the graphicsystem ... 
      }
   void Line (int x0, int y0, int x1, int y1) {
        .... code of OpenGL to draw a line ...
        .... huge amount of complex blah blah ...
      }
}


And you are using in your code your own class methods!

1
2
3
4
main () {
   GraphicImpOpenGL gr;
   gr.Line(0,0,10,10;
}


Some days if you wish to port your system on another gLib you need only to change the implementation-layer!

The answer of "how long you need to learn" is reduced to "how long takes to write your virtual class and the implementation of the lib your choice?!".



happy coding...^^
closed account (48bpfSEw)
Yesterday I downloaded cinder, unzipped the file, loaded an example, compiled it and what should I say: it works great!!! ^^

https://libcinder.org/docs/guides/windows-setup/index.html

Cinder wraps OpenGL, so far I understood, and it's syntax is better to unterstand.
Topic archived. No new replies allowed.