|
Revision 186, 2.4 kB
(checked in by timo, 1 year ago)
|
more eol-style
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
#include "stdafx.h" |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
CPtrArray l_GL2DWindows; |
|---|
| 35 |
CPtrArray l_GL3DWindows; |
|---|
| 36 |
|
|---|
| 37 |
void WINAPI QERApp_HookGL2DWindow(IGL2DWindow* pGLW) |
|---|
| 38 |
{ |
|---|
| 39 |
l_GL2DWindows.Add( pGLW ); |
|---|
| 40 |
pGLW->IncRef(); |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
void WINAPI QERApp_UnHookGL2DWindow(IGL2DWindow* pGLW) |
|---|
| 44 |
{ |
|---|
| 45 |
for( int i = 0; i < l_GL2DWindows.GetSize(); i++ ) |
|---|
| 46 |
{ |
|---|
| 47 |
if (l_GL2DWindows.GetAt(i) == pGLW) |
|---|
| 48 |
{ |
|---|
| 49 |
l_GL2DWindows.RemoveAt(i); |
|---|
| 50 |
pGLW->DecRef(); |
|---|
| 51 |
return; |
|---|
| 52 |
} |
|---|
| 53 |
} |
|---|
| 54 |
#ifdef _DEBUG |
|---|
| 55 |
Sys_Printf("ERROR: IGL2DWindow* not found in QERApp_UnHookGL2DWindow\n"); |
|---|
| 56 |
#endif |
|---|
| 57 |
} |
|---|
| 58 |
|
|---|
| 59 |
void Draw2DPluginEntities( VIEWTYPE vt ) |
|---|
| 60 |
{ |
|---|
| 61 |
for(int i = 0; i<l_GL2DWindows.GetSize(); i++ ) |
|---|
| 62 |
static_cast<IGL2DWindow*>(l_GL2DWindows.GetAt(i))->Draw2D( vt ); |
|---|
| 63 |
} |
|---|
| 64 |
|
|---|
| 65 |
void WINAPI QERApp_HookGL3DWindow(IGL3DWindow* pGLW) |
|---|
| 66 |
{ |
|---|
| 67 |
l_GL3DWindows.Add( pGLW ); |
|---|
| 68 |
pGLW->IncRef(); |
|---|
| 69 |
} |
|---|
| 70 |
|
|---|
| 71 |
void WINAPI QERApp_UnHookGL3DWindow(IGL3DWindow* pGLW) |
|---|
| 72 |
{ |
|---|
| 73 |
for( int i = 0; i < l_GL3DWindows.GetSize(); i++ ) |
|---|
| 74 |
{ |
|---|
| 75 |
if (l_GL3DWindows.GetAt(i) == pGLW) |
|---|
| 76 |
{ |
|---|
| 77 |
l_GL3DWindows.RemoveAt(i); |
|---|
| 78 |
pGLW->DecRef(); |
|---|
| 79 |
return; |
|---|
| 80 |
} |
|---|
| 81 |
} |
|---|
| 82 |
#ifdef _DEBUG |
|---|
| 83 |
Sys_Printf("ERROR: IGL3DWindow* not found in QERApp_UnHookGL3DWindow\n"); |
|---|
| 84 |
#endif |
|---|
| 85 |
} |
|---|
| 86 |
|
|---|
| 87 |
void Draw3DPluginEntities() |
|---|
| 88 |
{ |
|---|
| 89 |
for(int i = 0; i<l_GL3DWindows.GetSize(); i++ ) |
|---|
| 90 |
static_cast<IGL3DWindow*>(l_GL3DWindows.GetAt(i))->Draw3D(); |
|---|
| 91 |
} |
|---|