Main Page -
Class Hierarchy -
Class List -
File List -
Class Members -
Related Pages -

Information | Reference | SourceForge Project | Author
Muli3D

Reference: Muli3D: m3dcore_presenttarget.h Source File

m3dcore_presenttarget.h

Go to the documentation of this file.
00001 /* 00002 Muli3D - a software rendering library 00003 Copyright (C) 2004, 2005 Stephan Reiter <streiter@aon.at> 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 00022 00023 #ifndef __M3DCORE_PRESENTTARGET_H__ 00024 #define __M3DCORE_PRESENTTARGET_H__ 00025 00026 #include "../m3dbase.h" 00027 #include "../m3dtypes.h" 00028 00030 class IMuli3DPresentTarget : public IBase 00031 { 00032 protected: 00034 virtual ~IMuli3DPresentTarget(); 00035 00038 IMuli3DPresentTarget( class CMuli3DDevice *i_pParent ); 00039 00040 public: 00045 virtual result Create() = 0; 00046 00055 virtual result Present( const float32 *i_pSource, uint32 i_iFloats ) = 0; 00056 00058 class CMuli3DDevice *pGetDevice(); 00059 00060 protected: 00061 class CMuli3DDevice *m_pParent; 00062 }; 00063 00064 // Platform-dependent code ---------------------------------------------------- 00065 00066 #ifdef WIN32 00067 00068 #include <ddraw.h> 00069 #pragma comment( lib, "ddraw.lib" ) 00070 #pragma comment( lib, "dxguid.lib" ) 00071 00073 class CMuli3DPresentTargetWin32 : public IMuli3DPresentTarget 00074 { 00075 protected: 00076 virtual ~CMuli3DPresentTargetWin32(); 00077 00078 friend class CMuli3DDevice; 00081 CMuli3DPresentTargetWin32( class CMuli3DDevice *i_pParent ); 00082 00083 public: 00088 result Create(); 00089 00098 result Present( const float32 *i_pSource, uint32 i_iFloats ); 00099 00100 private: 00105 void ProcessBits( uint32 i_iMask, uint16 &o_iLowBit, uint16 &o_iNumBits ); 00106 00107 private: 00108 LPDIRECTDRAW7 m_pDirectDraw; 00109 LPDIRECTDRAWCLIPPER m_pDirectDrawClipper; 00110 LPDIRECTDRAWSURFACE7 m_pDirectDrawSurfaces[2]; 00111 bool m_bDDSurfaceLost; 00112 00113 uint16 m_i16bitMaxVal[3]; 00114 uint16 m_i16bitShift[3]; 00115 }; 00116 00117 #endif 00118 00119 #ifdef LINUX_X11 00120 00122 class CMuli3DPresentTargetLinuxX11 : public IMuli3DPresentTarget 00123 { 00124 protected: 00125 virtual ~CMuli3DPresentTargetLinuxX11(); 00126 00127 friend class CMuli3DDevice; 00130 CMuli3DPresentTargetLinuxX11( class CMuli3DDevice *i_pParent ); 00131 00132 public: 00137 result Create(); 00138 00147 result Present( const float32 *i_pSource, uint32 i_iFloats ); 00148 00149 private: 00150 Display *m_pDisplay; 00151 GC m_WindowGC; 00152 XImage *m_pXImage; 00153 uint32 m_iPixelBytes; 00154 00155 uint16 m_i16bitMaxVal[3]; 00156 uint16 m_i16bitShift[3]; 00157 }; 00158 00159 #endif 00160 00161 #ifdef __amigaos4__ 00162 00164 class CMuli3DPresentTargetAmigaOS4 : public IMuli3DPresentTarget 00165 { 00166 protected: 00167 virtual ~CMuli3DPresentTargetAmigaOS4(); 00168 00169 friend class CMuli3DDevice; 00172 CMuli3DPresentTargetAmigaOS4( class CMuli3DDevice *i_pParent ); 00173 00174 public: 00179 result Create(); 00180 00189 result Present( const float32 *i_pSource, uint32 i_iFloats ); 00190 00191 private: 00192 struct BitMap *m_pBitMap; 00193 }; 00194 00195 #endif 00196 00197 #endif // __M3DCORE_PRESENTTARGET_H__

Documentation created with doxygen SourceForge.net Logo