Log in or register to post comments

Render .h file

October 10, 2013 - 10:10pm #1

I created .h file. I inserted in xcode. But i didn't see some lines of code for replace Teapot. I read forums, but i didn't get correct solution.

My .h file:

 

/*

created with obj2opengl.pl

source file    : .\Sample.obj

vertices       : 8428

faces          : 14040

normals        : 0

texture coords : 0

// include generated arrays

#import ".\Sample.h"

// set input data to arrays

glVertexPointer(3, GL_FLOAT, 0, SampleVerts);

// draw data

glDrawArrays(GL_TRIANGLES, 0, SampleNumVerts);

*/

unsigned int SampleNumVerts = 42120;

float SampleVerts [] = {

  // f 2 1 3 4

  -0.233114614641671, 0.446055325439014, 0.223483335097295,

  0.266885385358329, 0.446055325439014, 0.223483335097295,

  0.266885385358329, 0.446055325439014, -0.276516664902705,

  // f 2 1 3 4

  -0.233114614641671, 0.446055325439014, 0.223483335097295,

  -0.233114614641671, 0.446055325439014, -0.276516664902705,

  0.266885385358329, 0.446055325439014, -0.276516664902705,

  // f 6 5 7 8

 

...........

 

}

 

How to replace this code in EAGLView.mm file:

- (void) setup3dObjects

{

 

}

 

- (void)renderFrameQCAR

{

 

}

 

Log in or register to post comments