How can I use glfunction...another application;Help!!!!!!!!

I have written a programs with various butttons.

I am traying to use all the gl drawing function…to plot energy surfuces…but when I do so it said no window is active…However, when I do MoveTo,LineTo…I get a line in my window…A window comes up with the folow along with my window.;;

Glut: warning in (unamed) :glutDisplayFunc:no active…

I do not want to use gl window…Ineed to use my window…

Please help me…Thank you

Then don’t use glut. You need to set up an OpenGL rendering context and make it current.

You can not mix GLUT and Windows API, GLUT is for stand alone appications with out windows specific functions like menu’s and button’s.

Go to a site like nehe.gamedev.net and look at how they setup gl in a windows specific type window.

Inside your window you will have to create a contex in which openGL can draw to.

Originally posted by hcrogma:
[b]I have written a programs with various butttons.

I am traying to use all the gl drawing function…to plot energy surfuces…but when I do so it said no window is active…However, when I do MoveTo,LineTo…I get a line in my window…A window comes up with the folow along with my window.;;

Glut: warning in (unamed) :glutDisplayFunc:no active…

I do not want to use gl window…Ineed to use my window…

Please help me…Thank you

[/b]