Those are GLUT specific commands so you will need to download a Windows version of the GLUT library and include that .h file and link to that lib file.
There is a win32 command SwapBuffers(HDC) which you can use instead passing the Windows HDC to the command. However I’m not sure there is a direct equivalent of the Bitmap Character. Instead there are a group of routines you can used instead to display text. These are in Nehe’s windows GL tutorials.
I expect that you should change #include<GL/glaux.h> to #include<GL/glut.h>.
glaux is a utility made back in the early days of openGL. Mostly only supported by windows and VC++.
Nehe used glaux in his windows examples of opengl to load BMP texture files, but if I remember in the linux examples he uses a extra routine to load TGA files since glaux is not avaible on unix.
The link error is due to making a win32 application with GLUT commands. Technically GLUT requires a console application but we can work round this in Visual C++ by placing a pragma command near the top of the program.
Place this all in one line and it will tell the linker to treat the main() command as the entry point to the program. I use it all the time and it works wonderfully.
Originally posted by tinak:
[b]The link error is due to making a win32 application with GLUT commands. Technically GLUT requires a console application but we can work round this in Visual C++ by placing a pragma command near the top of the program.
Place this all in one line and it will tell the linker to treat the main() command as the entry point to the program. I use it all the time and it works wonderfully.
Tina[/b]
Or you can do what most people do and start the program’s project out appropriately. Win32 Application for WinMain, Win32 Console for main.
Why botther adding a line of code to every project if all you have to do is choose the right option when first create that project.
hehe, of course the decision is up to the programmer… I hate that extra console window popping up so choose not to use console project deliberately because of that… most of my projects are non glut so it isn’t a problem for me…