Page 1 of 1

[fixed] Direct3D8 driver broken since revision 151

Posted: Fri Oct 20, 2006 7:36 am
by vitek

Code: Select all

switch (pType)
{
   case scene::EPT_POINTS:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_POINTLIST, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_LINE_STRIP:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount,
         primitiveCount-1, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_LINE_LOOP:
   {
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      u16 tmpIndices[] = {0, primitiveCount};
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount,
         1, tmpIndices, D3DFMT_INDEX16, vertices, stride);
   }
      break;
   case scene::EPT_LINES:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount,
         primitiveCount/2, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_TRIANGLE_STRIP:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLESTRIP, 0, vertexCount,
         primitiveCount-2, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_TRIANGLE_FAN:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLEFAN, 0, vertexCount,
         primitiveCount-2, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_TRIANGLES:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, vertexCount,
         primitiveCount/3, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
}
Should be...

Code: Select all

switch (pType)
{
   case scene::EPT_POINTS:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_POINTLIST, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_LINE_STRIP:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_LINE_LOOP:
   {
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      u16 tmpIndices[] = {0, primitiveCount};
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount,
         1, tmpIndices, D3DFMT_INDEX16, vertices, stride);
   }
      break;
   case scene::EPT_LINES:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_TRIANGLE_STRIP:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLESTRIP, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_TRIANGLE_FAN:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLEFAN, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
   case scene::EPT_TRIANGLES:
      pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, vertexCount,
         primitiveCount, indexList, D3DFMT_INDEX16, vertices, stride);
      break;
}

Posted: Fri Oct 20, 2006 10:18 pm
by bitplane
committing it now :)

Posted: Sat Oct 21, 2006 6:30 am
by Raedwulf
yay :)