Lines Matching full:m_spec
111 TestSpec m_spec;
157 , m_spec (spec)
172 if (m_spec.dynamicIndices)
174 for (int drawNdx = 0; drawNdx < m_spec.drawCallCount; drawNdx++)
176 for (int triangleNdx = 0; triangleNdx < m_spec.triangleCount; triangleNdx++)
186 for (int drawNdx = 0; drawNdx < m_spec.drawCallCount; drawNdx++)
188 for (int triangleNdx = 0; triangleNdx < m_spec.triangleCount; triangleNdx++)
203 for (int attributeNdx = 0; attributeNdx < m_spec.staticAttributeCount; attributeNdx++)
206 if (m_spec.staticAttributeCount > 0 && m_spec.dynamicAttributeCount > 0)
209 for (int attributeNdx = 0; attributeNdx < m_spec.dynamicAttributeCount; attributeNdx++)
223 for (int attributeNdx = 0; attributeNdx < m_spec.staticAttributeCount; attributeNdx++)
232 for (int attributeNdx = 0; attributeNdx < m_spec.dynamicAttributeCount; attributeNdx++)
243 if (m_spec.dynamicAttributeCount > 0)
268 for (int attribute = 0; attribute < m_spec.staticAttributeCount; attribute++)
272 if (m_spec.dynamicAttributeCount == 0 && attribute == 0)
274 data.reserve(4 * 3 * m_spec.triangleCount * m_spec.drawCallCount);
276 for (int i = 0; i < m_spec.triangleCount * m_spec.drawCallCount; i++)
278 int sign = (m_spec.triangleCount % 2 == 1 || i % 2 == 0 ? 1 : -1);
298 data.reserve(4 * 3 * m_spec.triangleCount * m_spec.drawCallCount);
300 for (int i = 0; i < 4 * 3 * m_spec.triangleCount * m_spec.drawCallCount; i++)
308 for (int attribute = 0; attribute < m_spec.dynamicAttributeCount; attribute++)
314 data.reserve(4 * 3 * m_spec.triangleCount * m_spec.drawCallCount);
316 for (int i = 0; i < m_spec.triangleCount * m_spec.drawCallCount; i++)
338 data.reserve(4 * 3 * m_spec.triangleCount * m_spec.drawCallCount);
340 for (int i = 0; i < 4 * 3 * m_spec.triangleCount * m_spec.drawCallCount; i++)
352 if (m_spec.useStaticBuffer)
355 for (int attribute = 0; attribute < m_spec.staticAttributeCount; attribute++)
361 gl.bufferData(GL_ARRAY_BUFFER, 4 * 3 * m_spec.triangleCount * m_spec.drawCallCount, &(m_staticAttributeDatas[attribute][0]), GL_STATIC_DRAW);
369 for (int attribute = 0; attribute < m_spec.staticAttributeCount; attribute++)
375 gl.bufferData(GL_ARRAY_BUFFER, 4 * 3 * m_spec.triangleCount, &(m_staticAttributeDatas[attribute][0]), GL_STATIC_DRAW);
383 if (m_spec.useDynamicBuffer)
386 for (int attribute = 0; attribute < m_spec.dynamicAttributeCount; attribute++)
392 gl.bufferData(GL_ARRAY_BUFFER, 4 * 3 * m_spec.triangleCount * m_spec.drawCallCount, &(m_dynamicAttributeDatas[attribute][0]), GL_STATIC_DRAW);
400 for (int attribute = 0; attribute < m_spec.dynamicAttributeCount; attribute++)
404 for (int drawNdx = 0; drawNdx < m_spec.drawCallCount; drawNdx++)
410 gl.bufferData(GL_ARRAY_BUFFER, 4 * 3 * m_spec.triangleCount * m_spec.drawCallCount, &(m_dynamicAttributeDatas[attribute][0]), GL_STATIC_DRAW);
426 if (m_spec.dynamicIndices)
428 for (int drawNdx = 0; drawNdx < m_spec.drawCallCount; drawNdx++)
434 gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, 3 * m_spec.triangleCount, &(m_dynamicIndexData[drawNdx * m_spec.triangleCount * 3]), GL_STATIC_DRAW);
446 gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, 3 * m_spec.triangleCount * m_spec.drawCallCount, &(m_dynamicIndexData[0]), GL_STATIC_DRAW);
460 gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, 3 * m_spec.triangleCount * m_spec.drawCallCount, &(m_staticIndexData[0]), GL_STATIC_DRAW);
472 gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, 3 * m_spec.triangleCount, &(m_staticIndexData[0]), GL_STATIC_DRAW);
487 if (m_spec.useDrawElements)
491 if (m_spec.useIndexBuffer)
588 for (int attribNdx = 0; attribNdx < m_spec.staticAttributeCount; attribNdx++)
594 if (m_spec.useStaticBuffer)
605 for (int attribNdx = 0; attribNdx < m_spec
613 if (m_spec.useDrawElements && m_spec.useIndexBuffer && !m_spec.dynamicIndices)
622 for (int drawNdx = 0; drawNdx < m_spec.drawCallCount; drawNdx++)
624 for (int attribNdx = 0; attribNdx < m_spec.dynamicAttributeCount; attribNdx++)
626 if (m_spec.useDynamicBuffer)
633 gl.vertexAttribPointer(dynamicAttributeLocations[attribNdx], 4, GL_BYTE, GL_TRUE, 0, &(m_dynamicAttributeDatas[attribNdx][m_spec.triangleCount * 3 * drawNdx * 4]));
636 if (m_spec.useDrawElements)
638 if (m_spec.useIndexBuffer)
640 if (m_spec.dynamicIndices)
643 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3, GL_UNSIGNED_BYTE, NULL);
647 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3, GL_UNSIGNED_BYTE, NULL);
651 if (m_spec.dynamicIndices)
652 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3, GL_UNSIGNED_BYTE, &(m_dynamicIndexData[drawNdx * m_spec.triangleCount * 3]));
654 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3, GL_UNSIGNED_BYTE, &(m_staticIndexData[0]));
658 gl.drawArrays(GL_TRIANGLES, 0, 3 * m_spec.triangleCount);
669 for (int attribNdx = 0; attribNdx < m_spec.staticAttributeCount; attribNdx++)
675 for (int attribNdx = 0; attribNdx < m_spec.dynamicAttributeCount; attribNdx++)
694 for (int attribNdx = 0; attribNdx < m_spec.staticAttributeCount; attribNdx++)
700 if (m_spec.useStaticBuffer)
711 for (int attribNdx = 0; attribNdx < m_spec.dynamicAttributeCount; attribNdx++)
719 if (m_spec.useDrawElements && m_spec.useIndexBuffer && !m_spec.dynamicIndices)
728 for (int attribute = 0; attribute < m_spec.dynamicAttributeCount; attribute++)
730 if (m_spec.useDynamicBuffer)
740 if (m_spec.useDrawElements)
742 if (m_spec.useIndexBuffer)
744 if (m_spec.dynamicIndices)
747 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3 * m_spec.drawCallCount, GL_UNSIGNED_BYTE, NULL);
751 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3 * m_spec.drawCallCount, GL_UNSIGNED_BYTE, NULL);
755 if (m_spec.dynamicIndices)
756 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3 * m_spec.drawCallCount, GL_UNSIGNED_BYTE, &(m_dynamicIndexData[0]));
758 gl.drawElements(GL_TRIANGLES, m_spec.triangleCount * 3 * m_spec.drawCallCount, GL_UNSIGNED_BYTE, &(m_staticIndexData[0]));
762 gl.drawArrays(GL_TRIANGLES, 0, 3 * m_spec.triangleCount * m_spec.drawCallCount);
772 for (int attribNdx = 0; attribNdx < m_spec.staticAttributeCount; attribNdx++)
778 for (int attribNdx = 0; attribNdx < m_spec.dynamicAttributeCount; attribNdx++)
829 log << TestLog::Message << "Rendering using " << (m_spec.useDrawElements ? "glDrawElements()" : "glDrawArrays()") << "." << TestLog::EndMessage;
831 if (m_spec.useDrawElements)
832 log << TestLog::Message << "Using " << (m_spec.dynamicIndices ? "dynamic " : "") << "indices from " << (m_spec.useIndexBuffer ? "buffer" : "pointer") << "." << TestLog::EndMessage;
834 if (m_spec.staticAttributeCount > 0)
835 log << TestLog::Message << "Using " << m_spec.staticAttributeCount << " static attribute" << (m_spec.staticAttributeCount > 1 ? "s" : "") << " from " << (m_spec.useStaticBuffer ? "buffer" : "pointer") << "." << TestLog::EndMessage;
837 if (m_spec.dynamicAttributeCount > 0)
838 log << TestLog::Message << "Using " << m_spec.dynamicAttributeCount << " dynamic attribute" << (m_spec.dynamicAttributeCount > 1 ? "s" : "") << " from " << (m_spec.useDynamicBuffer ? "buffer" : "pointer") << "." << TestLog::EndMessage;
840 log << TestLog::Message << "Rendering " << m_spec.drawCallCount << " draw calls with " << m_spec.triangleCount << " triangles per call." << TestLog::EndMessage;