Trying to add that does not seem to help. I might be doing it wrong though. Here is a full snippet which should be copy&pasteable into any Horde3D setup (but don't work):
Code:
void StateGame::createSimpleGeometryRes() {
// Cache the resources
H3DRes matRes = h3dAddResource(H3DResTypes::Material, "models/stone/stone.material.xml", 0);
h3dutLoadResourcesFromDisk( _params->ContentDirectory.c_str() );
// Create the needed data for a simple quad that is textured on both sides
float posData[] = {
0, 0, 0,
100, 0, 0,
0, 100, 0,
100, 100, 0
};
unsigned int vertexCount = 4;
unsigned int indexData[] = { 0,1,2, 2,1,3, 3,1,2, 2,1,0 };
unsigned int triangleIndexCount = 12;
unsigned int triangleIndexMax = 3;
short normalData[] = {
0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1
};
short tangentData[] = {
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0
};
short bitangentData[] = {
1, 0, 0,
1, 0, 0,
1, 0, 0,
1, 0, 0
};
float uvData[] = {
0, 0,
1, 0,
0, 1,
1, 1
};
H3DRes geoRes = h3dutCreateGeometryRes("geoRes", vertexCount, triangleIndexCount, posData, indexData, normalData, tangentData, bitangentData, uvData, 0);
H3DNode model = h3dAddModelNode( H3DRootNode, "DynGeoModelNode", geoRes );
h3dAddMeshNode( model, "DynGeoMesh", matRes, 0, triangleIndexCount, 0, triangleIndexMax );
//h3dSetNodeTransform( model, 0,0,0, 0,40,0, 1,1,1 );
}