NO

Author Topic: 2D fullscreen drawing: HOW?  (Read 5833 times)

Daos

  • Guest
2D fullscreen drawing: HOW?
« on: August 10, 2007, 04:51:52 AM »
Hi all.

Little introduce.
I am old-school C-programmer (MS-DOS, Borland IDE an so on).
And my practice with C was "freezed" for years...
Now I want reanimate programming skills but many usable and friendly (to me) things are gone from scene...
What I can write - is only console application for Win32 that can interact with user by printing text on screen and read from keyboard...
And now I want ask some good advice.

What is the simplest way to begin fullscreen drawing?

In my case only things needed - drawing 2D primitives (no textures, sprites or animation).
Actually, I need both 2D and 3D drawing, but affraid 3D is too complicated for beginning.
It was great times when GRAPH.TPU with old good Turbo Pascal was sufficient for my needs but it gone to ages with MS-DOS :(

Pelle, thanks a lot for great user-friendly IDE. Nice debugger, good compiler/linker generating very fast and reliable code! (I have not compared it with many other, but few else free compilers do their work much worse. Even MS VC++ produced slower .EXE for my particular C-code. And looking on ASM in debugger make things clear - PellesC linker rules :) )

Sorry for my english, if it too bad, and for many offtop inclusions :)

« Last Edit: August 10, 2007, 06:28:37 PM by Daos »

Ngan Lo

  • Guest
Re: 2D fullscreen drawing: HOW?
« Reply #1 on: August 10, 2007, 05:45:16 PM »
if you really wanna code a program that runs on Windows, I can tell you that there is no more old school style.  :-[

I suggest you take a look at SDL (search this forum for little more info), it's really easy to understand & start graphics drawing (many kind of drawings), the important thing is SDL can compile in PellesC.  ;)

Also there are really some hard ways, like DirectX or OpenGL (yes, they can do 2D / 3D, but real-hard).  :o

Freddy

  • Guest
Re: 2D fullscreen drawing: HOW?
« Reply #2 on: August 10, 2007, 06:03:22 PM »
You can use SDL, which is a graphics library for C, that runs on many platforms and is easy to setup with Pelles C.
You can also use Allegro which is a more complete game library for C and can be used with Pelles C. Allegro is also multi-platform.
SDL seems to have a cleaner API though, but it's just a personal preference.

Allegro is full game library while SDL is just a graphics library with input handling. SDL also has lots of plugins like SDL_ttf for drawing fonts, SDL_net for handling sockets, this way SDL is more modular.

Daos

  • Guest
Re: 2D fullscreen drawing: HOW?
« Reply #3 on: August 10, 2007, 09:11:59 PM »
Ngan Lo, Freddy thank you for help.

Quote from: Ngan Lo
if you really wanna code a program that runs on Windows, I can tell you that there is no more old school style.  :-[
I see it myself for a pity... And using your recomendation I am going to learn SDL :)