   Problem drawing using DX10 Mesh
  Recently i had a working program that used position, color, texture and passed it to a D3DX10 Mesh and it drew everything fine.  The only change was instead of manually using an algorithim to create a terrain i created a loader for OBJ files and the information is all passing into the arrays fine but no object appears.The problem i ran into was i didn't have a textured object and when i called upon D3DCreateEffectFromFile it return a false value because of the texture coordinates not passing through the shader.  So i decided to remove using the texture and just pass position and color through the shader.  It solved the problem of return a false value, but it's still not drawing.  Is it required to have a texture to properly use the MeshObject in D3DX10?  If not then any pointers as to where to look for the problem between the array's being filled and then drawing using the mesh information?Here is the creation function:bool CreateTerrain(){// load the effect used by the terrainterrainEffect = InitAndLoadEffect(pD3DDevice);if (terrainEffect == NULL){return false;}if (!InitTerrainTextures()){return false;}// Bind the projection matrix to the Projection variable in the shaderpProjectionMatrixVariable = terrainEffect->GetVariableByName("Projection")->AsMatrix();// get the technique used by the terrainterrainTechnique = terrainEffect->GetTechniqueByName("Render");if (terrainTechnique == NULL){return false;}// The vertex input layout    D3D10_INPUT_ELEMENT_DESC layout[] =    {   { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12, D3D10_INPUT_PER_VERTEX_DATA, 0 },};// Calculate the number of elements in the layout array    UINT numElements = (sizeof(layout) / sizeof(layout[0]));    // Create the vertex input layout    D3D10_PASS_DESC PassDesc;    terrainTechnique->GetPassByIndex(0)->GetDesc(&PassDesc);    HRESULT hr = pD3DDevice->CreateInputLayout(layout, numElements, PassDesc.pIAInputSignature, PassDesc.IAInputSignatureSize, &pVertexLayout);    if(FAILED(hr)){  return false;}// create the vertices array large enough to hold all those neededVertexPosNormalTexStruct vertices[482];// Create the indices arrayDWORD indices[2880];// Fill the vertices array with the terrain valuesimportModelData(vertices, indices);//roll back all face values 1 to account for 0 byte in vertices arrayfor (int y = 0; y < 2880; ++y){indices[y] = indices[y] - 1;}// Calculate the number of vertices in the arrayUINT numVertices = sizeof(vertices) / sizeof(VertexPosNormalTexStruct);// determine the number of indicesUINT numIndices = sizeof(indices) / sizeof(DWORD);// create the mesh objectD3DX10CreateMesh(pD3DDevice, layout, numElements, "POSITION", numVertices, (numIndices/3), D3DX10_MESH_32_BIT, &mesh);// set the vertex buffer datamesh->SetVertexData(0, vertices);// set the index buffer datamesh->SetIndexData(indices, numIndices);// save the changes to the mesh objectmesh->CommitToDevice();return true;}And the Draw function:void DrawTerrain(){// Set the input layout    pD3DDevice->IASetInputLayout(pVertexLayout);// Set the texture resource viewpBaseTextureVariable->SetResource(pTerrainTextureRV);D3DXMATRIX finalMatrix = (WorldMatrix * ViewMatrix * ProjectionMatrix);    pProjectionMatrixVariable->SetMatrix((float*)&finalMatrix);// Render a model object    D3D10_TECHNIQUE_DESC techniqueDescription;    terrainTechnique->GetDesc(&techniqueDescription);// Loop through the technique passes    for(UINT p=0; p < techniqueDescription.Passes; ++p)    {terrainTechnique->GetPassByIndex(p)->Apply(0);mesh->DrawSubset(0);    }}
  *sigh* Ignore all of this, it's actually working just fine lol i just wasn't moving my camera around enough for it to show up.  <----Feels like an idiot! =p   