mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-03 23:21:15 +00:00 
			
		
		
		
	Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
This commit is contained in:
		
							parent
							
								
									c19488bd89
								
							
						
					
					
						commit
						33b5c57199
					
				
					 201 changed files with 2501 additions and 1782 deletions
				
			
		| 
						 | 
				
			
			@ -146,7 +146,7 @@ static const _bit _type_list[] = {
 | 
			
		|||
	//types
 | 
			
		||||
	{ Variant::BOOL, "bool" },
 | 
			
		||||
	{ Variant::INT, "int" },
 | 
			
		||||
	{ Variant::REAL, "float" },
 | 
			
		||||
	{ Variant::FLOAT, "float" },
 | 
			
		||||
	{ Variant::STRING, "String" },
 | 
			
		||||
	{ Variant::VECTOR2, "Vector2" },
 | 
			
		||||
	{ Variant::VECTOR2I, "Vector2i" },
 | 
			
		||||
| 
						 | 
				
			
			@ -170,8 +170,10 @@ static const _bit _type_list[] = {
 | 
			
		|||
	{ Variant::SIGNAL, "Signal" },
 | 
			
		||||
	{ Variant::ARRAY, "Array" },
 | 
			
		||||
	{ Variant::PACKED_BYTE_ARRAY, "PackedByteArray" },
 | 
			
		||||
	{ Variant::PACKED_INT_ARRAY, "PackedIntArray" },
 | 
			
		||||
	{ Variant::PACKED_REAL_ARRAY, "PackedRealArray" },
 | 
			
		||||
	{ Variant::PACKED_INT32_ARRAY, "PackedInt32Array" },
 | 
			
		||||
	{ Variant::PACKED_INT64_ARRAY, "PackedInt64Array" },
 | 
			
		||||
	{ Variant::PACKED_FLOAT32_ARRAY, "PackedFloat32Array" },
 | 
			
		||||
	{ Variant::PACKED_FLOAT64_ARRAY, "PackedFloat64Array" },
 | 
			
		||||
	{ Variant::PACKED_STRING_ARRAY, "PackedStringArray" },
 | 
			
		||||
	{ Variant::PACKED_VECTOR2_ARRAY, "PackedVector2Array" },
 | 
			
		||||
	{ Variant::PACKED_VECTOR3_ARRAY, "PackedVector3Array" },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue