missing texture

This topic contains 3 replies, has 2 voices, and was last updated by  Gordon 8 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29913

    mf23178
    Member

    Hi,

    I try to display a 3D-object by using the irrlicht engine on an Oepn GL ES 1.1 target.

    Everything works fine except that the front and top texture are never displayed.

    They are simply missing so I can see the backside of the object (e.g. other side of a displayed car).

    Any idea?

    Xmas2009-09-03 09:56:56

    #33380

    Gordon
    Moderator

    It sounds like you have face culling enabled, but the mode is not matching the winding order of the polygons in your model.

    You can change this in a number of ways. By changing the definition of what a front face is:

    Code:
    glFrontFace(GL_CW); // clockwise

    // or

    glFrontFace(GL_CCW); // counter-clockwise

    You can also specify whether to cull front or back faces:

    Code:
    glCullFace(GL_FRONT);

    // or

    glCullFace(GL_BACK);

    Additionally you could disable face culling completely:

    Code:
    glDisable(GL_CULL_FACE);

    Hope that helps.

    #33381

    mf23178
    Member

    This changes the appearance a bit. It seems like all textures are displayed now, but the bottom is shining through now.
    Ialready played a bit with cloxkwise/counterClockWise and the depth-mask but htis did not change the behavior.

    #33382

    Gordon
    Moderator

    You may have no depth buffer or need to enable depth testing and/or depth writes.

    Also, remember to clear the depth buffer each frame.

    I’ve also seen a problem like this if the near plane of your view is set to 0 (this should be greater than 0 – in fact as high as you can set it without affecting your rendering is preferable).

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.