public void UpdateDynamicTextures()
        {
            int i = -1;

            for (int j = 0; j < TextureList.Count; j++)
            {
                TextureFX texturefx = TextureList[j];
                texturefx.AnaglyphEnabled = Options.Anaglyph;
                texturefx.OnTick();
                ImageData.Clear();
                ImageData.Put(texturefx.ImageData);
                ImageData.Position = 0;
                ImageData.Limit(texturefx.ImageData.Length);

                if (texturefx.IconIndex != i)
                {
                    texturefx.BindImage(this);
                    i = texturefx.IconIndex;
                }

                for (int k = 0; k < texturefx.TileSize; k++)
                {
                    for (int l = 0; l < texturefx.TileSize; l++)
                    {
                        ////GL.TexSubImage2D(TextureTarget.Texture2D, 0, (texturefx.IconIndex % 16) * 16 + k * 16, (texturefx.IconIndex / 16) * 16 + l * 16, 16, 16, PixelFormat.Rgba, PixelType.UnsignedByte, ref ImageData);
                    }
                }
            }
        }
 public void RegisterTextureFX(TextureFX par1TextureFX)
 {
     TextureList.Add(par1TextureFX);
     par1TextureFX.OnTick();
 }