mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Update IShaderDynamicAPI and IShaderAPI interfaces.
This commit is contained in:
@ -84,6 +84,7 @@ ifeq "$(OS)" "Darwin"
|
||||
DEFINES = -D_OSX -DOSX
|
||||
SHLIBEXT = dylib
|
||||
SHLIBLDFLAGS = -dynamiclib -mmacosx-version-min=10.5
|
||||
ARCH_CFLAGS += -mmacosx-version-min=10.5
|
||||
else
|
||||
DEFINES = -D_LINUX -DLINUX
|
||||
SHLIBEXT = so
|
||||
@ -94,7 +95,8 @@ DEFINES += -DCOMPILER_GCC -DPOSIX -DVPROF_LEVEL=1 -DSWDS -D_finite=finite -Dstri
|
||||
-D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp
|
||||
UNDEF = -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE
|
||||
|
||||
BASE_CFLAGS = -fno-strict-aliasing -Wall -Werror -Wno-conversion -Wno-overloaded-virtual -Wno-non-virtual-dtor -Wno-invalid-offsetof
|
||||
BASE_CFLAGS = -fno-strict-aliasing -Wall -Werror -Wno-conversion -Wno-overloaded-virtual -Wno-non-virtual-dtor -Wno-invalid-offsetof \
|
||||
-Wno-unused
|
||||
SHLIBCFLAGS = -fPIC
|
||||
|
||||
# Flags passed to the c compiler
|
||||
|
@ -355,7 +355,9 @@ public:
|
||||
virtual void ClearBuffersObeyStencil( bool bClearColor, bool bClearDepth );
|
||||
virtual void ClearBuffersObeyStencilEx( bool bClearColor, bool bClearAlpha, bool bClearDepth );
|
||||
virtual void PerformFullScreenStencilOperation();
|
||||
virtual void ReadPixels( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat );
|
||||
virtual void ReadPixels( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, ITexture *pTexture );
|
||||
virtual void ReadPixelsAsync( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, ITexture *pTexture, CThreadEvent *pEvent );
|
||||
virtual void ReadPixelsAsyncGetResult( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, CThreadEvent *pEvent );
|
||||
virtual void ReadPixels( Rect_t *pSrcRect, Rect_t *pDstRect, unsigned char *data, ImageFormat dstFormat, int nDstStride );
|
||||
virtual int SelectionMode( bool selectionMode );
|
||||
virtual void SelectionBuffer( unsigned int *pBuffer, int size );
|
||||
@ -400,7 +402,7 @@ public:
|
||||
virtual bool SupportsMipmappedCubemaps() const;
|
||||
virtual int NumVertexShaderConstants() const;
|
||||
int NumBooleanVertexShaderConstants() const;
|
||||
int NumIntegerVertexShaderConstants() const;
|
||||
int NumIntegerVertexShaderConstants() const;
|
||||
virtual int NumPixelShaderConstants() const;
|
||||
virtual int MaxNumLights() const;
|
||||
virtual int MaxVertexShaderBlendMatrices() const;
|
||||
@ -548,7 +550,7 @@ public:
|
||||
virtual void UpdateStereoTexture( ShaderAPITextureHandle_t texHandle, bool *pStereoActiveThisFrame );
|
||||
virtual void SetSRGBWrite( bool bState );
|
||||
virtual void PrintfVA( char *fmt, va_list vargs );
|
||||
virtual void Printf( char *fmt, ... );
|
||||
virtual void Printf( char *fmt, ... );
|
||||
virtual float Knob( char *knobname, float *setvalue );
|
||||
virtual void AddShaderComboInformation( const ShaderComboSemantics_t *pSemantics );
|
||||
virtual void SpinPresent( unsigned int nFrames );
|
||||
@ -562,6 +564,14 @@ public:
|
||||
virtual float GetLightMapScaleFactor( void ) const;
|
||||
virtual ShaderAPITextureHandle_t FindTexture( const char *pDebugName );
|
||||
virtual void GetTextureDimensions( ShaderAPITextureHandle_t hTexture, int &nWidth, int &nHeight, int &nDepth );
|
||||
virtual void SetVertexShaderViewProj();
|
||||
virtual void UpdateVertexShaderMatrix( int );
|
||||
virtual void SetVertexShaderModelViewProjAndModelView();
|
||||
virtual void SetVertexShaderCameraPos();
|
||||
virtual int SetSkinningMatrices( const MeshInstanceData_t & );
|
||||
virtual void BeginGeneratingCSMs();
|
||||
virtual void EndGeneratingCSMs();
|
||||
virtual void PerpareForCascadeDraw( int, float, float );
|
||||
private:
|
||||
enum
|
||||
{
|
||||
@ -2113,7 +2123,17 @@ void CShaderAPIEmpty::PerformFullScreenStencilOperation()
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::ReadPixels( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat )
|
||||
void CShaderAPIEmpty::ReadPixels( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, ITexture *pTexture )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::ReadPixelsAsync( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, ITexture *pTexture, CThreadEvent *pEvent )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::ReadPixelsAsyncGetResult( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, CThreadEvent *pEvent )
|
||||
{
|
||||
|
||||
}
|
||||
@ -3157,3 +3177,43 @@ void CShaderAPIEmpty::GetTextureDimensions( ShaderAPITextureHandle_t hTexture, i
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::SetVertexShaderViewProj()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::UpdateVertexShaderMatrix( int )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::SetVertexShaderModelViewProjAndModelView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::SetVertexShaderCameraPos()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int CShaderAPIEmpty::SetSkinningMatrices( const MeshInstanceData_t & )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::BeginGeneratingCSMs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::EndGeneratingCSMs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CShaderAPIEmpty::PerpareForCascadeDraw( int, float, float )
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -286,6 +286,9 @@ public:
|
||||
// NOTE: These methods have been ported to DX10
|
||||
//
|
||||
|
||||
virtual bool IsRenderingPaint() const = 0;
|
||||
virtual bool IsStereoActiveThisFrame() const = 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;
|
||||
@ -369,6 +372,10 @@ public:
|
||||
virtual void CullMode( MaterialCullMode_t cullMode ) = 0;
|
||||
virtual void FlipCullMode( void ) = 0; //CW->CCW or CCW->CW, intended for mirror support where the view matrix is flipped horizontally
|
||||
|
||||
virtual void BeginGeneratingCSMs() = 0;
|
||||
virtual void EndGeneratingCSMs() = 0;
|
||||
virtual void PerpareForCascadeDraw( int, float, float ) = 0;
|
||||
|
||||
// Force writes only when z matches. . . useful for stenciling things out
|
||||
// by rendering the desired Z values ahead of time.
|
||||
virtual void ForceDepthFuncEquals( bool bEnable ) = 0;
|
||||
@ -472,7 +479,9 @@ public:
|
||||
|
||||
// stuff that isn't to be used from within a shader
|
||||
virtual void ClearBuffersObeyStencil( bool bClearColor, bool bClearDepth ) = 0;
|
||||
virtual void ReadPixels( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat ) = 0;
|
||||
virtual void ReadPixels( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, ITexture *pTexture ) = 0;
|
||||
virtual void ReadPixelsAsync( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, ITexture *pTexture, CThreadEvent *pEvent ) = 0;
|
||||
virtual void ReadPixelsAsyncGetResult( int x, int y, int width, int height, unsigned char *data, ImageFormat dstFormat, CThreadEvent *pEvent ) = 0;
|
||||
virtual void ReadPixels( Rect_t *pSrcRect, Rect_t *pDstRect, unsigned char *data, ImageFormat dstFormat, int nDstStride ) = 0;
|
||||
|
||||
virtual void FlushHardware() = 0;
|
||||
@ -789,7 +798,7 @@ public:
|
||||
virtual void SetSRGBWrite( bool bState ) = 0;
|
||||
|
||||
virtual void PrintfVA( char *fmt, va_list vargs ) = 0;
|
||||
virtual void Printf( char *fmt, ... ) = 0;
|
||||
virtual void Printf( char *fmt, ... ) = 0;
|
||||
|
||||
virtual float Knob( char *knobname, float *setvalue ) = 0;
|
||||
|
||||
|
@ -137,6 +137,16 @@ enum TessellationMode_t;
|
||||
abstract_class IShaderDynamicAPI
|
||||
{
|
||||
public:
|
||||
virtual void BeginPerfEEvent( wchar_t * ) {};
|
||||
virtual void EndPerfEvent() {};
|
||||
|
||||
virtual void SetVertexShaderViewProj() = 0;
|
||||
virtual void UpdateVertexShaderMatrix( int ) = 0;
|
||||
virtual void SetVertexShaderModelViewProjAndModelView() = 0;
|
||||
virtual void SetVertexShaderCameraPos() = 0;
|
||||
virtual int SetSkinningMatrices( const MeshInstanceData_t & ) = 0;
|
||||
virtual void BindTexture( Sampler_t stage, TextureBindFlags_t nBindFlags, ShaderAPITextureHandle_t textureHandle ) = 0;
|
||||
|
||||
// returns the current time in seconds....
|
||||
virtual double CurrentTime() const = 0;
|
||||
|
||||
@ -288,8 +298,6 @@ public:
|
||||
virtual void DisablePredication() = 0;
|
||||
#endif // _X360
|
||||
|
||||
virtual bool IsRenderingPaint() const = 0;
|
||||
virtual bool IsStereoActiveThisFrame() const = 0;
|
||||
};
|
||||
|
||||
// end class IShaderDynamicAPI
|
||||
|
Reference in New Issue
Block a user