示例#1
0
        /// <summary>
        /// Binds a texture to darw with.
        /// </summary>
        /// <param name="textureId"></param>
        public static void BindTexture(int textureId)
        {
            if (lastBoundTexture != textureId)
            {
                lastActiveBatch?.Draw();

                GL.BindTexture(TextureTarget.Texture2D, textureId);
                lastBoundTexture = textureId;
            }
        }
示例#2
0
 internal static void FlushCurrentBatch()
 {
     lastActiveBatch?.Draw();
 }