Am I the only one who uses OWL to make windows for openGL? Is this wrong of me? Why does everyone use Win32 instead? After all isn't the whole point of openGL that it can compile in any OS?
e.g.
#include <owl/applicat.h>
#include <owl/framewin.h>
class MyWindow:public TFrameWindow{
public:
MyWindow():TFrameWindow(0,"OPEN GL"){
Attr.Style=WS_POPUP;
};
DECLARE_RESPONSE_TABLE(MyWindow);
void SetupWindow(){
InitialiseOpenGL();
CreateObjects();
SetTimer(0,1);
}
void EvTimer(uint){
int n=0;while(n++<100) MoveObjects();
DrawScene();
}
void EvKeyDown(uint KEY,uint,uint){
if(KEY==VK_LEFT) MoveLeft();
if(KEY==VK_Right) MoveRight();
}
};
class MyApp:public TApplication{
public:
void InitMainWindow(){
SetMainWindow(new MyWindow);
}
};
int OwlMain(uint,char[]){
MyApp.Run();
}
DEFINE_RESPONSE_TABLE1
EV_WM_TIMER,
EV_WM_KEYDOWN,
END_REPSONSE_TABLE
What's so difficult about that? (Except of course, you have to include the OWL libraries with it.) Hmm?
[edited by - paulbird on April 23, 2003 1:21:28 PM]