Hi,
I'm a student, mostly doing compilers theory and parsing techniques, not game programming at all. I'm doing 3D programming for few weeks only, I got the basis of OpenGL from
this tutorial, so this is the first engine I use.
I read the entire manual (
http://www.horde3d.org/docs/manual.html), it seems very incomplete for me. Now I really don't see how to learn more, did I missed a link with a more complete documentation ? The best I can do is to use grep on the engine code (which is well commented by the way, but it's not very easy to learn in the middle of ~30k lines).
This leads to my first, very beginner, question. I followed
this how-to to generate a simple plane. But I don't understand why it's not lightened correctly, as the sphere is (from the Knight sample).
Here is the code that generate the plane:
Code:
vec3f pos_data[] = {
vec3f(0, 0, 0),
vec3f(1, 0, 0),
vec3f(0, 0, -1),
vec3f(1, 0, -1)
};
uint index_data[] = {
0, 1, 2,
2, 1, 3
};
short normalData[] = {
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0
};
float uvData[] = {
0, 0,
1, 0,
0, 1,
1, 1
};
H3DRes geometry = h3dutCreateGeometryRes("geoRes", 4, 6, (float*)pos_data, index_data, normalData, 0, 0, uvData, 0);
H3DNode chunk = h3dAddModelNode(parent, "DynGeoModelNode", geometry);
H3DRes material = h3dAddResource(H3DResTypes::Material, "models/sphere/stones.material.xml", 0);
h3dAddMeshNode(chunk, "DynGeoMesh", material, 0, 6, 0, 3);
h3dutLoadResourcesFromDisk(".");
Bonus question: are the data copied by the engine ?
And here is what the program produces:
Attachment:
Screen Shot 2011-12-21 at 12.30.51 PM.png [ 32.73 KiB | Viewed 9091 times ]
Thanks in advance