PDA

View Full Version : how to draw a win32 gui while using glut.



Milk
09-17-2006, 11:54 AM
Hi all.

As far as im aware you need to use the win console entry point for coding in glut because to initialise glut you need to pass the arguments from "int main (int argc, char** argv)" to glutInit. However I also wish to display a win32 GUI window (which was created as a resource script using visual Studio 6 IDE). Now surely i'll need to use the win32 api's like RegisterClass snd CreateWindow for the GUI to be displayed. But can this be done using the console entry point? If it cannot how can i use both GLUT and win32 GUI in the same application?

Thanks for any help.

k_szczech
09-17-2006, 01:05 PM
Of course you can do that - if GLUT creates a window then you can, too :)
And by the way - WinMain also can suply commad-line arguments to GLUT.

MZIskandar
09-18-2006, 02:30 AM
is there any way to change the GLUT window name but still using glut window?

k_szczech
09-18-2006, 11:25 AM
I think you can do that using FindWindow / SetWindowText functions (I could mispell them since I haven't use them for a long time).
If you need to find out what is the GLUT's window's class name then use EnumWindows (or something like that).
But perhaps you should just look for this in GLUT's specs - maybe you can specify window's name somehow (I'm not using GLUT so I don't know that).