public void SetTexture(int ID, string texture, int oSpot) { TEngine.LoadTextureIntoArray(texture, ID, TWidth); GraphicsUtil.CheckError("TextureBlock - SetTexture - TENG"); if (oSpot > 0) { GL.BindTexture(TextureTarget.Texture2DArray, HelpTextureID); int id_z = oSpot / (TWidth * TWidth); int id_xy = oSpot % (TWidth * TWidth); int ix = id_xy % TWidth; int iy = id_xy / TWidth; float[] t = new float[4] { (1.0f / 8.0f), 0.0f, 0.0f, 1.0f }; GL.TexSubImage3D(TextureTarget.Texture2DArray, 0, ix, iy, id_z, 1, 1, 1, OpenTK.Graphics.OpenGL4.PixelFormat.Rgba, PixelType.Float, t); GraphicsUtil.CheckError("TextureBlock - SetTexture - OSp"); } }
public void SetTexture(int ID, string texture) { TEngine.LoadTextureIntoArray(texture, ID, TWidth); }