Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
3.3 KiB

  1. //========== Copyright � 2005, Valve Corporation, All rights reserved. ========
  2. #ifndef SHADERUTIL_PS3NONVIRT_H
  3. #define SHADERUTIL_PS3NONVIRT_H
  4. #ifdef _PS3
  5. #include "shaderapi/ishaderutil.h"
  6. //////////////////////////////////////////////////////////////////////////
  7. //
  8. // PS3 non-virtual implementation proxy
  9. //
  10. // cat shaderutil_ps3nonvirt.h | nonvirtualscript.pl > shaderutil_ps3nonvirt.inl
  11. struct CPs3NonVirt_IShaderUtil
  12. {
  13. //NONVIRTUALSCRIPTBEGIN
  14. //NONVIRTUALSCRIPT/PROXY/CPs3NonVirt_IShaderUtil
  15. //NONVIRTUALSCRIPT/DELEGATE/g_MaterialSystem.CMaterialSystem::
  16. //
  17. // IShaderUtil
  18. //
  19. static MaterialSystem_Config_t& GetConfig();
  20. static bool ConvertImageFormat( unsigned char *src, enum ImageFormat srcImageFormat, unsigned char *dst, enum ImageFormat dstImageFormat, int width, int height, int srcStride = 0, int dstStride = 0 );
  21. static int GetMemRequired( int width, int height, int depth, ImageFormat format, bool mipmap );
  22. static const ImageFormatInfo_t& ImageFormatInfo( ImageFormat fmt );
  23. static void BindStandardTexture( Sampler_t sampler, TextureBindFlags_t nBindFlags, StandardTextureId_t id );
  24. static void GetLightmapDimensions( int *w, int *h );
  25. static void ReleaseShaderObjects( int nChangeFlags = 0 );
  26. static void RestoreShaderObjects( CreateInterfaceFn shaderFactory, int nChangeFlags = 0 );
  27. static bool IsInStubMode();
  28. static bool InFlashlightMode();
  29. static void NoteAnisotropicLevel( int currentLevel );
  30. static bool InEditorMode();
  31. static ITexture *GetRenderTargetEx( int nRenderTargetID );
  32. static void DrawClearBufferQuad( unsigned char r, unsigned char g, unsigned char b, unsigned char a, bool bClearColor, bool bClearAlpha, bool bClearDepth );
  33. static void DrawReloadZcullQuad();
  34. static bool OnDrawMesh( IMesh *pMesh, int firstIndex, int numIndices );
  35. static bool OnDrawMesh( IMesh *pMesh, CPrimList *pLists, int nLists );
  36. static bool OnSetFlexMesh( IMesh *pStaticMesh, IMesh *pMesh, int nVertexOffsetInBytes );
  37. static bool OnSetColorMesh( IMesh *pStaticMesh, IMesh *pMesh, int nVertexOffsetInBytes );
  38. static bool OnSetPrimitiveType( IMesh *pMesh, MaterialPrimitiveType_t type );
  39. static void SyncMatrices();
  40. static void SyncMatrix( MaterialMatrixMode_t mmm );
  41. static void BindStandardVertexTexture( VertexTextureSampler_t sampler, StandardTextureId_t id );
  42. static ShaderAPITextureHandle_t GetStandardTexture( StandardTextureId_t id );
  43. static void GetStandardTextureDimensions( int *pWidth, int *pHeight, StandardTextureId_t id );
  44. static int MaxHWMorphBatchCount();
  45. static void GetCurrentColorCorrection( ShaderColorCorrectionInfo_t* pInfo );
  46. static ShaderAPITextureHandle_t GetShaderAPITextureBindHandle( ITexture *pTexture, int nFrame, int nTextureChannel );
  47. static float GetSubDHeight();
  48. static bool OnDrawMeshModulated( IMesh *pMesh, const Vector4D &diffuseModulation, int firstIndex, int numIndices );
  49. static void OnThreadEvent( uint32 threadEvent );
  50. static MaterialThreadMode_t GetThreadMode();
  51. static void UncacheUnusedMaterials( bool bRecomputeStateSnapshots = false );
  52. static bool IsInFrame( );
  53. static ShaderAPITextureHandle_t GetLightmapTexture( int nLightmapPage );
  54. static bool IsRenderingPaint();
  55. static ShaderAPITextureHandle_t GetPaintmapTexture( int nLightmapPage );
  56. static bool IsCascadedShadowMapping();
  57. //NONVIRTUALSCRIPTEND
  58. };
  59. #endif
  60. #endif // SHADERUTIL_PS3NONVIRT_H