public F3DEXParser()
        {
            DrawingMode = DrawingModeType.Texture;

            sv_ClearStructures(false);
            gl_ClearRenderer(true);

            InitInvalidModels();
        }
        //F3DEXParser.GameObject gameObject)
        public int[] ReadGameObject(DMAFile dma, byte[] bytes, uint fullOffset)
        {
            //byte bankNo = (byte)((gameObject.DListOffset & 0xFF000000) >> 24);
            uint offset = fullOffset & 0x00FFFFFF;

            _currentDMA = dma;

            //Is 0 a valid location?
            if (offset == 0)// || !MemoryManager.Instance.HasBank(bankNo) || !MemoryManager.Instance.LocateBank(bankNo, offset).IsValid())
            {
                return InvalidBox;
            }
            else
            {
                int listBase = GL.GenLists(3);
                //GL.ListBase(listBase);

                //Normal
                GL.NewList(listBase, ListMode.Compile);

                GL.PushMatrix();

                DrawingMode = F3DEXParser.DrawingModeType.Texture;

                ReadF3DEX(bytes, offset);

                GL.PopMatrix();

                GL.EndList();

                //Selected
                GL.NewList(listBase + 1, ListMode.Compile);

                GL.PushMatrix();

                DrawingMode = F3DEXParser.DrawingModeType.TextureSelected;

                ReadF3DEX(bytes, offset);

                GL.PopMatrix();

                GL.EndList();

                //Wireframe
                GL.NewList(listBase + 2, ListMode.Compile);

                GL.PushMatrix();

                DrawingMode = F3DEXParser.DrawingModeType.Wireframe;

                ReadF3DEX(bytes, offset);

                GL.PopMatrix();

                GL.EndList();

                return new int[3] { listBase, listBase + 1, listBase + 2 };
            }
        }
        public void InitInvalidModels()
        {
            if (InvalidBoxesInitialized)
                return;

            int listBase = GL.GenLists(3);

            //Normal
            GL.NewList(listBase, ListMode.Compile);

            GL.PushMatrix();

            DrawingMode = F3DEXParser.DrawingModeType.Texture;

            DrawInvalidModel();

            GL.PopMatrix();

            GL.EndList();

            //Selected
            GL.NewList(listBase + 1, ListMode.Compile);

            GL.PushMatrix();

            DrawingMode = F3DEXParser.DrawingModeType.TextureSelected;

            DrawInvalidModel();

            GL.PopMatrix();

            GL.EndList();

            //Wireframe
            GL.NewList(listBase + 2, ListMode.Compile);

            GL.PushMatrix();

            DrawingMode = F3DEXParser.DrawingModeType.Wireframe;

            DrawInvalidModel();

            GL.PopMatrix();

            GL.EndList();

            DrawingMode = F3DEXParser.DrawingModeType.Texture;

            InvalidBox = new int[3] { listBase, listBase + 1, listBase + 2 };

            InvalidBoxesInitialized = true;
        }