Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have quite a few problems in this code, too many to list in comments in fact.</p> <ol> <li><p>Your projection matrices are changing the handedness of your post-projected coordinate space, which will affect polygon winding.</p> <ul> <li>Stick to a single handedness, unless you want to reverse the direction used for front- / back-facing polygon facets (<code>glFrontFace (...)</code>) - it is CCW by default, but you will have to change it to CW when you use <code>set3d (...)</code> to maintain consistent behavior.</li> <li>This problem arises because you have the Y-axis going different directions <br><br></li> </ul></li> <li><p>The behavior your are describing, where the object appears briefly and then disappears is indicative of an issue with your matrix stack.</p> <ul> <li>Are you calling <code>initGL (...)</code> more than once in your software? You will run into a stack overflow if you do this enough times since you needlessly push the current matrix onto the stack and never pop it off. <br><br></li> </ul></li> <li><p>You cannot use <strong>0.0</strong> for zNear with a perspective projection matrix, this will result in wonky math during the perspective divide step that comes <em>after</em> transformation to clip-space; the depth buffer will not work correctly.</p> <ul> <li>In fact, <code>glFrustum (...)</code> will generate a <code>GL_INVALID_VALUE</code> error and do exactly <strong><em>nothing</em></strong> if you pass a value &#x2264; <strong>0.0</strong> for zNear. On a related note, <code>gluPerspective (...)</code> will not do this since it is not actually part of OpenGL, but it is equally invalid behavior to pass such a value to <code>gluPerspective (...)</code>.</li> </ul></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload