Log in or register to post comments

Use Custom OpenGL model instead of Teapot

November 16, 2011 - 3:17am #1

Hi,

I have a Model Object (.obj). I have generated the .h file for the model using the script at
http://heikobehrens.net/2009/08/27/obj2opengl/

Please help me with the steps I should follow to use this model instead of the teapot in the Sample Project.
I’m doing it for a iOS device.

Best regards,
Harsh

Re: Use Custom OpenGL model instead of Teapot

December 2, 2011 - 5:48am #7

Iossif, I post full code here http://ar.qualcomm.at/node/2001146

I too was having problems and work it out in this thread. The code is for iOS but it's 99% the same.

Re: Use Custom OpenGL model instead of Teapot

December 2, 2011 - 4:58am #6

can you post your whole code? i am stuck with object loading and correct textures at the moment as well :(

Re: Use Custom OpenGL model instead of Teapot

November 28, 2011 - 9:48pm #5

Harsh,

How did you create your texture file for your obj file?

I've created a scene in blender, and I export as an obj file to run through the script you mentioned, but it doesn't generate a texture file.

Thanks!

-Heath

Re: Use Custom OpenGL model instead of Teapot

November 22, 2011 - 5:45am #4

harshmathur, could you post the model and EAGLView.mm please?
I'm having some issues and I'm not sure if it's my model or my code.

Thanks.

Re: Use Custom OpenGL model instead of Teapot

November 17, 2011 - 5:46am #3

// Constants:
static const float kObjectScale = ..;

Here you have to take a larger value.

Re: Use Custom OpenGL model instead of Teapot

November 16, 2011 - 9:38am #2

Found it, my texture file was not right. Also, I should be using glDrawArrays instead.
Now, I can see the model. The problem is, it is very small.

How do I scale it up?

Best regards,
Harsh

Log in or register to post comments