diff options
| author | navewindre <boneyaard@gmail.com> | 2018-11-13 00:42:56 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-11-13 00:42:56 +0100 |
| commit | 5e5b152f4b62432655cc4069c1d95be636749b7d (patch) | |
| tree | 3fc1433561fb6c90a04f3a671afca4df91a653a4 /internal_rewrite/IMaterialSystem.hpp | |
| parent | d106396b02c486c9135c505ed82b73431f2c27de (diff) | |
yo sick
Diffstat (limited to 'internal_rewrite/IMaterialSystem.hpp')
| -rw-r--r-- | internal_rewrite/IMaterialSystem.hpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/internal_rewrite/IMaterialSystem.hpp b/internal_rewrite/IMaterialSystem.hpp index c27bf24..7fc1bc1 100644 --- a/internal_rewrite/IMaterialSystem.hpp +++ b/internal_rewrite/IMaterialSystem.hpp @@ -100,6 +100,65 @@ struct IMaterialSystem_Config_t { char pad[ 0xC ];
};
+class IMaterialVar {
+public:
+ virtual ITexture *GetTextureValue( void ) = 0;
+
+ virtual char const * GetName( void ) const = 0;
+ virtual void* GetNameAsSymbol( ) const = 0;
+
+ virtual void SetFloatValue( float val ) = 0;
+
+ virtual void SetIntValue( int val ) = 0;
+
+ virtual void SetStringValue( char const *val ) = 0;
+ virtual char const * GetStringValue( void ) const = 0;
+
+ // Use FourCC values to pass app-defined data structures between
+ // the proxy and the shader. The shader should ignore the data if
+ // its FourCC type not correct.
+ virtual void SetFourCCValue( ) = 0;
+ virtual void GetFourCCValue( ) = 0;
+
+ // Vec (dim 2-4)
+ virtual void SetVecValue( float const* val, int numcomps ) = 0;
+ virtual void SetVecValue( float x, float y ) = 0;
+ virtual void SetVecValue( float x, float y, float z ) = 0;
+ virtual void SetVecValue( float x, float y, float z, float w ) = 0;
+ virtual void GetLinearVecValue( float *val, int numcomps ) const = 0;
+
+ // revisit: is this a good interface for textures?
+ virtual void SetTextureValue( ITexture * ) = 0;
+
+ virtual IMaterial * GetMaterialValue( void ) = 0;
+ virtual void SetMaterialValue( IMaterial * ) = 0;
+
+ virtual bool IsDefined( ) const = 0;
+ virtual void SetUndefined( ) = 0;
+
+ // Matrix
+ virtual void SetMatrixValue( ) = 0;
+ virtual const void GetMatrixValue( ) = 0;
+ virtual bool MatrixIsIdentity( ) const = 0;
+
+ // Copy....
+ virtual void CopyFrom( IMaterialVar *pMaterialVar ) = 0;
+
+ virtual void SetValueAutodetectType( char const *val ) = 0;
+
+ virtual IMaterial * GetOwningMaterial( ) = 0;
+
+ //set just 1 component
+ virtual void SetVecComponentValue( float fVal, int nComponent ) = 0;
+
+protected:
+ virtual int GetIntValueInternal( void ) const = 0;
+ virtual float GetFloatValueInternal( void ) const = 0;
+ virtual float const* GetVecValueInternal( ) const = 0;
+ virtual void GetVecValueInternal( float *val, int numcomps ) const = 0;
+ virtual int VectorSizeInternal( ) const = 0;
+};
+
class IMaterial {
char pad[ 0x1C ];
public:
|
