Exemple #1
0
        public RenderDataTextured(BufferData4Textured bufferData, string textureName, string shaderName)
        {
            Vertices    = bufferData.Vertices;
            Indices     = bufferData.Indices;
            TextureName = textureName;
            ShaderName  = shaderName;

            VertexArrayObjectId  = GL.GenVertexArray();
            VertexBufferObjectId = GL.GenBuffer();
            IndexBufferObjectId  = GL.GenBuffer();

            Bind();
        }
        public static void Initialise()
        {
            // Get the geometry for a square.
            var bufferData = BufferData4Textured.Rectangle();

            Vertices = bufferData.Vertices;
            Indices  = bufferData.Indices;

            VertexArrayObjectId  = GL.GenVertexArray();
            VertexBufferObjectId = GL.GenBuffer();
            IndexBufferObjectId  = GL.GenBuffer();

            Bind();
        }