diff --git a/linux_sdk/x86-64/Makefile.shaderapiempty b/linux_sdk/x86-64/Makefile.shaderapiempty index f2e05177..9cbcb3cd 100644 --- a/linux_sdk/x86-64/Makefile.shaderapiempty +++ b/linux_sdk/x86-64/Makefile.shaderapiempty @@ -16,7 +16,7 @@ SHADER_OBJ_DIR = $(BUILD_OBJ_DIR)/materialsystem/$(NAME) INCLUDEDIRS = -I$(PUBLIC_SRC_DIR) -I$(MAT_SRC_DIR) -I$(MAT_PUBLIC_SRC_DIR) \ -I $(SHADERAPI_PUBLIC_SRC_DIR) -I$(TIER0_PUBLIC_SRC_DIR) -I$(TIER1_PUBLIC_SRC_DIR) -LDFLAGS_SHADER = -lm -ldl libtier0.$(SHLIBEXT) libvstdlib.$(SHLIBEXT) \ +LDFLAGS_SHADER = -lm -ldl libtier0$(SHLIBSUFFIX).$(SHLIBEXT) libvstdlib$(SHLIBSUFFIX).$(SHLIBEXT) \ $(LIB_DIR)/tier1.a $(LIB_DIR)/interfaces.a DO_CC = $(CPLUS) $(INCLUDEDIRS) -DARCH=$(ARCH) @@ -34,22 +34,22 @@ DO_CC += -o $@ -c $< SHADER_OBJS= \ $(SHADER_OBJ_DIR)/shaderapiempty.o \ -all: dirs $(NAME).$(SHLIBEXT) +all: dirs $(NAME)$(SHLIBSUFFIX).$(SHLIBEXT) dirs: -mkdir -p $(BUILD_OBJ_DIR) -mkdir -p $(SHADER_OBJ_DIR) -$(NAME).$(SHLIBEXT): $(SHADER_OBJS) +$(NAME)$(SHLIBSUFFIX).$(SHLIBEXT): $(SHADER_OBJS) $(CPLUS) $(SHLIBLDFLAGS) -o $(BUILD_DIR)/$@ $(SHADER_OBJS) $(LDFLAGS_SHADER) $(CPP_LIB) $(SHADER_OBJ_DIR)/%.o: $(SHADER_SRC_DIR)/%.cpp $(DO_CC) install: - cp -f $(NAME).$(SHLIBEXT) $(LIB_DIR)/$(NAME).$(SHLIBEXT) + cp -f $(NAME)$(SHLIBSUFFIX).$(SHLIBEXT) $(LIB_DIR)/$(NAME)$(SHLIBSUFFIX).$(SHLIBEXT) clean: -rm -rf $(SHADER_OBJ_DIR) - -rm -rf $(NAME).$(SHLIBEXT) + -rm -rf $(NAME)$(SHLIBSUFFIX).$(SHLIBEXT) diff --git a/materialsystem/shaderapiempty/shaderapiempty.cpp b/materialsystem/shaderapiempty/shaderapiempty.cpp index 42dab583..b6f012bb 100644 --- a/materialsystem/shaderapiempty/shaderapiempty.cpp +++ b/materialsystem/shaderapiempty/shaderapiempty.cpp @@ -572,6 +572,12 @@ public: virtual void BeginGeneratingCSMs(); virtual void EndGeneratingCSMs(); virtual void PerpareForCascadeDraw( int, float, float ); + virtual bool GetCSMAccurateBlending() const; + virtual void SetCSMAccurateBlending( bool bEnable ); + virtual bool SupportsResolveDepth() const; + virtual bool HasFullResolutionDepthTexture() const; + virtual int NumBooleanPixelShaderConstants() const; + virtual int NumIntegerPixelShaderConstants() const; private: enum { @@ -3217,3 +3223,34 @@ void CShaderAPIEmpty::PerpareForCascadeDraw( int, float, float ) { } + +bool CShaderAPIEmpty::GetCSMAccurateBlending() const +{ + return false; +} + +void CShaderAPIEmpty::SetCSMAccurateBlending( bool bEnable ) +{ + +} + +bool CShaderAPIEmpty::SupportsResolveDepth() const +{ + return false; +} + +bool CShaderAPIEmpty::HasFullResolutionDepthTexture() const +{ + return false; +} + +int CShaderAPIEmpty::NumBooleanPixelShaderConstants() const +{ + return 0; +} + +int CShaderAPIEmpty::NumIntegerPixelShaderConstants() const +{ + return 0; +} + diff --git a/public/appframework/ilaunchermgr.h b/public/appframework/ilaunchermgr.h index 66f697f0..f8fce722 100644 --- a/public/appframework/ilaunchermgr.h +++ b/public/appframework/ilaunchermgr.h @@ -33,6 +33,7 @@ class CShowPixelsParams; #if defined(DEDICATED) typedef void *PseudoGLContextPtr; class GLMRendererInfoFields; +class SDL_Cursor; #endif #endif // DX_TO_GL_ABSTRACTION @@ -47,7 +48,7 @@ class ILauncherMgr : public IAppSystem { public: // Create the window. - virtual bool CreateGameWindow( const char *pTitle, bool bWindowed, int width, int height ) = 0; + virtual bool CreateGameWindow( const char *pTitle, bool bWindowed, int width, int height, bool bUnknown ) = 0; #if defined( DX_TO_GL_ABSTRACTION ) virtual void GetDesiredPixelFormatAttribsAndRendererInfo( uint **ptrOut, uint *countOut, GLMRendererInfoFields *rendInfoOut ) = 0; @@ -60,13 +61,12 @@ public: // Set the mouse cursor position. virtual void SetCursorPosition( int x, int y ) = 0; - virtual void GetCursorPosition( int *x, int *y ) = 0; #if defined( DX_TO_GL_ABSTRACTION ) virtual void ShowPixels( CShowPixelsParams *params ) = 0; #endif - virtual void SetWindowFullScreen( bool bFullScreen, int nWidth, int nHeight ) = 0; + virtual void SetWindowFullScreen( bool bFullScreen, int nWidth, int nHeight, bool bUnknown ) = 0; virtual bool IsWindowFullScreen() = 0; virtual void MoveWindow( int x, int y ) = 0; virtual void SizeWindow( int width, int tall ) = 0; @@ -87,14 +87,8 @@ public: virtual void WaitUntilUserInput( int msSleepTime ) = 0; - // Loads a cursor defined in a file - virtual InputCursorHandle_t LoadCursorFromFile( const char *pFileName ) = 0; - virtual void FreeCursor( InputCursorHandle_t hCursor ) = 0; - // Sets the cursor icon - virtual void SetCursorIcon( InputCursorHandle_t hCursor ) = 0; - #if defined( DX_TO_GL_ABSTRACTION ) - virtual PseudoGLContextPtr GetMainContext() = 0; + virtual PseudoGLContextPtr GetMainContext() = 0; virtual PseudoGLContextPtr CreateExtraContext() = 0; virtual void DeleteContext( PseudoGLContextPtr hContext ) = 0; virtual bool MakeContextCurrent( PseudoGLContextPtr hContext ) = 0; @@ -105,11 +99,31 @@ public: virtual void *GetWindowRef() = 0; virtual void SetMouseVisible( bool bState ) = 0; + + virtual int GetActiveDisplayIndex() = 0; + + virtual void SetMouseCursor(SDL_Cursor *pCursor) = 0; + virtual void SetForbidMouseGrab( bool bForbidMouseGrab ) = 0; - virtual void SetGammaRamp( const uint16 *pRed, const uint16 *pGreen, const uint16 *pBlue ) = 0; + virtual void OnFrameRendered() = 0; + + virtual void ForceSystemCursorVisible() = 0; + virtual void UnforceSystemCursorVisible() = 0; virtual double GetPrevGLSwapWindowTime() = 0; + + virtual void GetCursorPosition( int *x, int *y ) = 0; + + // Loads a cursor defined in a file + virtual InputCursorHandle_t LoadCursorFromFile( const char *pFileName ) = 0; + + virtual void FreeCursor( InputCursorHandle_t hCursor ) = 0; + + // Sets the cursor icon + virtual void SetCursorIcon( InputCursorHandle_t hCursor ) = 0; + + virtual void SetGammaRamp( const uint16 *pRed, const uint16 *pGreen, const uint16 *pBlue ) = 0; }; extern ILauncherMgr *g_pLauncherMgr; diff --git a/public/materialsystem/imaterialsystemhardwareconfig.h b/public/materialsystem/imaterialsystemhardwareconfig.h index 992edd30..2898e3b7 100644 --- a/public/materialsystem/imaterialsystemhardwareconfig.h +++ b/public/materialsystem/imaterialsystemhardwareconfig.h @@ -218,6 +218,19 @@ public: virtual CSMQualityMode_t GetCSMQuality() const = 0; virtual bool SupportsBilinearPCFSampling() const = 0; virtual CSMShaderMode_t GetCSMShaderMode( CSMQualityMode_t nQualityLevel ) const = 0; + + virtual bool GetCSMAccurateBlending() const = 0; + virtual void SetCSMAccurateBlending( bool bEnable ) = 0; + + virtual bool SupportsResolveDepth() const = 0; + virtual bool HasFullResolutionDepthTexture() const = 0; + virtual const char *GetHWSpecificShaderDLLName() const = 0; + virtual bool HasStencilBuffer() const = 0; + + virtual int NumBooleanVertexShaderConstants() const = 0; + virtual int NumIntegerVertexShaderConstants() const = 0; + virtual int NumBooleanPixelShaderConstants() const = 0; + virtual int NumIntegerPixelShaderConstants() const = 0; }; #endif // IMATERIALSYSTEMHARDWARECONFIG_H diff --git a/public/tier1/utlmemory.h b/public/tier1/utlmemory.h index 601e722d..934f2ee0 100644 --- a/public/tier1/utlmemory.h +++ b/public/tier1/utlmemory.h @@ -17,6 +17,7 @@ #include "tier0/dbg.h" #include #include "tier0/platform.h" +#include "mathlib/mathlib.h" #include "tier0/memalloc.h" #include "tier0/memdbgon.h"