[fixed] Direct3D8 driver broken since revision 151

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

[fixed] Direct3D8 driver broken since revision 151

Post 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;
}
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

committing it now :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Raedwulf
Posts: 62
Joined: Sat Aug 20, 2005 7:08 am

Post by Raedwulf »

yay :)
Post Reply