Axiom.RenderSystems.OpenGL.GLTexture._createSurfaceList C# (CSharp) Метод

_createSurfaceList() приватный Метод

private _createSurfaceList ( ) : void
Результат void
		private void _createSurfaceList()
		{
			_surfaceList.Clear();

			// For all faces and mipmaps, store surfaces as HardwarePixelBufferSharedPtr
			bool wantGeneratedMips = ( Usage & TextureUsage.AutoMipMap ) != 0;

			// Do mipmapping in software? (uses GLU) For some cards, this is still needed. Of course,
			// only when mipmap generation is desired.
			bool doSoftware = wantGeneratedMips && !MipmapsHardwareGenerated && MipmapCount != 0;

			for ( int face = 0; face < this.faceCount; face++ )
			{
				for ( int mip = 0; mip <= MipmapCount; mip++ )
				{
					GLHardwarePixelBuffer buf = new GLTextureBuffer( Name, GLTextureType, _glTextureID, face, mip, (BufferUsage)Usage, doSoftware && mip == 0, _glSupport, HardwareGammaEnabled, FSAA );
					_surfaceList.Add( buf );

					/// Check for error
					if ( buf.Width == 0 || buf.Height == 0 || buf.Depth == 0 )
					{
						throw new Exception( String.Format( "Zero sized texture surface on texture {0} face {1} mipmap {2}. Probably, the GL driver refused to create the texture.", Name, face, mip ) );
					}
				}
			}
		}