Ejemplo n.º 1
0
        public virtual void CreateVerticesForSquare(ref DataForDraw Data)
        {
            //  Create the vertex array object.
            vertexBufferArray.Bind(gl);

            //  Create a vertex buffer for the vertex data.
            vertexDataBuffer.Bind(gl);
            vertexDataBuffer.SetData(gl, 0, Data.vertices_arrayed, false, 3);

            //  Now do the same for the colour data.
            colourDataBuffer.Bind(gl);
            colourDataBuffer.SetData(gl, 1, Data.colours_arrayed, false, 3);

            //  Unbind the vertex array, we've finished specifying data for it.
            vertexBufferArray.Unbind(gl);
            vertexDataBuffer.Unbind(gl);
            colourDataBuffer.Unbind(gl);
        }
Ejemplo n.º 2
0
 public override void CreateVerticesForSquare(ref DataForDraw Data)
 {
     Console.WriteLine("FATAL ERROR! DO NOT USE IT! USE CreateVerticesForSquare_angled!");
     Console.ReadKey();
 }