diff --git a/example/NullWindow/main.cpp b/example/NullWindow/main.cpp index eceb322b..e6f39628 100644 --- a/example/NullWindow/main.cpp +++ b/example/NullWindow/main.cpp @@ -1,34 +1,10 @@ #include +#include #include -#include +#include using namespace hgl; -void put(const struct VideoMode *vm) -{ - std::cout<<"\t"<width<<"x"<height<<","<bit<<"bits,"<freq<<"hz"; -} - -void put(const struct Display *disp) -{ - const int inch=sqrt((disp->width*disp->width)+(disp->height*disp->height))*0.03937008; - - std::cout<<"["<name.c_str()<<"]["<width<<"x"<height<<" mm,"<x<<","<y<<"]"<GetCurVideoMode()); - std::cout< &vml=disp->GetVideoModeList(); - - for(int i=0;iGetName(); + WindowSetup ws; - std::cout<<"RenderDevice: "<Create(1280,720,&ws,&rs); + + win->Show(); + + glClearColor(0,0,0,1); + + while(win->IsOpen()) + { + win->MakeToCurrent(); + + glClear(GL_COLOR_BUFFER_BIT); + + win->SwapBuffer(); + win->PollEvent(); } - List disp_list; - - device->GetDisplayList(disp_list); - - const int count=disp_list.GetCount(); - - std::cout<<"Device have "<