MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / drawIndexedPrimitive

Method drawIndexedPrimitive

Engine/source/gfx/gl/gfxGLDevice.cpp:694–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694void 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
715void GFXGLDevice::setPB(GFXGLPrimitiveBuffer* pb)
716{

Callers 14

renderObjectMethod · 0.45
_drawSolidPolyhedronMethod · 0.45
renderMethod · 0.45
innerRenderMethod · 0.45
renderObjectMethod · 0.45
_renderMethod · 0.45
innerRenderMethod · 0.45
renderObjectMethod · 0.45
renderObjectMethod · 0.45
renderObjectMethod · 0.45
renderQuadMethod · 0.45
_innerRenderMethod · 0.45

Calls 2

getBufferMethod · 0.45
getPointerMethod · 0.45

Tested by

no test coverage detected