mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
Update IShaderDevice and IShaderAPI interfaces.
This commit is contained in:
parent
6142bb4f2d
commit
9509414371
@ -144,6 +144,7 @@ public:
|
||||
void RefreshFrontBufferNonInteractive();
|
||||
void HandleThreadEvent( uint32 threadEvent );
|
||||
void DoStartupShaderPreloading();
|
||||
const char *GetDeviceName();
|
||||
private:
|
||||
CEmptyMesh m_Mesh;
|
||||
CEmptyMesh m_DynamicMesh;
|
||||
@ -257,6 +258,7 @@ public:
|
||||
virtual void SetAmbientLightCube( Vector4D cube[6] );
|
||||
virtual void CopyRenderTargetToTexture( ShaderAPITextureHandle_t textureHandle );
|
||||
virtual void CopyRenderTargetToTextureEx( ShaderAPITextureHandle_t textureHandle, int nRenderTargetID, Rect_t *pSrcRect, Rect_t *pDstRect );
|
||||
virtual void CopyTextureToRenderTargetEx( int nRenderTargetID, ShaderAPITextureHandle_t textureHandle, Rect_t *pSrcRect, Rect_t *pDstRect );
|
||||
virtual void SetNumBoneWeights( int numBones );
|
||||
virtual void EnableHWMorphing( bool bEnable );
|
||||
virtual IMesh *GetDynamicMesh( IMaterial *pMaterial, int nHWSkinBoneCount, bool bBuffered, IMesh *pVertexOverride, IMesh *pIndexOverride);
|
||||
@ -578,6 +580,15 @@ public:
|
||||
virtual bool HasFullResolutionDepthTexture() const;
|
||||
virtual int NumBooleanPixelShaderConstants() const;
|
||||
virtual int NumIntegerPixelShaderConstants() const;
|
||||
virtual ShaderAPITextureHandle_t GetStandardTextureHandle( StandardTextureId_t nID );
|
||||
virtual bool IsStandardTextureHandleValid( StandardTextureId_t nId );
|
||||
virtual int Unknown0( int a1, void **a2, int *a3 );
|
||||
virtual void Unknown1();
|
||||
virtual void Unknown2( int a1, void *a2, int a3 );
|
||||
virtual void *Unknown3( void *a1, int a2 );
|
||||
virtual void *Unknown4( void *a1, int a2 );
|
||||
virtual void Unknown5( void **a1, void **a2, char *a3 );
|
||||
virtual void Unknown6( void *a1, int a2 );
|
||||
private:
|
||||
enum
|
||||
{
|
||||
@ -1178,6 +1189,11 @@ void CShaderDeviceEmpty::DoStartupShaderPreloading()
|
||||
|
||||
}
|
||||
|
||||
const char *CShaderDeviceEmpty::GetDeviceName()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Empty shader shadow
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1636,6 +1652,11 @@ void CShaderAPIEmpty::CopyRenderTargetToTextureEx( ShaderAPITextureHandle_t text
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::CopyTextureToRenderTargetEx( int nRenderTargetID, ShaderAPITextureHandle_t textureHandle, Rect_t *pSrcRect, Rect_t *pDstRect )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::SetNumBoneWeights( int numBones )
|
||||
{
|
||||
|
||||
@ -3254,3 +3275,49 @@ int CShaderAPIEmpty::NumIntegerPixelShaderConstants() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
ShaderAPITextureHandle_t CShaderAPIEmpty::GetStandardTextureHandle(StandardTextureId_t nID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CShaderAPIEmpty::IsStandardTextureHandleValid( StandardTextureId_t nId )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int CShaderAPIEmpty::Unknown0( int a1, void **a2, int *a3 )
|
||||
{
|
||||
*a2 = nullptr;
|
||||
*a3 = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::Unknown1()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::Unknown2( int a1, void *a2, int a3 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void *CShaderAPIEmpty::Unknown3( void *a1, int a2 )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void *CShaderAPIEmpty::Unknown4( void *a1, int a2 )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::Unknown5( void **a1, void **a2, char *a3 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::Unknown6( void *a1, int a2 )
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -280,6 +280,8 @@ public:
|
||||
#endif
|
||||
|
||||
virtual void OnDebugEvent( const char *pEvent ) {};
|
||||
|
||||
virtual const char *GetDeviceName() = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -289,6 +289,9 @@ public:
|
||||
virtual bool IsRenderingPaint() const = 0;
|
||||
virtual bool IsStereoActiveThisFrame() const = 0;
|
||||
|
||||
virtual bool IsStandardTextureHandleValid( StandardTextureId_t nId ) = 0;
|
||||
virtual int Unknown0( int a1, void **a2, int *a3 ) = 0;
|
||||
|
||||
// Viewport methods
|
||||
virtual void SetViewports( int nCount, const ShaderViewport_t* pViewports, bool setImmediately ) = 0;
|
||||
virtual int GetViewports( ShaderViewport_t* pViewports, int nMax ) const = 0;
|
||||
@ -590,6 +593,7 @@ public:
|
||||
ShaderAPITextureHandle_t depthTextureHandle = SHADER_RENDERTARGET_DEPTHBUFFER ) = 0;
|
||||
|
||||
virtual void CopyRenderTargetToTextureEx( ShaderAPITextureHandle_t textureHandle, int nRenderTargetID, Rect_t *pSrcRect = NULL, Rect_t *pDstRect = NULL ) = 0;
|
||||
virtual void CopyTextureToRenderTargetEx( int nRenderTargetID, ShaderAPITextureHandle_t textureHandle, Rect_t *pSrcRect = NULL, Rect_t *pDstRect = NULL ) = 0;
|
||||
|
||||
// For dealing with device lost in cases where SwapBuffers isn't called all the time (Hammer)
|
||||
virtual void HandleDeviceLost() = 0;
|
||||
@ -704,6 +708,8 @@ public:
|
||||
|
||||
virtual void SetScissorRect( int nLeft, int nTop, int nRight, int nBottom, bool bEnableScissor ) = 0;
|
||||
|
||||
virtual void Unknown1() = 0;
|
||||
|
||||
// nVidia CSAA modes, different from SupportsMSAAMode()
|
||||
virtual bool SupportsCSAAMode( int nNumSamples, int nQualityLevel ) = 0;
|
||||
|
||||
@ -806,6 +812,13 @@ public:
|
||||
virtual float GetLightMapScaleFactor( void ) const = 0;
|
||||
virtual ShaderAPITextureHandle_t FindTexture( const char * pDebugName ) = 0;
|
||||
virtual void GetTextureDimensions(ShaderAPITextureHandle_t hTexture, int &nWidth, int &nHeight, int &nDepth) = 0;
|
||||
virtual ShaderAPITextureHandle_t GetStandardTextureHandle(StandardTextureId_t nID) = 0;
|
||||
|
||||
virtual void Unknown2( int a1, void *a2, int a3 ) = 0;
|
||||
virtual void *Unknown3( void *a1, int a2 ) = 0;
|
||||
virtual void *Unknown4( void *a1, int a2 ) = 0;
|
||||
virtual void Unknown5( void **a1, void **a2, char *a3 ) = 0;
|
||||
virtual void Unknown6( void *a1, int a2 ) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user