Is it possible to transfer mesh to VRAM without rendering it?

Is it possible to transfer mesh to VRAM without rendering it? I want to generate some meshes procedurally, but I don’t want to display them until they come into view. Is this possible?

You could use DirectX 11 buffers which Unity 4 gladly supports.
Something like this pseudocode:

    public Material MyMaterial;
    protected ComputeBuffer sourceBuffer;

    protected void Start() {
        sourceBuffer = new ComputeBuffer(<number of verteces>, <vertex size in bytes>, ComputeBufferType.Append);
        sourceBuffer.SetData(<array with mesh data>);
    }

    protected void OnRenderObject() {
        MyMaterial.SetPass(0);
        MyMaterial.SetBuffer("pointBuffer", sourceBuffer);
        MyMaterial.SetMatrix("MVP", Camera.main.projectionMatrix*Camera.main.worldToCameraMatrix*transform.localToWorldMatrix);
        Graphics.DrawProcedural(MeshTopology.Points, ParticlesCount);
    }

    protected void OnDisable() {
        sourceBuffer.release();
    }

With shader which looks like this:

	#pragma target 5.0

	struct Vertex
	{
		float4 position;
		float4 normal;
	};

	float4x4 MVP;
	StructuredBuffer<Vertex> pointBuffer;

	vs_out vert (uint id : SV_VertexID)
	{
		vs_out o;
		float4 p = pointBuffer[id].position;
		...
		return o;
	}

Refer to Unity 4 manual on buffers.

just a quick question with this:

i am using unity 4, and have a shadermodel 5 card.

but when i try the above idea, i get an error at vs_out vert (uint id : SV_VertexID)

it says that sv_vertexID is basically not recognized.

any idea how to get access to the vertexID?

is it only available in shadermodel 5?