Log in or register to post comments

Code not reading object vertices

June 12, 2012 - 10:46am #1

Hello,
In addition to my previous post I am also trying to replace the teapot with a plane polygon texture. So I followed a previous post " Replacing Teapot with custom image" But I kept seeing the teapot shape with the new texture partially attached -eventhough I removed all vertices of the teapot from the code. I wasn't expecting a teapot shape at all.
So to remove all chances of missing out on some code updates I made only the core changes. I only replaced the vertices, normals, texcoordinates ... as below and the actual texture. (because i know names dont matter as they are to make the code readable and for convinience)
I cleaned and rebuild. Surprisingly the teapot shape was still there. I am left clueless
Why do I still have the teapot shape when the program can't read teapot vertices anymore?
What other essential update is there? and How can I finally see only the shape defined by the vertices in the vertices float array?
I will appreciate any help
Many thanks

/*==============================================================================
            Copyright (c) 2012 QUALCOMM Austria Research Center GmbH.
            All Rights Reserved.
            Qualcomm Confidential and Proprietary
            
@file 
    Teapot.h

@brief
    Geometry for the teapot used in the samples.

==============================================================================*/

#ifndef _QCAR_TEAPOT_OBJECT_H_
#define _QCAR_TEAPOT_OBJECT_H_


#define NUM_TEAPOT_OBJECT_VERTEX 4
#define NUM_TEAPOT_OBJECT_INDEX 2 * 3


static const float teapotVertices[NUM_TEAPOT_OBJECT_VERTEX * 3] =
{
 0,        0,       0,          0,         1,        0 ,     1,        0,     0,     1,      1,       0
};

static const float teapotTexCoords[NUM_TEAPOT_OBJECT_VERTEX * 2] =
{
	1, 1, 0, 1, 0, 0, 1, 0 
};

static const float teapotNormals[NUM_TEAPOT_OBJECT_VERTEX * 3] =
{
	 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0
};

static const unsigned short teapotIndices[NUM_TEAPOT_OBJECT_INDEX] =
{
	0, 1, 3, 1, 2, 3
};


#endif // _QCAR_TEAPOT_OBJECT_H_


Re: Code not reading object vertices

June 13, 2012 - 10:42am #3

I now have , m thanks

Re: Code not reading object vertices

June 13, 2012 - 7:55am #2

You must do an "ndk-build" before you build the app everytime you change native code.

Have you tried that?

Log in or register to post comments