How Drawing Libraries Works?

How Drawing Libraries Works?
For example SDL or OpenGL or Directx.
Can i create my own drawing library?

Thx for answer.
The answer is yes, but why?

SDL/SFML can handle most of the leg work for you on the normal operating system and there is no reason to create your own graphics library unless you are doing operating system level programming or someplace where you don't already have a graphic environment present.

OpenGL is usually supported by a hardware subset on most modern video cards, just like Dirextx.

On windows and Linux platform, include mac os's currently, you could access the Graphic Device Interface of the underlying operating systems. Windows its part of the native api and Linux/mac you have to access x-window api.
Last edited on
Thanks for answering.

First of all u said that yes you can create your own drawing library.If i can how?
Can you give me any link ?I want to create my own because i think creating my own is better than learn another one.You can say that "no its very hard thing to do" but if i create my own i can understand everthing about drawing libraries.
Thx .
Creating your own GUI library in c++ ? It takes at least two years of work :-)
I don't want to discourage you, but let me ask you this. Have you programmed at windows api level? have you ever used a library like wxWidgets, Qt, or MFC? Each one of the libraries have 10 years of development behind them. SDL/SFML is working on 5 year each, minimum. Allegro has been around for about 20years. Those are most of the C++ application frameworks I am aware of for graphical programming.

Gtk, x-windows api each have years behind them. If you are familar with GIMP that is were gtk started and has spawned Gnome, LXDE, and other fun linux desktops.

Personally, I have been learning libraries for 20 years and if you plan to be a serious c++ programmer that is all your doing for your career unless you are lucky to work on one of the libraries out there.

Developing your own is not encouraged because of the scale of the problem. It should be only tackled in few cases, like OS gui development because you have to get the base graphics libraries to either compile or create your own api. This is not a simple process and not one that could support you financially unless you find a VC/Angel funder out there to tackle the problem.

Just food for though.
Last edited on
So you think that i should learn windows api or any GUI library? Which one is best ?
closed account (zwA4jE8b)
SDL is fun and easy to use. Although it is a bit older, it can compile on windows or linux. That is the lib I am using right now.
@spacecamp

If you are a linux user try either QT or wxWidgets, if you are a Windows user try first MS VS Express Edition, and than QT or wxWidgets.
@CreativeMFS
I was using SDL and it made me curious about this topic.SDL is better lib if you use it with openGL.You can make better apps with it .And also you can create 3D games with OpenGL or OpenGL/SDL.Do you know how can i reach internet access with SDL for Server/Client games?

@therockon7throw
I am windows user . Which one is better do you think QT or wxWidgets?
closed account (zwA4jE8b)
http://www.libsdl.org/projects/SDL_net/
Thanks but i got another question can i download any files from internet with this library?
What made you think that? You can use a library similar to libcurl (lib c url, not lib curl up in a ball)
I'm using SDL and SDL has own socket library.So how can i think using libcurl but thanks anyway can i download a file from internet with libcurl?
Topic archived. No new replies allowed.