NO

Author Topic: Basic graphics in console mode  (Read 7679 times)

luis

  • Guest
Basic graphics in console mode
« on: October 30, 2005, 03:00:34 PM »
Hello

There is another post in this section titled "Pelles has any library as graphics.h" asking about using graphics.h in pelles C.

And Pelle wrote that there is no graphics.h, but you can use the entire
windows API in console mode.

I am very interested in learning about this, because I really need
to draw in console mode programs. Unfortunatelly I donĀ“t have any
experience with the windows API and all the tutorials and guides
use C++ (OOP).

Can you post a simple simple SIMPLE example of drawing basic stuff
(lines, points, circles, etc.) in console mode?

Ah, by the way. Pelles C supports opengl, but the GLUT library is not
included. why?.


Thank you

Ngan Lo

  • Guest
Basic graphics in console mode
« Reply #1 on: October 30, 2005, 04:00:01 PM »
PellesC is totally a 32bit compiler, so it cannot do any old-days 16bit DOS program, like graphic.h stuff. If u really need draw primitives, u have to learn some Win32 SDK instead (like : GDI). If u just can't do it.... i think u may need Borland C++ 5.5 (free, & 16bit).

if u search MSDN, there is many examples r written in C. i think u looked at somekind of MFC stuff, MFC is totally OOP & blackbox.....

GLUT lib can be download everywhere on the internet, just google it (it can use by PellesC, b'cuz PellesC is M$ lib compliant, how wonderful PellesC is !).

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Basic graphics in console mode
« Reply #2 on: October 31, 2005, 08:30:12 PM »
In the source section (Windows Samples -> Windows Graphics) you have GDIDemo. It's a very ambitious MS sample, but if you look in the source file draw.c, maybe you find enough to get started...?

(You need some Windows API docs too).

Pelle
/Pelle

luis

  • Guest
Thanx
« Reply #3 on: November 11, 2005, 11:29:42 PM »
Thank you very much.

(I really apreciate your comments)

I will read some docs about the Windows API.

kobold

  • Guest
Basic graphics in console mode
« Reply #4 on: November 15, 2005, 07:10:11 PM »
If you don't need the console, you could try SDL. It is portable between windows, linux, bsd and many other systems. http://www.libsdl.org/index.php
Of course it runs with PellesC. But to draw an text onto the screen, you need an extra library.
I miss the good old turbo pascal graphic unit  :cry:  It was so simple.