Hi,
I have changed a figure I had in .x to code in .cpp, with the help of “3D Exploration Plugin: CPP Export filter.” What is the best way to insert this code in my OpenGL App?
I don´t get what I wiil do with “sample_MATERIAL materials” & “face_indicies[8416][9]”.
my code:
/*
This file was produced by 3D Exploration plugin: CPP Export filter.
3D Exploration, Copyright (c) 1999-2000 X Dimension Software, WWW http://www.xdsoft.com/explorer/
eMail info@xdsoft.com
*/
#include <windows.h>
#include <GL\gl.h>
#include <GL\glu.h>
struct sample_MATERIAL{
GLfloat ambient[3];
GLfloat diffuse[3];
GLfloat specular[3];
GLfloat emission[3];
GLfloat alpha;
GLfloat phExp;
int texture;
};
static sample_MATERIAL materials [1] = {
{{0.0f,0.0f,0.0f},{0.956863f,0.576471f,0.576471f},{0.898039f,0.898039f,0.898039f},{0.0f,0.0f,0.0f},
0.25f,23.0f,-1} //Material #1
};
// 4593 Verticies
// 0 Texture Coordinates
// 4964 Normals
// 8416 Triangles
static short face_indicies[8416][9] = {
// Object #0
{333,335,334 ,0,1,2 ,0,0,0}, {336,337,333 ,3,4,0 ,0,0,0}, {338,340,339 ,5,6,7 ,0,0,0},
{341,340,342 ,8,6,9 ,0,0,0}, {343,344,342 ,10,11,9 ,0,0,0}, {345,344,346 ,12,11,13 ,0,0,0},
{346,348,347 ,13,14,15 ,0,0,0}, {349,350,348 ,16,17,14 ,0,0,0},
{351,352
…
…