What is the easiest and shortest way to draw a 2d line in c/c++?

Posted by Mike on Game Development See other posts from Game Development or by Mike
Published on 2010-11-02T22:27:45Z Indexed on 2012/11/21 23:12 UTC
Read the original article Hit count: 307

Filed under:
|
|

I am fairly new to c/c++ but I do have experiance with directx and opengl with java and c#. My goal is to create a 2d game in c with under 2 pages of code. Most of what I have seen requires 3 pages of code to just get a window running.

I would like to know the shortest code to get a window running where I can draw lines. I believe this can be done in less lines with opengl versus directx. Is there maybe an api or framework i can use to shorten it more?

Also, it would be nice if the solution were cross platform compatible.

© Game Development or respective owner

Related posts about c++

Related posts about opengl