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

call redraw() directly when filling pixelBuffer... we'll see if it breaks anything

parent 4f5008d8
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,14 @@ void Draw() ...@@ -26,6 +26,14 @@ void Draw()
GUI::instance()->check(); GUI::instance()->check();
} }
void DrawCurrentOpenglWindow(bool make_current)
{
if(!GUI::available()) return;
openglWindow *gl = GUI::instance()->getCurrentOpenglWindow();
if(make_current) gl->make_current();
gl->redraw();
}
void DrawPlugin(void (*draw)(void *context)) void DrawPlugin(void (*draw)(void *context))
{ {
CTX::instance()->post.pluginDrawFunction = draw; CTX::instance()->post.pluginDrawFunction = draw;
...@@ -43,19 +51,6 @@ void DrawPlugin(void (*draw)(void *context)) ...@@ -43,19 +51,6 @@ void DrawPlugin(void (*draw)(void *context))
CTX::instance()->mesh.draw = 1; CTX::instance()->mesh.draw = 1;
} }
void DrawCurrentOpenglWindow(bool make_current)
{
if(!GUI::available()) return;
openglWindow *gl = GUI::instance()->getCurrentOpenglWindow();
if(make_current) gl->make_current();
glClearColor(CTX::instance()->unpackRed(CTX::instance()->color.bg) / 255.,
CTX::instance()->unpackGreen(CTX::instance()->color.bg) / 255.,
CTX::instance()->unpackBlue(CTX::instance()->color.bg) / 255., 0.);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
gl->getDrawContext()->draw3d();
gl->getDrawContext()->draw2d();
}
int GetFontIndex(const char *fontname) int GetFontIndex(const char *fontname)
{ {
if(fontname){ if(fontname){
......
$Id: VERSIONS.txt,v 1.37 2009-03-08 19:12:34 geuzaine Exp $ $Id: VERSIONS.txt,v 1.38 2009-03-13 08:04:38 geuzaine Exp $
(?): removed GSL dependency (Gmsh now simply requires Blas and (?): removed GSL dependency (Gmsh now simply requires Blas and
Lapack); new per-window visibility; added support for composite window Lapack); new per-window visibility; added support for composite window
printing and background image; fixes for string options in parser. printing and background images; fixes for string options in parser.
2.3.0 (Jan 23, 2009): major graphics and GUI code refactoring; new 2.3.0 (Jan 23, 2009): major graphics and GUI code refactoring; new
full-quad/hexa subdivision algorithm (removed Mesh.RecombineAlgo); full-quad/hexa subdivision algorithm (removed Mesh.RecombineAlgo);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment