mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Added shader state serialization
This commit is contained in:
		
							parent
							
								
									6f00976ab5
								
							
						
					
					
						commit
						45788b9c82
					
				
					 4 changed files with 76 additions and 14 deletions
				
			
		|  | @ -32,6 +32,7 @@ | |||
| 
 | ||||
| #include <cmath> | ||||
| #include <type_traits> | ||||
| #include <boost/serialization/access.hpp> | ||||
| 
 | ||||
| namespace Common { | ||||
| 
 | ||||
|  | @ -44,6 +45,14 @@ class Vec4; | |||
| 
 | ||||
| template <typename T> | ||||
| class Vec2 { | ||||
|     friend class boost::serialization::access; | ||||
|     template<class Archive> | ||||
|     void serialize(Archive & ar, const unsigned int file_version) | ||||
|     { | ||||
|         ar & x; | ||||
|         ar & y; | ||||
|     } | ||||
| 
 | ||||
| public: | ||||
|     T x; | ||||
|     T y; | ||||
|  | @ -191,6 +200,15 @@ inline float Vec2<float>::Normalize() { | |||
| 
 | ||||
| template <typename T> | ||||
| class Vec3 { | ||||
|     friend class boost::serialization::access; | ||||
|     template<class Archive> | ||||
|     void serialize(Archive & ar, const unsigned int file_version) | ||||
|     { | ||||
|         ar & x; | ||||
|         ar & y; | ||||
|         ar & z; | ||||
|     } | ||||
| 
 | ||||
| public: | ||||
|     T x; | ||||
|     T y; | ||||
|  | @ -399,6 +417,16 @@ using Vec3f = Vec3<float>; | |||
| 
 | ||||
| template <typename T> | ||||
| class Vec4 { | ||||
|     friend class boost::serialization::access; | ||||
|     template<class Archive> | ||||
|     void serialize(Archive & ar, const unsigned int file_version) | ||||
|     { | ||||
|         ar & x; | ||||
|         ar & y; | ||||
|         ar & z; | ||||
|         ar & w; | ||||
|     } | ||||
| 
 | ||||
| public: | ||||
|     T x; | ||||
|     T y; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue