Пример #1
0
		internal void LoadTextureToAtlas( TextureAtlas atlas )
		{
			if( MainTexture != null && !loaded_texture )
			{
				atlas.AddTexture( MainTexture, out TextureCoords, out TextureUVs );
				loaded_texture = true;
            }
		}
Пример #2
0
		internal void LoadTexturesToAtlas( TextureAtlas atlas, ref int percent, ref int step, ref int steps )
		{
			steps += VoxelTable.Length;
			foreach( VoxelType vt in VoxelTable )
			{
				vt.LoadTextureToAtlas( atlas );
				percent = ( ++step * 100 ) / steps;
			}
		}
Пример #3
0
		public VoxelWorld( bool nogui, VoxelGameEnvironment GameEnv )
		{
			uint i;
			this.nogui = nogui;
			this.GameEnv = GameEnv;
			Display.OnInvalidate += Display_OnInvalidate;
			SectorEjectList = new SectorRingList( 256 * 256 * 32/*65536*/);
			if( !nogui )
				TextureAtlas = new TextureAtlas( 32, 64 );

			SectorTable = new VoxelSector[TableSize];

			for( i = 0; i < TableSize; i++ ) SectorTable[i] = null;

			SectorList = null;
			UniverseNum = 1;
			VoxelTypeManager = null;
		}