Log in or register to post comments

not able to place another image over imagetarget

December 15, 2011 - 12:26am #1

I used HBehrens-obj2opengl -script and used the banana.h file to replace the teapot 3d object
i replaced the original code

// Draw object:
glBindTexture(GL_TEXTURE_2D, thisTexture->mTextureID);
glTexCoordPointer(2, GL_FLOAT, 0, (const GLvoid*) &teapotTexCoords[0]);
glVertexPointer(3, GL_FLOAT, 0, (const GLvoid*) &teapotVertices[0]);
glNormalPointer(GL_FLOAT, 0, (const GLvoid*) &teapotNormals[0]);
glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT,
(const GLvoid*) &teapotIndices[0]);

with the code below:
// Draw object:
glBindTexture(GL_TEXTURE_2D, thisTexture->mTextureID);
// glTexCoordPointer(2, GL_FLOAT, 0, (const GLvoid*) &teapotTexCoords[0]);
glVertexPointer(3, GL_FLOAT, 0, (const GLvoid*) &bananaVerts[0]);
glNormalPointer(GL_FLOAT, 0, (const GLvoid*) &bananaNormals[0]);
glDrawArrays(GL_TRIANGLES, 0, 24168);

its getting build but no 3d image is seen over the marker.
i also included banana.h file in imagetargets.cpp file

Re: not able to place another image over imagetarget

December 15, 2011 - 1:32am #2

It could be that the object is to small to see?
Try changing kObjectScale in ImageTargets.cpp

Log in or register to post comments