Graphics

Hi,

Is there any graphic library in C/C++ ?
I want to work on graphics in DevC++
What do you mean by "graphics"?

If 3D, the Vulkan seems interesting: https://en.wikipedia.org/wiki/Vulkan_%28API%29
I want to draw 2D graphics right-now
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<graphics.h>
#include<conio.h>
 
main()
{
   int gd = DETECT,gm,left=100,top=100,right=200,bottom=200,x= 300,y=150,radius=50;
 
   initgraph(&gd, &gm, "C:\\TC\\BGI");
 
   rectangle(left, top, right, bottom);
   circle(x, y, radius);
   bar(left + 300, top, right + 300, bottom);
   line(left - 10, top + 150, left + 410, top + 150);
   ellipse(x, y + 200, 0, 360, 100, 50);
   outtextxy(left + 100, top + 325, "My First C Graphics Program");
 
   getch();
   closegraph();
   return 0;
}


Code is not running, Is there no graphics library ?
Not in C++ Standard Library.

You could look at Qt framework http://www.qt.io/
It is portable: Windows, OS X, Linux, and more.


Which version of DevC++ do you use?
Which compiler (version) does your DevC++ use?
devcpp_v4_9_9_2

glu library used for which purpose ?
If it is not in standard library then
Can I include it by other source ?
Topic archived. No new replies allowed.