Here is a function that creates a plane using memblocks, credits to Techlord, code mostly from the open source project:
void makeBillboardObject(int ID, Imposter *imp){
//Construct dbObejct from Mesh
int offset=12;
int totalvertices = 6; // trianglecount * 3 vertices
int memblocksize = offset + (totalvertices *36); // 12 byte header + (totalvertices * 36 bytes each)
int memblockID = 1;
dbMakeMemblock(memblockID, memblocksize);
dbWriteMemblockDWORD(memblockID,0,338); //default FVF Format = 338
dbWriteMemblockDWORD(memblockID,4,36); //default FVF Format Size = 36
dbWriteMemblockDWORD(memblockID,8, totalvertices); //totalvertices
float uv[12] = {0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1};
int uvCount = 0;
//write to object data to memblock
for(int loop = 0;loop < 6; loop++){
//vertices
dbWriteMemblockFloat(memblockID, offset, imp->verts[loop].pos.x);
offset += sizeof(float);
dbWriteMemblockFloat(memblockID, offset, imp->verts[loop].pos.y);
offset += sizeof(float);
dbWriteMemblockFloat(memblockID, offset, imp->verts[loop].pos.z);
offset += sizeof(float);
//normals
dbWriteMemblockFloat(memblockID, offset, 0.0);
offset += sizeof(float);
dbWriteMemblockFloat(memblockID, offset, 1.0);
offset += sizeof(float);
dbWriteMemblockFloat(memblockID, offset, 0.0);
offset += sizeof(float);
//color
dbWriteMemblockDWORD(memblockID, offset, dbRGB(255, 255, 255));
offset += sizeof(DWORD);
//uv
dbWriteMemblockFloat(memblockID, offset, uv[uvCount]);
offset += sizeof(float);
uvCount++;
dbWriteMemblockFloat(memblockID, offset, uv[uvCount]);
offset += sizeof(float);
uvCount++;
}
dbMakeMeshFromMemblock(1, memblockID);
dbDeleteMemblock(memblockID);
dbMakeObject(ID, 1, 0);
dbDeleteMesh(1);
}
The only thing you need to do is pass in the vertex positions, I have mine stored in the 'Imposter' structure.
Hope this helps to get you started.