HI, I have mainform class that has got a member object WIDGETGL; widgetGL show some GL objects that are members of StructureGL; there's only one instance of StructureGL (ok); I declared it as global variabile inside mainform.ui.h; in others part of app that StructureGL is request I used extern declaration...
//mainform.ui.h
StructureGL strutGL;
//mainform.ui.h
StructureGL strutGL;
To copy to clipboard, switch view to plain text mode
//WIDGETGL.cpp
extern StructureGL strutGL;
void WIDGETG::paintGL()
structGL.drawSPhere();
//WIDGETGL.cpp
extern StructureGL strutGL;
void WIDGETG::paintGL()
structGL.drawSPhere();
To copy to clipboard, switch view to plain text mode
the question: can it be ok? Is it better declare strutGL as member of mainform class? or what? thanks...
Bookmarks