Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CAT/CATOverlayOpenGL.h Source File

CATOverlayOpenGL.h

Go to the documentation of this file.
00001 /// \file  CATOverlayOpenGL.h
00002 /// \brief OpenGL image overlay
00003 /// \ingroup CAT
00004 ///
00005 /// Copyright (c) 2007-2008 by Michael Ellison.
00006 /// See COPYING.txt for the \ref gaslicense License (MIT License).
00007 ///
00008 // $Author: mikeellison $
00009 // $Date: 2008-01-27 16:51:48 -0600 (Sun, 27 Jan 2008) $
00010 // $Revision:   $
00011 // $NoKeywords: $
00012 
00013 #ifndef _CATOverlayOpenGL_H_
00014 #define _CATOverlayOpenGL_H_
00015 
00016 #include "CATOverlay.h"
00017 #ifdef CAT_CONFIG_WIN32
00018 #include "CATImage.h"
00019 #include "CATCritSec.h"
00020 
00021 /// \class CATOverlayOpenGL
00022 /// \brief OpenGL image Overlay
00023 /// \ingroup CAT
00024 class CATOverlayOpenGL : public CATOverlay
00025 {
00026     public:
00027         CATOverlayOpenGL();
00028         virtual ~CATOverlayOpenGL();
00029 
00030         CATResult HookFunctions();
00031 
00032     protected:        
00033         void DrawToScene(   HDC dc );
00034 
00035         ///< OpenGL functions to intercept. 
00036         static CATINTERCEPT_DLL_TABLE_ENTRY kOpenGLInterceptTable[];       
00037 
00038         /// Hook function for glSwapBuffers() - called to display the back buffer.
00039         /// We draw our overlay immediate before the swap.
00040         static void     OnSwapBuffers    (  CATHOOK*             hookInst,
00041                                             HDC                  hdc);
00042 
00043         CATFloat32  fTexScaleX;         ///< Scale factor from texture to actual coordinates (X)            
00044         CATFloat32  fTexScaleY;         ///< Scale factor from texture to actual coordinates (Y)
00045         CATUInt32   fTexture;           ///< Texture ID containing image - remember is power of 2 for dimensions
00046         HMODULE     fOpenGLDLL;         ///< opengl32.dll module handle
00047 };
00048 
00049 #endif // CAT_CONFIG_WIN32
00050 #endif // _CATOverlayOpenGL_H_

Generated on Mon Feb 11 04:09:46 2008 for Game Accessibility Suite by doxygen 1.5.4