arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

drawableGLI.cpp

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////
00002 // 6/25/02      Aaron Lefohn    Scientific Computing and Imagint Institute
00003 // School of Computing          University of Utah
00004 //
00005 //  This library is free software; you can redistribute it and/or
00006 //  modify it under the terms of the GNU Lesser General Public
00007 //  License as published by the Free Software Foundation; either
00008 //  version 2.1 of the License, or (at your option) any later version.
00009 //
00010 //  This library is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 //  Lesser General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU Lesser General Public
00016 //  License along with this library; if not, write to the Free Software
00017 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 ////////////////////////////////////////////////////////////////////////
00019 
00020 #include <drawable/drawableGLI.h>
00021 
00022 using namespace glift;
00023 
00024 namespace glift{
00025    extern bool g_compiling;
00026 }
00027 
00028 DrawableGLI::DrawableGLI()
00029 {}
00030 
00031 DrawableGLI::~DrawableGLI()
00032 {}
00033 
00034 void DrawableGLI::draw()
00035 {
00036    /*if( g_compiling == false ) { /// The negative case is first for efficiency reasons.                
00037    /// The main draw routine.
00038    if( m_drawList.isCompiled() ) {
00039    m_drawList.issue();
00040    }
00041    else {
00042    drawDef();
00043    }
00044    }
00045    else { /// We are compiling so only call 'compilable' code
00046    drawDef();
00047    }*/
00048 
00049    if( m_drawList.isCompiled() ) {
00050       m_drawList.issue();
00051    }
00052    else {
00053       drawDef();
00054    }
00055 }
00056 
00057 void DrawableGLI::compile()
00058 {
00059    g_compiling = true;
00060    m_drawList.compile( new MemberCommand0<DrawableGLI>(this, &DrawableGLI::draw) );
00061    g_compiling = false;
00062 }
00063 
00064 

Send questions, comments, and bug reports to:
jmk