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
2.5 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #if !defined( IEFX_H )
  9. #define IEFX_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "interface.h"
  14. #include "mathlib/vector.h"
  15. struct model_t;
  16. struct dlight_t;
  17. class IMaterial;
  18. #define MAX_DLIGHTS 32
  19. //-----------------------------------------------------------------------------
  20. // Purpose: Exposes effects api to client .dll
  21. //-----------------------------------------------------------------------------
  22. abstract_class IVEfx
  23. {
  24. public:
  25. // Retrieve decal texture index from decal by name
  26. virtual int Draw_DecalIndexFromName ( char *name ) = 0;
  27. // Apply decal. See decal_private.h for flags (FDECAL_*)
  28. // If normal is specified, don't decal surfaces antiparallel with normal
  29. virtual void DecalShoot ( int textureIndex, int entity,
  30. const model_t *model, const Vector& model_origin, const QAngle& model_angles,
  31. const Vector& position, const Vector *saxis, int flags, const Vector *pNormal = NULL, int nAdditionalDecalFlags = 0 ) = 0;
  32. // Apply colored decal. See decal_private.h for flags (FDECAL_*)
  33. virtual void DecalColorShoot ( int textureIndex, int entity,
  34. const model_t *model, const Vector& model_origin, const QAngle& model_angles,
  35. const Vector& position, const Vector *saxis, int flags, const color32 &rgbaColor, const Vector *pNormal = NULL, int nAdditionalDecalFlags = 0 ) = 0;
  36. virtual void PlayerDecalShoot( IMaterial *material, void *userdata, int entity, const model_t *model,
  37. const Vector& model_origin, const QAngle& model_angles,
  38. const Vector& position, const Vector *saxis, int flags, const color32 &rgbaColor, int nAdditionalDecalFlags ) = 0;
  39. // Allocate a dynamic world light ( key is the entity to whom it is associated )
  40. virtual dlight_t *CL_AllocDlight ( int key ) = 0;
  41. // Allocate a dynamic entity light ( key is the entity to whom it is associated )
  42. virtual dlight_t *CL_AllocElight ( int key ) = 0;
  43. // Get a list of the currently-active dynamic lights.
  44. virtual int CL_GetActiveDLights( dlight_t *pList[MAX_DLIGHTS] ) = 0;
  45. // Retrieve decal texture name from decal by index
  46. virtual const char *Draw_DecalNameFromIndex( int nIndex ) = 0;
  47. // Given an elight key, find it. Does not search ordinary dlights. May return NULL.
  48. virtual dlight_t *GetElightByKey( int key ) = 0;
  49. };
  50. #define VENGINE_EFFECTS_INTERFACE_VERSION "VEngineEffects001"
  51. extern IVEfx *effects;
  52. #endif // IEFX_H