Is it possible to create source code so that a vector image of an apple for example shows up in the program when executed on the computer language C++. Whenever I program with C++ the compiler only outputs chars, numbers, and signs not complex images.
Is it possible to create source code so that a vector image of an apple for example shows up in the program.?
You need to use some kind of graphics API to output your results.
In DOS, we used to use GDI.
In Windows we have to create a window using the Win32 API then use Direct3D or OpenGL to paint onto it. You must have the Windows Platform SDK installed to be able to use calls from windows.h, and you will need the Direct3D SDK installed if you want to use D3D.
In Linux or Macs we create the window using the window manager, and paint it using OpenGL.
For a platform independent (works on any computer) way to create the window and paint it we can use a third party graphics API like Simple Directmedia Layer (SDL).
Myself, I use the Irrlicht Engine, which is an open source 3D scene-graph API which works on multiple platforms and is very easy to load and render 2D or 3D graphics in a couple of lines of code without any of this hard work.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment