Log in or register to post comments

Rendered texture is incomplete (faces missing)

May 31, 2012 - 12:59pm #1

I'm currently developing an AR application for my final work.

I'm using the obj2opengl script and the DrawArrays rendering method.

Here is the resulting image on the screen:

And when I'm trying to use my own models:

See those missing faces there, and the squared empty holes in the banana model?

Any idea of what the the cause of this is?

Here is the rendering code for the banana, pretty standard:

           glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0,
           		bananaVerts);
           glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0,
           		bananaNormals);
           glVertexAttribPointer(textureCoordHandle, 2, GL_FLOAT, GL_FALSE, 0,
          		bananaTexCoords);
           glEnableVertexAttribArray(vertexHandle);
           glEnableVertexAttribArray(normalHandle);
           glEnableVertexAttribArray(textureCoordHandle);

           LOG("enabled arrays!");

           glUniformMatrix4fv(mvpMatrixHandle, 1, GL_FALSE,
                              (GLfloat*)&modelViewProjection.data[0] );
           glActiveTexture(GL_TEXTURE0);
           glBindTexture(GL_TEXTURE_2D, thisTexture->mTextureID);
           glDrawArrays(GL_TRIANGLES, 0, bananaNumVerts);

Rendered texture is incomplete (faces missing)

March 22, 2017 - 4:18am #5

Hi,

I have same issue. What can I do? P

Your help is a lot of help

Re: Rendered texture is incomplete (faces missing)

June 4, 2012 - 5:22pm #4

Can you post a copy of your header file?

Re: Rendered texture is incomplete (faces missing)

May 31, 2012 - 11:43pm #3

Thanks for the quick reply.

I already did disable culling. But as you can see the same error is existing for the banana model which is the example model for obj2opengl script and I've seen it work with people.

Any other ideas?

Re: Rendered texture is incomplete (faces missing)

May 31, 2012 - 6:46pm #2

Try disabling culling on that model. It may be that there is a conflict in the winding of your triangles.

glDisable(GL_CULL_FACE)

Log in or register to post comments