| 692 | } |
| 693 | |
| 694 | void GFXGLDevice::drawIndexedPrimitive( GFXPrimitiveType primType, |
| 695 | U32 startVertex, |
| 696 | U32 minIndex, |
| 697 | U32 numVerts, |
| 698 | U32 startIndex, |
| 699 | U32 primitiveCount ) |
| 700 | { |
| 701 | preDrawPrimitive(); |
| 702 | |
| 703 | U16* buf = (U16*)static_cast<GFXGLPrimitiveBuffer*>(mCurrentPrimitiveBuffer.getPointer())->getBuffer() + startIndex + mCurrentPrimitiveBuffer->mVolatileStart; |
| 704 | |
| 705 | const U32 baseVertex = mCurrentVB[0]->mBufferVertexOffset + startVertex; |
| 706 | |
| 707 | if(mDrawInstancesCount) |
| 708 | glDrawElementsInstancedBaseVertex(GFXGLPrimType[primType], primCountToIndexCount(primType, primitiveCount), GL_UNSIGNED_SHORT, buf, mDrawInstancesCount, baseVertex); |
| 709 | else |
| 710 | glDrawElementsBaseVertex(GFXGLPrimType[primType], primCountToIndexCount(primType, primitiveCount), GL_UNSIGNED_SHORT, buf, baseVertex); |
| 711 | |
| 712 | postDrawPrimitive(primitiveCount); |
| 713 | } |
| 714 | |
| 715 | void GFXGLDevice::setPB(GFXGLPrimitiveBuffer* pb) |
| 716 | { |
no test coverage detected