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.

81 lines
3.1 KiB

  1. //========== Copyright (c) 2005, Valve Corporation, All rights reserved. ========
  2. //
  3. // Purpose:
  4. //
  5. //===============================================================================
  6. #ifndef IMATRENDERCONTEXTINTERNAL_H
  7. #define IMATRENDERCONTEXTINTERNAL_H
  8. #if defined( _WIN32 )
  9. #pragma once
  10. #endif
  11. // typedefs to allow use of delegation macros
  12. typedef Vector4D LightCube_t[6];
  13. abstract_class IMatRenderContextInternal : public IMatRenderContext
  14. {
  15. // For now, stuck implementing these until IMaterialSystem is reworked
  16. bool Connect(CreateInterfaceFn) { return true; }
  17. void Disconnect(void) {}
  18. void *QueryInterface(const char *pszInterface) { return NULL; }
  19. InitReturnVal_t Init(void) { return INIT_OK; }
  20. void Shutdown(void) {}
  21. public:
  22. virtual float GetFloatRenderingParameter(int parm_number) const = 0;
  23. virtual int GetIntRenderingParameter(int parm_number) const = 0;
  24. virtual ITexture *GetTextureRenderingParameter(int parm_number) const = 0;
  25. virtual Vector GetVectorRenderingParameter(int parm_number) const = 0;
  26. virtual void SwapBuffers() = 0;
  27. virtual void SetCurrentMaterialInternal(IMaterialInternal* pCurrentMaterial) = 0;
  28. virtual IMaterialInternal* GetCurrentMaterialInternal() const = 0;
  29. virtual int GetLightmapPage() = 0;
  30. virtual void ForceDepthFuncEquals( bool) = 0;
  31. virtual bool InFlashlightMode() const = 0;
  32. virtual bool IsCascadedShadowMapping() const = 0;
  33. virtual void BindStandardTexture( Sampler_t, TextureBindFlags_t nBindFlags, StandardTextureId_t ) = 0;
  34. virtual void GetLightmapDimensions( int *, int *) = 0;
  35. virtual MorphFormat_t GetBoundMorphFormat() = 0;
  36. virtual ITexture *GetRenderTargetEx( int ) = 0;
  37. virtual void DrawClearBufferQuad( unsigned char, unsigned char, unsigned char, unsigned char, bool, bool, bool ) = 0;
  38. #ifdef _PS3
  39. virtual void DrawReloadZcullQuad() = 0;
  40. #endif // _PS3
  41. virtual bool OnDrawMesh( IMesh *pMesh, int firstIndex, int numIndices ) = 0;
  42. virtual bool OnDrawMesh( IMesh *pMesh, CPrimList *pLists, int nLists ) = 0;
  43. virtual bool OnDrawMeshModulated( IMesh *pMesh, const Vector4D &diffuseModulation, int firstIndex, int numIndices ) = 0;
  44. virtual bool OnSetFlexMesh( IMesh *pStaticMesh, IMesh *pMesh, int nVertexOffsetInBytes ) = 0;
  45. virtual bool OnSetColorMesh( IMesh *pStaticMesh, IMesh *pMesh, int nVertexOffsetInBytes ) = 0;
  46. virtual bool OnSetPrimitiveType( IMesh *pMesh, MaterialPrimitiveType_t type ) = 0;
  47. virtual void SyncMatrices() = 0;
  48. virtual void SyncMatrix( MaterialMatrixMode_t ) = 0;
  49. virtual void ForceHardwareSync() = 0;
  50. virtual void BeginFrame() = 0;
  51. virtual void EndFrame() = 0;
  52. virtual void SetFrameTime( float frameTime ) = 0;
  53. virtual void SetCurrentProxy( void *pProxy ) = 0;
  54. virtual void MarkRenderDataUnused( bool bBeginFrame ) = 0;
  55. virtual CMatCallQueue *GetCallQueueInternal() = 0;
  56. virtual void EvictManagedResources() = 0;
  57. virtual ShaderAPITextureHandle_t GetLightmapTexture( int nLightmapPage ) = 0;
  58. virtual bool IsRenderingPaint() const = 0;
  59. virtual ShaderAPITextureHandle_t GetPaintmapTexture( int nLightmapPage ) = 0;
  60. #if defined( DX_TO_GL_ABSTRACTION ) && !defined( _GAMECONSOLE )
  61. virtual void DoStartupShaderPreloading( void ) = 0;
  62. #endif
  63. };
  64. #endif // IMATRENDERCONTEXTINTERNAL_H