View Full Version : console app VS win32 app
08-17-2001, 07:41 PM
im a total newb to GL
and wondering which i should use? console application or win32 application when makeing projects in visual c++
console app looks easier, but u get the crappy dos window when you load it up,
win32 will only work on windows right?
what about console apps?
some comments plz on pro's and con's of both would be helpfull
08-17-2001, 09:00 PM
I've found GLUT (console) to be the easiest way to start. You can get rid of the console window by adding these:
under Project->Settings->Link tab->Project Options.
08-18-2001, 02:08 PM
There is no big difference between them, a console application creates a console window, and GUI application does not (unless you want it to).
But if the GLUT api is complete enough for you that is a good choice.
08-18-2001, 06:15 PM
hmm, so theres not much of a diffrence?
what about resizing and tabing from full screen apps etc ???
08-20-2001, 01:00 AM
any 1? plz...
08-20-2001, 04:57 AM
Resizing and tabbing from fullscreen apps? Works fine for me...
08-20-2001, 06:09 PM
in console app?
08-20-2001, 08:02 PM
If your gonna use a Win32 app you might need to know some windows programming if you plan on it handling how things are viewed, especially if your using OpenGl!!!!!
08-21-2001, 12:40 PM
Since you are new at OpenGL, I would recommend using GLUT with a console application. That way, you can use printf or cout (assuming C/C++) for testing and debugging purposes. GLUT is easy to use, although the callback mechanism may seem tricky at first.
Later, it is trival to change your code that uses GLUT into a Win32 application, either by using gtada's method or replacing the console app's main() function with a simple WinMain() function:
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
int argc = 1;
// remainder of GLUT initialization
Another way to use a Win32 app without having to write a WinMain which handles the cmd line to pass to glutInit is to use the compiler option /entry:mainCRTStartup in project settings->Link
This way you can use a plain old main() function in a win32 app and still use the same code on unix (you dont get your app-handle though, but you dont want that with glut anyway)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.