Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Kelvin Big

3D Exploration

This topic is 6916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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[i][j+3];
int ti=face_indicies[i][j+6];
glNormal3f(normals[ni][0],normals[ni][1],normals[ni][2]);
glVertex3f(verticies[vi][0],verticies[vi][1],verticies[vi][2]);
}
}
glEnd();



Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!