Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmGfxUtilD3D.h

Go to the documentation of this file.
00001 //=============================================================================
00002 // filename: RmGfxUtilD3D.h                                                    
00003 //                                                                             
00004 //              ATI Research, Inc.                                             
00005 //              3D Application Research Group                                  
00006 //                                                                             
00007 //=============================================================================
00008 //   (C) 2004 ATI Research, Inc.  All rights reserved.                         
00009 //=============================================================================
00010 
00011 #ifndef _RM_GFX_UTILITIES_D3D_H_
00012 #define _RM_GFX_UTILITIES_D3D_H_
00013 
00014 #include <GfxUtil/RmGfxUtilTypes.h>
00015 
00016 //=============================================================================
00020 //=============================================================================
00021 
00022 class RmD3DHLSLIncludeInterface;
00023 
00024 //=============================================================================
00031 //=============================================================================
00032 RMGFXUTIL_API D3DFORMAT RmGfxToD3DFormat( RmPixelFormatType format );
00033 
00034 //=============================================================================
00041 //=============================================================================
00042 RMGFXUTIL_API RmPixelFormatType RmGfxFromD3DFormat( D3DFORMAT format );
00043 
00044 //=============================================================================
00052 //=============================================================================
00053 RMGFXUTIL_API IDirect3DDevice9* RmGfxGetD3DDevice();
00054 
00055 //=============================================================================
00061 //=============================================================================
00062 RMGFXUTIL_API D3DDEVTYPE RmGfxGetD3DDeviceType();
00063 
00064 //=============================================================================
00071 //=============================================================================
00072 RMGFXUTIL_API IDirect3D9* RmGfxGetD3D();
00073 
00074 //=============================================================================
00080 //=============================================================================
00081 RMGFXUTIL_API D3DDISPLAYMODE RmGfxGetD3DDisplayMode();
00082 
00083 //=============================================================================
00095 //=============================================================================
00096 RMGFXUTIL_API bool RmGfxSetD3DSurface( IDirect3DSurface9 *pDestSurface,
00097                                        RmSurface         *pSrcSurface,
00098                                        bool               bNeedToFlip );
00099 
00100 //=============================================================================
00112 //=============================================================================
00113 RMGFXUTIL_API bool RmGfxSetRmSurface( RmSurface         *pDestSurface,
00114                                       IDirect3DSurface9 *pSrcSurface,
00115                                       bool               bNeedToFlip );
00116 
00117 //=============================================================================
00128 //=============================================================================
00129 RMGFXUTIL_API bool RmGfxSetD3DVolume( IDirect3DVolume9 *pDestVolume,
00130                                       RmVolume         *pSrcVolume,
00131                                       bool bNeedToFlip );
00132 
00133 
00134 //=============================================================================
00145 //=============================================================================
00146 RMGFXUTIL_API bool RmGfxSetRmVolume( RmVolume         *pDestVolume,
00147                                      IDirect3DVolume9 *pSrcVolume,
00148                                      bool bNeedToFlip );
00149 
00150 //=============================================================================
00158 //=============================================================================
00159 RMGFXUTIL_API void RmGfxConvertMatrix( RmMatrix4x4       &refDestMatrix, 
00160                                        const D3DXMATRIX  &refSrcMatrix );
00161 
00162 //=============================================================================
00170 //=============================================================================
00171 RMGFXUTIL_API void RmGfxConvertMatrix( D3DXMATRIX        &refDestMatrix, 
00172                                        const RmMatrix4x4 &refSrcMatrix );
00173 
00174 //=============================================================================
00185 //=============================================================================
00186 RMGFXUTIL_API bool RmGfxSetD3DTexture( IDirect3DBaseTexture9 *pDestTexture,
00187                                        RmTexture             *pSrcTexture,
00188                                        bool                   bNeedToFlip );
00189 
00190 
00191 //=============================================================================
00201 //=============================================================================
00202 RMGFXUTIL_API bool RmGfxSaveToXFile( const RM_TCHAR *szFileName, 
00203                                      RmModelData    *pModelData );
00204 
00205 //=============================================================================
00212 //=============================================================================
00213 RMGFXUTIL_API bool RmGfxDoesFormatHaveStencilBuffer( DWORD dwFormat );
00214 
00215 //-----------------------------------------------------------------------------
00220 //-----------------------------------------------------------------------------
00221 class RMGFXUTIL_API RmD3DHLSLIncludeInterface : public ID3DXInclude
00222 {
00223 public:
00224    //-----------------------------------------------------------------------------
00226    //-----------------------------------------------------------------------------
00227    RmD3DHLSLIncludeInterface();
00228 
00229    //-----------------------------------------------------------------------------
00231    //-----------------------------------------------------------------------------
00232    ~RmD3DHLSLIncludeInterface();
00233 
00234    //-----------------------------------------------------------------------------
00239    //-----------------------------------------------------------------------------
00240    void SetIncludePath( RmStringT& strIncludePath );
00241 
00242    //-----------------------------------------------------------------------------
00247    //-----------------------------------------------------------------------------
00248    void SetCompiledShader( RmShader *pShader )     {     m_pShader = pShader;       }
00249 
00250    //-----------------------------------------------------------------------------
00259    //-----------------------------------------------------------------------------
00260    STDMETHOD(Open) ( D3DXINCLUDE_TYPE IncludeType,
00261                      LPCSTR           pFileName,
00262                      LPCVOID          pParentData,
00263                      LPCVOID         *ppData,
00264                      UINT            *pBytes );
00265 
00266    //-----------------------------------------------------------------------------
00271    //-----------------------------------------------------------------------------
00272    STDMETHOD(Close) (LPCVOID pData);
00273 
00274 private:
00275       
00276    RmStringT m_strIncludePath;      // Include directory path string
00277    RmShader *m_pShader;             // The shader node that is being compiled with this include interface
00278 
00279 }; // End of RmD3DHLSLIncludeInterface class declaration
00280 
00281 
00282 
00283 //=================================================================================================
00289 //================================================================================================= 
00290 RMGFXUTIL_API RmD3DHLSLIncludeInterface* RmGetHLSLIncludeInterface();
00291 
00292 
00293 #endif

Generated on Fri Feb 25 16:08:37 2005 for RenderMonkey SDK by doxygen 1.3.6