コード例 #1
0
        } //Misses the bottom section

        private void DrawBottomBox(Matrix4 BoxPosition)
        {
            GL.UniformMatrix4(uModelLocation, true, ref BoxPosition);
            GL.DrawElements(DrawMode, mCubeModel.Indices.Length - 12, DrawElementsType.UnsignedInt, 0); //Side sections

            Material.silver.Assign_Material();

            Bottom_Portal.Make_Active_Texture();
            GL.DrawElements(DrawMode, 6, DrawElementsType.UnsignedInt, 30 * sizeof(float)); //Bottom
        } //Missed the top section
コード例 #2
0
        } //Doesn't draw top and bottom sections

        private void DrawTopBox(Matrix4 BoxPosition)
        {
            GL.UniformMatrix4(uModelLocation, true, ref BoxPosition);
            GL.DrawElements(DrawMode, 12, DrawElementsType.UnsignedInt, 0); //Front and Back

            Material.silver.Assign_Material();
            Top_Portal.Make_Active_Texture();
            GL.DrawElements(DrawMode, 6, DrawElementsType.UnsignedInt, 12 * sizeof(float)); //RightSide

            BrickWall.MakeActive();
            GL.DrawElements(DrawMode, mCubeModel.Indices.Length - 24, DrawElementsType.UnsignedInt, 18 * sizeof(float)); //Rest
        } //Misses the bottom section