<commit_before>using Microsoft.Xna.Framework.Graphics;

namespace CocosSharp
{
    #region Structs

    internal struct CCV3F_T2F : IVertexType
    {
        internal static readonly VertexDeclaration VertexDeclaration;

        internal CCVertex3F Vertices; // 12 bytes
        internal CCTex2F TexCoords; // 8 byts

        VertexDeclaration IVertexType.VertexDeclaration
        {
            get { return VertexDeclaration; }
        }

        static CCV3F_T2F()
        {
            var elements = new[]
            {
                new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0),
                new VertexElement(12, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0)
            };
            VertexDeclaration = new VertexDeclaration(elements);
        }
    }

    #endregion Structs


    // CCGrid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
    public class CCGrid3D : CCGridBase
    {
        bool dirty;

        CCIndexBuffer<ushort> indexBuffer;
        CCVertexBuffer<CCV3F_T2F> vertexBuffer;


        #region Properties<commit_msg>Add [StructLayout(LayoutKind.Sequential, Pack=1)] to CCV3F_T2F so that DrawIndexPrimitves works correctly.  This is causing drawing problems with Unified arm64 architecture.<commit_after>using Microsoft.Xna.Framework.Graphics;
using System.Runtime.InteropServices;

namespace CocosSharp
{
    #region Structs

#if IOS
    [StructLayout(LayoutKind.Sequential, Pack=1)]
#endif
    internal struct CCV3F_T2F : IVertexType
    {

        internal CCVertex3F Vertices; // 12 bytes
        internal CCTex2F TexCoords; // 8 byts

        internal static readonly VertexDeclaration VertexDeclaration;

        VertexDeclaration IVertexType.VertexDeclaration
        {
            get { return VertexDeclaration; }
        }

        static CCV3F_T2F()
        {
            var elements = new[]
            {
                new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0),
                new VertexElement(12, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0)
            };
            VertexDeclaration = new VertexDeclaration(elements);
        }
    }

    #endregion Structs


    // CCGrid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
    public class CCGrid3D : CCGridBase
    {
        bool dirty;

        CCIndexBuffer<ushort> indexBuffer;
        CCVertexBuffer<CCV3F_T2F> vertexBuffer;


        #region Properties
{'fraction_non_alphanumeric': 0.06447784810126582, 'fraction_numerical': 0.01977848101265823, 'mean_word_length': 2.4643835616438357, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4404917', 'n_tokens_mistral': 738, 'n_tokens_neox': 696, 'n_words': 172}