3D Wrong sides of 3D cube being drawn

Discussion in 'Programming' started by SilentX, Feb 8, 2017.

  1. SilentX

    SilentX Guest

    I'm working on a new 3D puzzle game for iOS.

    When running the game on my iPad, it appears that sometimes, a few sides of a 3D cube, which are drawn last, will appear in front of other sides, even if they are on the opposite side of the cube. Each cube is made of 6 primitives.

    Here is how one side of a cube is created:

    Here is the code to draw all the primitives within a model:

    This is very similar to a problem I recently had, except that instead of some sides not being drawn at all, I have sides on the opposite side of a cube being drawn over the top of the side closest to the camera.

    It displays perfectly on my laptop, but incorrectly on my iPad.

    I'm not sure how to fix this, as there will always be a side of the cube drawn last, with the camera on the opposite side.

    I have game maker studio 1.4.1598 installed. When using the latest version of game maker, I had other issues when exporting the game in Xcode, so I rolled back to this version.

    I have attached 2 images demonstrating the issue.

    Attached Files:

    Last edited by a moderator: Feb 8, 2017
  2. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Jun 20, 2016
    do you have backside culling turned on?

    are you using the z buffer?
  3. SilentX

    SilentX Guest

    I am using d3d_set_culling(true)

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice