"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Image is not clear while render

I used Blender for create 3D modal. I created .obj file and converted to .h file but .h file having only glVertexPointer, glDrawArrays. I used .png image file.  But when image is tracking the 3D modal doesn't displays proper. It's some what black color. I replaced code in EAGLView.mm is:

 

- (void) setup3dObjects

{

      for (int i=0; i < [textures count]; i++)

    {

        Object3D *obj3D = [[Object3D alloc] init];

 obj3D.numVertices = STRAPPNumVerts;

        obj3D.vertices = STRAPPVerts;

        obj3D.normals = nil;

        obj3D.texCoords = nil;

      obj3D.numIndices = 0;

        obj3D.indices = nil;

   obj3D.texture = [textures objectAtIndex:i];

   [objects3D addObject:obj3D];

        [obj3D release];

   }

}

 

In renderFrame:

 

glVertexPointer(3, GL_FLOAT, 0, STRAPPVerts);

     glDrawArrays(GL_TRIANGLES, 0, STRAPPNumVerts);

 

and

 glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) STRAPPVerts);

glDrawArrays(GL_TRIANGLES, 0, STRAPPNumVerts);

 

where i did mistake?

 

AlessandroB

Fri, 10/11/2013 - 13:23

Since you only have vertices, but no texture coordinates, your mesh will be rendered black, unless you change the code in the fragment Shader.

Attachment