Archived

This topic is now archived and is closed to further replies.

fallingbrickwork

Newbie - Console or Windows??

Recommended Posts

Hi all, can someone clear up the following questions?? what is the difference between coding a `Console` type demo or a `Win32` type demo?? Do you get better performance with `Win32`?? Can you use `GLUT` with a windows prog??? Are more OpenGL features available to `Win32`? Compatibility?? I''ve just finished coding two (very) simple demos using GLUT, which are `Console` type programs, and I am happy with the results. Is it worth trying to convert them to `Win32 Apps` etc? Is GLUT a good place to start for a Newbie?? ALso, my friend tried to run my demo on his PC and his machine crashed is a very total grave way. As its run fine on my Athlon/Radeon, would it be a compatibility prob with his Voodoo 3. He installed the glut.dll''s etc. The demo runs in fullscreen (GLUTGAMEMODE) and is in 16Bit Colour which I thought Voodoo cards supported!! Cheers Guys and Gals..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
About the Console/Windowed app:
Essentially there are two differences (that I know of)

1) A console app''s default entry point is called "main", while a windowed app''s default entry point is called "WinMain" (not that they have different prototypes).

2) A console app automatically has a Console Window allocated for it (and the stdin/stdout/stderr handles setup to use it).

There is no difference in performance, or availability of functions, etc.
Also, a windowed app can allocated a console window if it wishes to, and a console app can detach itself from its default console.

Share this post


Link to post
Share on other sites
If the only difference is the entry point - main or Winmain
and,
a windows app. can open a console window if required and a console app can lose its console window if required.

Why code as one or the other?? aren''t the both basically the same??

Is GLUT available within a Windows application??

How do you lose the console window for a console application??


Sorry for all the questions!!!!

Share this post


Link to post
Share on other sites
quote:
Original post by fallingbrickwork
Is GLUT available within a Windows application??



As I understand it, GLUT helps with cross-platform programming because the GLUT functions set up the proper graphics mode/windows based on OS. So yes, GLUT can be used with Windows. Tux Racer (on sourceforge) might use it, and somewhere on my computer I have a series of OGL/animation tutorials using GLUT.

Share this post


Link to post
Share on other sites
GLUT has a lot of overhead.
If you know win32, its worth the effort.
If not, stick to GLUT to learn all the main issues in GL, and only then, start learning win32.
You can always use NeHe''s base code to take care of the windows stuff, and just work on the graphics.

GLUT is also great for cross platforms. if you wish to move across anothe OS, it would be much simpler with GLUT.

Good luck

Share this post


Link to post
Share on other sites
quote:
Original post by fallingbrickwork
If the only difference is the entry point - main or Winmain
and,
a windows app. can open a console window if required and a console app can lose its console window if required.

Why code as one or the other?? aren''t the both basically the same??


Because, sometimes it''s convenient to have a console window to output stuff in, and you don''t wan''t to go trough the hassle of allocating and settting up the console yourself. At other times you don''t want a console, simply a window (or many).
quote:

How do you lose the console window for a console application??


You call the function FreeConsole().
You can read more about about the console functions here.

Share this post


Link to post
Share on other sites