Lines Matching full:primitives
454 static bool isDrawCallValid (int numVertexArrays, const VertexArrayBinding* vertexArrays, const PrimitiveList& primitives)
459 if ((primitives.indexType == INDEXTYPE_LAST) != (primitives.indices == 0))
462 if (primitives.numElements < 0)
465 if (!primitives.indices)
469 if (primitives.numElements > vertexArrays[ndx].pointer.numElements)
495 void drawFromUserPointers (const RenderContext& context, deUint32 program, int numVertexArrays, const VertexArrayBinding* vertexArrays, const PrimitiveList& primitives, DrawUtilCallback* callback)
500 DE_ASSERT(isDrawCallValid(numVertexArrays, vertexArrays, primitives));
515 if (primitives.indices)
516 drawIndexed(gl, primitives.type, primitives.numElements, primitives.indexType, primitives.indices);
518 drawNonIndexed(gl, primitivesprimitives.numElements);
527 void drawFromBuffers (const RenderContext& context, deUint32 program, int numVertexArrays, const VertexArrayBinding* vertexArrays, const PrimitiveList& primitives, DrawUtilCallback* callback)
532 DE_ASSERT(isDrawCallValid(numVertexArrays, vertexArrays, primitives));
547 if (primitives.indices)
549 IndexBuffer indexBuffer(context, primitives.indexType, primitives.numElements, primitives.indices);
556 drawIndexed(gl, primitives.type, primitives.numElements, primitives.indexType, 0);
568 drawNonIndexed(gl, primitives.type, primitives.numElements);
580 void drawFromVAOBuffers (const RenderContext& context, deUint32 program, int numVertexArrays, const VertexArrayBinding* vertexArrays, const PrimitiveList& primitives, DrawUtilCallback* callback)
586 drawFromBuffers(context, program, numVertexArrays, vertexArrays, primitives, callback);
590 void draw (const RenderContext& context, deUint32 program, int numVertexArrays, const VertexArrayBinding* vertexArrays, const PrimitiveList& primitives, DrawUtilCallback* callback)
595 drawFromVAOBuffers(context, program, numVertexArrays, vertexArrays, primitives, callback);
599 drawFromUserPointers(context, program, numVertexArrays, vertexArrays, primitives, callback);