Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should probably disable face culling: <code>GL11.glDisable(GL11.GL_CULL_FACE);</code> Your triangles might have the wrong orientation, so you only see the back faces. Another solution would be to reorient the triangles (e.g. by swapping the first and second vertex), but since you use transparency you probably want to render both front and back faces.</p> <p>Side note: I don't know why you're using GL_QUADS if you want to render triangles. So here's the first quad you posted:</p> <pre><code>GL11.glBegin(GL11.GL_QUADS); GL11.glVertex3d(ep.posX - RenderManager.renderPosX, ep.posY + ep.height + 0.5D - RenderManager.renderPosY, ep.posZ - RenderManager.renderPosZ); GL11.glVertex3d(ep.posX - RenderManager.renderPosX + 1, ep.posY - RenderManager.renderPosY, ep.posZ - RenderManager.renderPosZ); GL11.glVertex3d(ep.posX - RenderManager.renderPosX, ep.posY - RenderManager.renderPosY, ep.posZ - RenderManager.renderPosZ + 1); GL11.glVertex3d(ep.posX - RenderManager.renderPosX, ep.posY + ep.height + 0.5D - RenderManager.renderPosY, ep.posZ - RenderManager.renderPosZ); GL11.glEnd(); </code></pre> <p>The equivalent code using glTranslate and GL_TRIANGLES would be:</p> <pre><code>GL11.glTranslated(ep.posX - RenderManager.renderPosX, ep.posY - RenderManager.renderPosY, ep.posZ - RenderManager.renderPosZ ); GL11.glBegin(GL11.GL_TRIANGLES); GL11.glVertex3d(0, ep.height + 0.5D, 0); GL11.glVertex3d(1, 0, 0); GL11.glVertex3d(0, 0, 1); GL11.glEnd(); </code></pre> <p>Also note that you don't need to call <code>glBegin/glEnd</code> for each triangle, you can simply call <code>glVertex3d</code> 3*n times to render n triangles.</p>
    singulars
    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.
 

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