Skip to content
Snippets Groups Projects
Commit 2d72459b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 9ca63c56
No related branches found
No related tags found
No related merge requests found
...@@ -416,38 +416,43 @@ graphicWindow::graphicWindow(bool main, int numTiles) ...@@ -416,38 +416,43 @@ graphicWindow::graphicWindow(bool main, int numTiles)
dummyBox *resbox = new dummyBox(x, 0, width - x, glheight); dummyBox *resbox = new dummyBox(x, 0, width - x, glheight);
win->resizable(resbox); win->resizable(resbox);
// opengl window(s) // tiled opengl windows
int mode = FL_RGB | FL_DEPTH | (CTX::instance()->db ? FL_DOUBLE : FL_SINGLE);
if(CTX::instance()->antialiasing) mode |= FL_MULTISAMPLE;
tile = new Fl_Tile(0, 0, width, glheight); tile = new Fl_Tile(0, 0, width, glheight);
int w2 = width / 2, h2 = glheight / 2; int w2 = width / 2, h2 = glheight / 2;
if(numTiles == 2){ if(numTiles == 2){
gl.push_back(new openglWindow(0, 0, w2, glheight)); gl.push_back(new openglWindow(0, 0, w2, glheight));
gl.back()->mode(mode);
gl.back()->end(); gl.back()->end();
gl.push_back(new openglWindow(w2, 0, width - w2, glheight)); gl.push_back(new openglWindow(w2, 0, width - w2, glheight));
gl.back()->mode(mode);
gl.back()->end(); gl.back()->end();
} }
else if(numTiles == 3){ else if(numTiles == 3){
gl.push_back(new openglWindow(0, 0, w2, glheight)); gl.push_back(new openglWindow(0, 0, w2, glheight));
gl.back()->mode(mode);
gl.back()->end(); gl.back()->end();
gl.push_back(new openglWindow(w2, 0, width - w2, h2)); gl.push_back(new openglWindow(w2, 0, width - w2, h2));
gl.back()->mode(mode);
gl.back()->end(); gl.back()->end();
gl.push_back(new openglWindow(w2, h2, width - w2, glheight - h2)); gl.push_back(new openglWindow(w2, h2, width - w2, glheight - h2));
gl.back()->mode(mode); gl.back()->end();
}
else if(numTiles == 4){
gl.push_back(new openglWindow(0, 0, w2, h2));
gl.back()->end();
gl.push_back(new openglWindow(w2, 0, width - w2, h2));
gl.back()->end();
gl.push_back(new openglWindow(0, h2, width - w2, glheight - h2));
gl.back()->end();
gl.push_back(new openglWindow(w2, h2, width - w2, glheight - h2));
gl.back()->end(); gl.back()->end();
} }
else{ else{
gl.push_back(new openglWindow(0, 0, width, glheight)); gl.push_back(new openglWindow(0, 0, width, glheight));
gl.back()->mode(mode);
gl.back()->end(); gl.back()->end();
} }
int mode = FL_RGB | FL_DEPTH | (CTX::instance()->db ? FL_DOUBLE : FL_SINGLE);
if(CTX::instance()->antialiasing) mode |= FL_MULTISAMPLE;
for(unsigned int i = 0; i < gl.size(); i++) gl[i]->mode(mode);
tile->end(); tile->end();
win->position(CTX::instance()->glPosition[0], CTX::instance()->glPosition[1]); win->position(CTX::instance()->glPosition[0], CTX::instance()->glPosition[1]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment