1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
42 #include "OSGConfig.h"
44 #include "OSGRenderActionTask.h"
45 #include "OSGWindow.h"
46 #include "OSGDrawEnv.h"
50 /*! \class OSG::WindowDrawTask
53 RenderActionTask::RenderActionTask(UInt32 uiType
) :
61 _pBarrier
= Barrier::get(NULL
, false);
62 _pBarrier
->setNumWaitFor(2);
71 RenderActionTask::~RenderActionTask(void)
76 void RenderActionTask::execute(HardwareContext
*pContext
, DrawEnv
*pEnv
)
79 Window
*pWindow
= pEnv
->getWindow();
81 OSG_ASSERT(pWindow
!= NULL
);
89 #ifdef OSG_DUMP_RENDERTASK
90 fprintf(stderr
, "HandleGLFinish\n");
95 OSG_ASSERT(_pBarrier
!= NULL
);
101 case HandleGLFinishNoWait
:
103 #ifdef OSG_DUMP_RENDERTASK
104 fprintf(stderr
, "HandleGLFinishNoWait\n");
116 void RenderActionTask::waitForBarrier(void)
118 OSG_ASSERT(_uiTypeTask
== HandleGLFinish
);
119 OSG_ASSERT(_pBarrier
!= NULL
);
124 void RenderActionTask::dump(UInt32 uiIndent
)
126 for(UInt32 i
= 0; i
< uiIndent
; ++i
) { fprintf(stderr
, " "); }
127 fprintf(stderr
, "RenderActionTask : ");
133 fprintf(stderr
, "HandleGLFinish\n");
137 case HandleGLFinishNoWait
:
139 fprintf(stderr
, "HandleGLFinishNoWait\n");
145 fprintf(stderr
, "Unknown\n");