2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
\r
5 This file is part of GtkRadiant.
\r
7 GtkRadiant is free software; you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation; either version 2 of the License, or
\r
10 (at your option) any later version.
\r
12 GtkRadiant is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with GtkRadiant; if not, write to the Free Software
\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\r
22 //-----------------------------------------------------------------------------
\r
26 // Quick interface hack for selected face interface
\r
27 // this one really needs more work, but I'm in a hurry with TexTool
\r
32 // stores objects that want to be hooked into drawing in the XY window or Camera view
\r
33 //++timo TODO: add support for Z view ... (texture view?)
\r
34 CPtrArray l_GL2DWindows;
\r
35 CPtrArray l_GL3DWindows;
\r
37 void WINAPI QERApp_HookGL2DWindow(IGL2DWindow* pGLW)
\r
39 l_GL2DWindows.Add( pGLW );
\r
43 void WINAPI QERApp_UnHookGL2DWindow(IGL2DWindow* pGLW)
\r
45 for( int i = 0; i < l_GL2DWindows.GetSize(); i++ )
\r
47 if (l_GL2DWindows.GetAt(i) == pGLW)
\r
49 l_GL2DWindows.RemoveAt(i);
\r
55 Sys_Printf("ERROR: IGL2DWindow* not found in QERApp_UnHookGL2DWindow\n");
\r
59 void Draw2DPluginEntities( VIEWTYPE vt )
\r
61 for(int i = 0; i<l_GL2DWindows.GetSize(); i++ )
\r
62 static_cast<IGL2DWindow*>(l_GL2DWindows.GetAt(i))->Draw2D( vt );
\r
65 void WINAPI QERApp_HookGL3DWindow(IGL3DWindow* pGLW)
\r
67 l_GL3DWindows.Add( pGLW );
\r
71 void WINAPI QERApp_UnHookGL3DWindow(IGL3DWindow* pGLW)
\r
73 for( int i = 0; i < l_GL3DWindows.GetSize(); i++ )
\r
75 if (l_GL3DWindows.GetAt(i) == pGLW)
\r
77 l_GL3DWindows.RemoveAt(i);
\r
83 Sys_Printf("ERROR: IGL3DWindow* not found in QERApp_UnHookGL3DWindow\n");
\r
87 void Draw3DPluginEntities()
\r
89 for(int i = 0; i<l_GL3DWindows.GetSize(); i++ )
\r
90 static_cast<IGL3DWindow*>(l_GL3DWindows.GetAt(i))->Draw3D();
\r