Esempio n. 1
0
        public void LoadTexture(LoadBitmapData loadBitmapData)
        {
            GL.BindTexture(TextureTarget.Texture2D, textureId);

            // setup texture parameters
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)All.NearestMipmapLinear);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Nearest);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat);

            loadBitmapData(textureId);

            GL.GenerateMipmap(TextureTarget.Texture2D);
        }
Esempio n. 2
0
		public void LoadTexture (LoadBitmapData loadBitmapData)
		{
			GL.BindTexture (TextureTarget.Texture2D, textureId);

			// setup texture parameters
			GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)All.NearestMipmapLinear);
			GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Nearest);
			GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat);
			GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat);

			loadBitmapData (textureId);

			GL.GenerateMipmap (TextureTarget.Texture2D);
		}