SHARE
TWEET

Gaysex gui

a guest Oct 15th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2.  
  3. #include "SDK.h"
  4.  
  5. namespace SDK
  6. {
  7.     struct studiohwdata_t;
  8.     struct StudioDecalHandle_t;
  9.     class CStudioHdr;
  10.     struct DrawModelInfo_t;
  11.     class IMatRenderContext;
  12.     struct MaterialLightingState_t;
  13.     class ITexture;
  14.     struct ColorMeshInfo_t;
  15.  
  16.     FORWARD_DECLARE_HANDLE( LightCacheHandle_t );
  17.  
  18.     FORWARD_DECLARE_HANDLE( memhandle_t );
  19.     typedef memhandle_t DataCacheHandle_t;
  20.  
  21.     struct DrawModelState_t
  22.     {
  23.         studiohdr_t*            m_pStudioHdr;
  24.         studiohwdata_t*         m_pStudioHWData;
  25.         IClientRenderable*      m_pRenderable;
  26.         const matrix3x4_t       *m_pModelToWorld;
  27.         StudioDecalHandle_t*    m_decals;
  28.         int                     m_drawFlags;
  29.         int                     m_lod;
  30.     };
  31.  
  32.     typedef unsigned short ModelInstanceHandle_t;
  33.  
  34.     enum
  35.     {
  36.         MODEL_INSTANCE_INVALID = (ModelInstanceHandle_t)~0
  37.     };
  38.  
  39.     struct ModelRenderInfo_t
  40.     {
  41.         Vector origin;
  42.         QAngle angles;
  43.         char pad[0x4];
  44.         IClientRenderable *pRenderable;
  45.         const model_t *pModel;
  46.         const matrix3x4_t *pModelToWorld;
  47.         const matrix3x4_t *pLightingOffset;
  48.         const Vector *pLightingOrigin;
  49.         int flags;
  50.         int entity_index;
  51.         int skin;
  52.         int body;
  53.         int hitboxset;
  54.         ModelInstanceHandle_t instance;
  55.  
  56.         ModelRenderInfo_t()
  57.         {
  58.             pModelToWorld = NULL;
  59.             pLightingOffset = NULL;
  60.             pLightingOrigin = NULL;
  61.         }
  62.     };
  63.  
  64.     struct StaticPropRenderInfo_t
  65.     {
  66.         const matrix3x4_t       *pModelToWorld;
  67.         const model_t           *pModel;
  68.         IClientRenderable       *pRenderable;
  69.         Vector                  *pLightingOrigin;
  70.         ModelInstanceHandle_t   instance;
  71.         uint8                   skin;
  72.         uint8                   alpha;
  73.     };
  74.  
  75.     struct LightingQuery_t
  76.     {
  77.         Vector m_LightingOrigin;
  78.         ModelInstanceHandle_t m_InstanceHandle;
  79.         bool m_bAmbientBoost;
  80.     };
  81.  
  82.     struct StaticLightingQuery_t : public LightingQuery_t
  83.     {
  84.         IClientRenderable *m_pRenderable;
  85.     };
  86.  
  87.     enum OverrideType_t
  88.     {
  89.         OVERRIDE_NORMAL = 0 ,
  90.         OVERRIDE_BUILD_SHADOWS ,
  91.         OVERRIDE_DEPTH_WRITE ,
  92.     };
  93.  
  94.     enum
  95.     {
  96.         ADDDECAL_TO_ALL_LODS = -1
  97.     };
  98.  
  99.     namespace TABLE
  100.     {
  101.         namespace IVModelRender
  102.         {
  103.             enum
  104.             {
  105.                 DrawModelExecute = 21 ,
  106.             };
  107.         }
  108.     }
  109.  
  110.     class IVModelRender
  111.     {
  112.     public:
  113.         virtual int DrawModel( int flags , IClientRenderable *pRenderable , ModelInstanceHandle_t instance , int entity_index , const model_t *model , Vector const& origin , QAngle const& angles , int skin , int body , int hitboxset , const matrix3x4_t *modelToWorld = NULL , const matrix3x4_t *pLightingOffset = NULL ) = 0;
  114.         // This causes a material to be used when rendering the model instead
  115.         // of the materials the model was compiled with
  116.         virtual void    ForcedMaterialOverride( IMaterial *newMaterial , OverrideType_t nOverrideType = OVERRIDE_NORMAL , int iUnknown = 0 ) = 0;
  117.         virtual bool    IsForcedMaterialOverride( void ) = 0;
  118.         virtual void    SetViewTarget( const CStudioHdr *pStudioHdr , int nBodyIndex , const Vector& target ) = 0;
  119.         // Creates, destroys instance data to be associated with the model
  120.         virtual ModelInstanceHandle_t CreateInstance( IClientRenderable *pRenderable , LightCacheHandle_t *pCache = NULL ) = 0;
  121.         virtual void DestroyInstance( ModelInstanceHandle_t handle ) = 0;
  122.         // Associates a particular lighting condition with a model instance handle.
  123.         // FIXME: This feature currently only works for static props. To make it work for entities, etc.,
  124.         // we must clean up the lightcache handles as the model instances are removed.
  125.         // At the moment, since only the static prop manager uses this, it cleans up all LightCacheHandles
  126.         // at level shutdown.
  127.         virtual void SetStaticLighting( ModelInstanceHandle_t handle , LightCacheHandle_t* pHandle ) = 0;
  128.         virtual LightCacheHandle_t GetStaticLighting( ModelInstanceHandle_t handle ) = 0;
  129.         // moves an existing InstanceHandle to a nex Renderable to keep decals etc. Models must be the same
  130.         virtual bool ChangeInstance( ModelInstanceHandle_t handle , IClientRenderable *pRenderable ) = 0;
  131.         // Creates a decal on a model instance by doing a planar projection
  132.         // along the ray. The material is the decal material, the radius is the
  133.         // radius of the decal to create.
  134.         virtual void AddDecal( ModelInstanceHandle_t handle , Ray_t const& ray , Vector const& decalUp , int decalIndex , int body , bool noPokeThru = false , int maxLODToDecal = ADDDECAL_TO_ALL_LODS ) = 0;
  135.         // Removes all the decals on a model instance
  136.         virtual void RemoveAllDecals( ModelInstanceHandle_t handle ) = 0;
  137.         virtual bool ModelHasDecals( ModelInstanceHandle_t handle ) = 0;
  138.         // Remove all decals from all models
  139.         virtual void RemoveAllDecalsFromAllModels() = 0;
  140.         // Shadow rendering, DrawModelShadowSetup returns the address of the bone-to-world array, NULL in case of error
  141.         virtual matrix3x4_t* DrawModelShadowSetup( IClientRenderable *pRenderable , int body , int skin , DrawModelInfo_t *pInfo , matrix3x4_t *pCustomBoneToWorld = NULL ) = 0;
  142.         virtual void DrawModelShadow( IClientRenderable *pRenderable , const DrawModelInfo_t &info , matrix3x4_t *pCustomBoneToWorld = NULL ) = 0;
  143.         // This gets called when overbright, etc gets changed to recompute static prop lighting.
  144.         virtual bool RecomputeStaticLighting( ModelInstanceHandle_t handle ) = 0;
  145.         virtual void ReleaseAllStaticPropColorData( void ) = 0;
  146.         virtual void RestoreAllStaticPropColorData( void ) = 0;
  147.         // Extended version of drawmodel
  148.         virtual int DrawModelEx( ModelRenderInfo_t &pInfo ) = 0;
  149.         virtual int DrawModelExStaticProp( ModelRenderInfo_t &pInfo ) = 0;
  150.         virtual bool DrawModelSetup( ModelRenderInfo_t &pInfo , DrawModelState_t *pState , matrix3x4_t **ppBoneToWorldOut ) = 0;
  151.         virtual void DrawModelExecute( IMatRenderContext * ctx , const DrawModelState_t &state , const ModelRenderInfo_t &pInfo , matrix3x4_t *pCustomBoneToWorld = NULL ) = 0;
  152.         // Sets up lighting context for a point in space
  153.         virtual void SetupLighting( const Vector &vecCenter ) = 0;
  154.         // doesn't support any debug visualization modes or other model options, but draws static props in the
  155.         // fastest way possible
  156.         virtual int DrawStaticPropArrayFast( StaticPropRenderInfo_t *pProps , int count , bool bShadowDepth ) = 0;
  157.         // Allow client to override lighting state
  158.         virtual void SuppressEngineLighting( bool bSuppress ) = 0;
  159.         virtual void SetupColorMeshes( int nTotalVerts ) = 0;
  160.         // Sets up lighting context for a point in space, with smooth interpolation per model.
  161.         // Passing MODEL_INSTANCE_INVALID as a handle is equivalent to calling SetupLighting.
  162.         virtual void SetupLightingEx( const Vector &vecCenter , ModelInstanceHandle_t handle ) = 0;
  163.         // Finds the brightest light source illuminating a point. Returns false if there isn't any.
  164.         virtual bool GetBrightestShadowingLightSource( const Vector &vecCenter , Vector& lightPos , Vector& lightBrightness , bool bAllowNonTaggedLights ) = 0;
  165.         // Computes lighting state for an array of lighting requests
  166.         virtual void ComputeLightingState( int nCount , const LightingQuery_t *pQuery , MaterialLightingState_t *pState , ITexture **ppEnvCubemapTexture ) = 0;
  167.         // Gets an array of decal handles given model instances
  168.         virtual void GetModelDecalHandles( StudioDecalHandle_t *pDecals , int nDecalStride , int nCount , const ModelInstanceHandle_t *pHandles ) = 0;
  169.         // Computes lighting state for an array of lighting requests for renderables which use static lighting
  170.         virtual void ComputeStaticLightingState( int nCount , const StaticLightingQuery_t *pQuery , MaterialLightingState_t *pState , MaterialLightingState_t *pDecalState , ColorMeshInfo_t **ppStaticLighting , ITexture **ppEnvCubemapTexture , DataCacheHandle_t *pColorMeshHandles ) = 0;
  171.         // Cleans up lighting state. Must be called after the draw call that uses
  172.         // the color meshes return from ComputeStaticLightingState has been issued
  173.         virtual void CleanupStaticLightingState( int nCount , DataCacheHandle_t *pColorMeshHandles ) = 0;
  174.     };
  175. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top