🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

3D Exploration

Started by
33 comments, last by Kelvin Big 24 years, 1 month ago
I''ve made a model with 3DSMAX and would like to view it in VC++ 6.0 therfore i''ve created a .cpp file only how does this work?
DKC
Advertisement
While you''re at it.. Export a example application as well.
This will give you an example of how the code is to be loaded.. It just uses a simple loop. When I do this, I rename the cpp file to a header file, and include it to my main source file.. Then I simply use the loop to draw the objects from the face, vertice, and normal information.
I''m gonna try it at once!

KB
DKC
Damn that did not worked well, some compiler errors!
Do you have a website with an example on how to do it?

KB _ nynex@casema.net _

quote: Original post by Pentode

While you''re at it.. Export a example application as well.
This will give you an example of how the code is to be loaded.. It just uses a simple loop. When I do this, I rename the cpp file to a header file, and include it to my main source file.. Then I simply use the loop to draw the objects from the face, vertice, and normal information.


DKC
I don''t know of any off hand.. You should atleast try and work with the errors, and see if you can resolve them.

Here, try this.. It *should* work for you.

rename the cpp file to a header file..
include the file to your main cpp file.

then in your DrawGLScene() or whichever function name
you use function, make sure you have glClear, glLoadIdentity, and such.. Then add

int mcount=0;
int mindex=0;

glBegin(GL_TRIANGLES);

for(int i=0; i < sizeof(face_indicies)/sizeof(face_indicies[0]);i++)
{
mcount--;
for (int j = 0; j < 3; j++)
{
int vi=face_indicies[j];
int ni=face_indicies[j+3];<br> int ti=face_indicies[j+6];<br> glNormal3f(normals[ni][0],normals[ni][1],normals[ni][2]);<br> glVertex3f(verticies[vi][0],verticies[vi][1],verticies[vi][2]);<br> }<br> } <br> glEnd();<br><br><br><br> </i>
It works thanks!

BK
DKC
Cool, np. Happy coding.
Hi Pentode

I noticed your message and others on this board regarding 3dExploration, and I would apprecite any help you or any of the others in the thread may provide.

I have been savig as SampleApp and then putting the c++ file in a VC6 workspace. It runs fine showing the object which I imported to 3dExploration as a Textured *.cob cube.

The preview in 3dExploration is fine with texture and all, but the texture is not reproduced in the c++ app.

With the original 3dExploration I would get a Illegal Operation error on running my App, but odly enough, if I removed the *bmp files produced by 3dExploration, the error dissapered and my App ran but ofcourse no texture.

I posted xdsoft, and they had be download a another version which elliminates the error but still no texturing.

Any help will be greatly appreciated.

Thanks Karl

karl@hsnp.com



KarlFisher
KarlFisher
Karl, you might want to make sure that the texture you selected for your model is in the same path as the model file when you load it in 3D Exploration.. Second, after you export the code 3D Exploration will give the texture it''s own name, and create it in the same directory as the model file, make sure that you move that texture into the path of the executible of the generated source code.
That is what I did in the first place and works just fine!
Thanks for the help on the coding part it was the last push I needed to get things going

KB
DKC

This topic is closed to new replies.

Advertisement