by gilad_no » Jun 28, 2007 @ 4:10pm
I've used the same code from the sample in Edge, to draw the cube.
Then, in order to render it, I use:
pDisplay->BindTexture(&m_BoardTexture);
pDisplay->SetShading(E3D_GOURAUD|E3D_TEXTURE);
pDisplay->Render(&m_Board);
But if I'm using your sample texture, I see it on every face, instead of mapping it as you suggested.
Additional question that I have (related to 3D): How do I write selection code? I want to draw a 3D board with some pieces on it, and allow the user to select a piece by clicking on it with the mouse. I saw a code in the sample (View3D) for the mouse selection, but from what I understood it is to determine the change in the mouse position - rather then selection the model.
BTW, I think you should really put up a section on the website where people can upload and share code samples for EdgeLib.
- Gilad