Lines Matching refs:attributes
75 vector<Attribute> attributes;
201 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
205 << "\tGL_VERTEX_ATTRIB_ARRAY_ENABLED : " << (state.attributes[attribNdx].enabled ? "GL_TRUE" : "GL_FALSE") << "\n"
206 << "\tGL_VERTEX_ATTRIB_ARRAY_SIZE : " << state.attributes[attribNdx].size << "\n"
207 << "\tGL_VERTEX_ATTRIB_ARRAY_STRIDE : " << state.attributes[attribNdx].stride << "\n"
208 << "\tGL_VERTEX_ATTRIB_ARRAY_TYPE : " << state.attributes[attribNdx].type << "\n"
209 << "\tGL_VERTEX_ATTRIB_ARRAY_NORMALIZED : " << (state.attributes[attribNdx].normalized ? "GL_TRUE" : "GL_FALSE") << "\n"
210 << "\tGL_VERTEX_ATTRIB_ARRAY_INTEGER : " << (state.attributes[attribNdx].integer ? "GL_TRUE" : "GL_FALSE") << "\n"
211 << "\tGL_VERTEX_ATTRIB_ARRAY_DIVISOR : " << state.attributes[attribNdx].divisor << "\n"
212 << "\tGL_VERTEX_ATTRIB_ARRAY_POINTER : " << state.attributes[attribNdx].offset << "\n"
213 << "\tGL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : " << m_buffers[state.attributes[attribNdx].bufferNdx] << "\n";
427 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
429 if (state.attributes[attribNdx].integer)
434 if (state.attributes[attribNdx].integer)
438 switch (state.attributes[0].type)
452 else if (state.attributes[attribNdx].type != GL_FLOAT && !state.attributes[attribNdx].normalized)
456 switch (state.attributes[0].type)
480 if (state.attributes[0].integer)
484 switch (state.attributes[0].type)
503 if (state.attributes[0].normalized || state.attributes[0].type == GL_FLOAT)
513 switch (state.attributes[0].type)
550 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
552 GLU_CHECK_CALL(glBindBuffer(GL_ARRAY_BUFFER, m_buffers[state.attributes[attribNdx].bufferNdx]));
553 if (state.attributes[attribNdx].enabled)
558 if (state.attributes[attribNdx].integer)
559 GLU_CHECK_CALL(glVertexAttribIPointer(attribNdx, state.attributes[attribNdx].size, state.attributes[attribNdx].type, state.attributes[attribNdx].stride, (const GLvoid*)((GLintptr)state.attributes[attribNdx].offset)));
561 GLU_CHECK_CALL(glVertexAttribPointer(attribNdx, state.attributes[attribNdx].size, state.attributes[attribNdx].type, state.attributes[attribNdx].normalized, state.attributes[attribNdx].stride, (const GLvoid*)((GLintptr)state.attributes[attribNdx].offset)));
563 GLU_CHECK_CALL(glVertexAttribDivisor(attribNdx, state.attributes[attribNdx].divisor));
572 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
574 if (state.attributes[attribNdx].integer)
727 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
731 << "\tGL_VERTEX_ATTRIB_ARRAY_ENABLED : " << (state.attributes[attribNdx].enabled ? "GL_TRUE" : "GL_FALSE") << "\n"
732 << "\tGL_VERTEX_ATTRIB_ARRAY_SIZE : " << state.attributes[attribNdx].size << "\n"
733 << "\tGL_VERTEX_ATTRIB_ARRAY_STRIDE : " << state.attributes[attribNdx].stride << "\n"
734 << "\tGL_VERTEX_ATTRIB_ARRAY_TYPE : " << state.attributes[attribNdx].type << "\n"
735 << "\tGL_VERTEX_ATTRIB_ARRAY_NORMALIZED : " << (state.attributes[attribNdx].normalized ? "GL_TRUE" : "GL_FALSE") << "\n"
736 << "\tGL_VERTEX_ATTRIB_ARRAY_INTEGER : " << (state.attributes[attribNdx].integer ? "GL_TRUE" : "GL_FALSE") << "\n"
737 << "\tGL_VERTEX_ATTRIB_ARRAY_DIVISOR : " << state.attributes[attribNdx].divisor << "\n"
738 << "\tGL_VERTEX_ATTRIB_ARRAY_POINTER : " << state.attributes[attribNdx].offset << "\n"
739 << "\t GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : " << m_buffers[state.attributes[attribNdx].bufferNdx] << "\n";
767 m_spec.state.attributes.push_back(Attribute());
768 m_spec.state.attributes[attribNdx].enabled = (m_random.getInt(0, 4) == 0) ? GL_FALSE : GL_TRUE;
769 m_spec.state.attributes[attribNdx].size = m_random.getInt(2,4);
770 m_spec.state.attributes[attribNdx].stride = 2*m_random.getInt(1, 3);
771 m_spec.state.attributes[attribNdx].type = GL_SHORT;
772 m_spec.state.attributes[attribNdx].integer = m_random.getBool();
773 m_spec.state.attributes[attribNdx].divisor = m_random.getInt(0, 1);
774 m_spec.state.attributes[attribNdx].offset = 2*m_random.getInt(0, 2);
775 m_spec.state.attributes[attribNdx].normalized = m_random.getBool();
776 m_spec.state.attributes[attribNdx].bufferNdx = attribNdx+1;
780 m_spec.state.attributes[attribNdx].divisor = 0;
781 m_spec.state.attributes[attribNdx].enabled = GL_TRUE;
782 m_spec.state.attributes[attribNdx].size = 2;
785 m_spec.vao.attributes.push_back(Attribute());
786 m_spec.vao.attributes[attribNdx].enabled = (m_random.getInt(0, 4) == 0) ? GL_FALSE : GL_TRUE;
787 m_spec.vao.attributes[attribNdx].size = m_random.getInt(2,4);
788 m_spec.vao.attributes[attribNdx].stride = 2*m_random.getInt(1, 3);
789 m_spec.vao.attributes[attribNdx].type = GL_SHORT;
790 m_spec.vao.attributes[attribNdx].integer = m_random.getBool();
791 m_spec.vao.attributes[attribNdx].divisor = m_random.getInt(0, 1);
792 m_spec.vao.attributes[attribNdx].offset = 2*m_random.getInt(0, 2);
793 m_spec.vao.attributes[attribNdx].normalized = m_random.getBool();
794 m_spec.vao.attributes[attribNdx].bufferNdx = attribCount - attribNdx;
798 m_spec.vao.attributes[attribNdx].divisor = 0;
799 m_spec.vao.attributes[attribNdx].enabled = GL_TRUE;
800 m_spec.vao.attributes[attribNdx].size = 2;
1011 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
1013 if (state.attributes[attribNdx].integer)
1018 if (state.attributes[attribNdx].integer)
1022 switch (state.attributes[0].type)
1036 else if (state.attributes[attribNdx].type != GL_FLOAT && !state.attributes[attribNdx].normalized)
1040 switch (state.attributes[0].type)
1064 if (state.attributes[0].integer)
1068 switch (state.attributes[0].type)
1088 if (state.attributes[0].normalized || state.attributes[0].type == GL_FLOAT)
1098 switch (state.attributes[0].type)
1135 for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++)
1137 GLU_CHECK_CALL(glBindBuffer(GL_ARRAY_BUFFER, m_buffers[state.attributes[attribNdx].bufferNdx]));
1138 if (state.attributes[attribNdx].enabled)
1143 if (state.attributes[attribNdx].integer)
1144 GLU_CHECK_CALL(glVertexAttribIPointer(attribNdx, state.attributes[attribNdx].size, state.attributes[attribNdx].type, state.attributes[attribNdx].stride, (const GLvoid*)((GLintptr)state.attributes[attribNdx].offset)));
1146 GLU_CHECK_CALL(glVertexAttribPointer(attribNdx, state.attributes[attribNdx].size, state.attributes[attribNdx].type, state.attributes[attribNdx].normalized, state.attributes[attribNdx].stride, (const GLvoid*)((GLintptr)state.attributes[attribNdx].offset)));
1148 GLU_CHECK_CALL(glVertexAttribDivisor(attribNdx, state.attributes[attribNdx].divisor));
1271 state.attributes.push_back(Attribute());
1273 state.attributes[0].enabled = true;
1274 state.attributes[0].size = 2;
1275 state.attributes[0].stride = 0;
1276 state.attributes[0].type = GL_FLOAT;
1277 state.attributes[0].integer = GL_FALSE;
1278 state.attributes[0].divisor = 0;
1279 state.attributes[0].offset = 0;
1280 state.attributes[0].normalized = GL_FALSE;
1298 spec.state.attributes[0].bufferNdx = 1;
1299 spec.vao.attributes[0].bufferNdx = 2;
1308 state.attributes.push_back(Attribute());
1310 state.attributes[0].enabled = true;
1311 state.attributes[0].size = 2;
1312 state.attributes[0].stride = 0;
1313 state.attributes[0].type = GL_FLOAT;
1314 state.attributes[0].integer = GL_FALSE;
1315 state.attributes[0].divisor = 0;
1316 state.attributes[0].offset = 0;
1317 state.attributes[0].normalized = GL_FALSE;
1318 state.attributes[0].bufferNdx = 1;
1335 spec.state.attributes[0].size = 2;
1336 spec.vao.attributes[0].size = 3;
1346 state.attributes.push_back(Attribute());
1348 state.attributes[0].enabled = true;
1349 state.attributes[0].size = 2;
1350 state.attributes[0].stride = 0;
1351 state.attributes[0].type = GL_SHORT;
1352 state.attributes[0].integer = GL_FALSE;
1353 state.attributes[0].divisor = 0;
1354 state.attributes[0].offset = 0;
1355 state.attributes[0].normalized = GL_TRUE;
1356 state.attributes[0].bufferNdx = 1;
1373 spec.vao.attributes[0].stride = 2;
1374 spec.state.attributes[0].stride = 4;
1384 state.attributes.push_back(Attribute());
1386 state.attributes[0].enabled = true;
1387 state.attributes[0].size = 2;
1388 state.attributes[0].stride = 0;
1389 state.attributes[0].type = GL_SHORT;
1390 state.attributes[0].integer = GL_FALSE;
1391 state.attributes[0].divisor = 0;
1392 state.attributes[0].offset = 0;
1393 state.attributes[0].normalized = GL_TRUE;
1394 state.attributes[0].bufferNdx = 1;
1411 spec.vao.attributes[0].type = GL_SHORT;
1412 spec.state.attributes[0].type = GL_BYTE;
1421 state.attributes.push_back(Attribute());
1423 state.attributes[0].enabled = true;
1424 state.attributes[0].size = 2;
1425 state.attributes[0].stride = 0;
1426 state.attributes[0].type = GL_BYTE;
1427 state.attributes[0].integer = GL_TRUE;
1428 state.attributes[0].divisor = 0;
1429 state.attributes[0].offset = 0;
1430 state.attributes[0].normalized = GL_FALSE;
1431 state.attributes[0].bufferNdx = 1;
1448 spec.state.attributes[0].integer = GL_FALSE;
1449 spec.vao.attributes[0].integer = GL_TRUE;
1458 state.attributes.push_back(Attribute());
1459 state.attributes.push_back(Attribute());
1461 state.attributes[0].enabled = true;
1462 state.attributes[0].size = 2;
1463 state.attributes[0].stride = 0;
1464 state.attributes[0].type = GL_SHORT;
1465 state.attributes[0].integer = GL_FALSE;
1466 state.attributes[0].divisor = 0;
1467 state.attributes[0].offset = 0;
1468 state.attributes[0].normalized = GL_TRUE;
1469 state.attributes[0].bufferNdx = 1;
1471 state.attributes[1].enabled = true;
1472 state.attributes[1].size = 4;
1473 state.attributes[1].stride = 0;
1474 state.attributes[1].type = GL_FLOAT;
1475 state.attributes[1].integer = GL_FALSE;
1476 state.attributes[1].divisor = 0;
1477 state.attributes[1].offset = 0;
1478 state.attributes[1].normalized = GL_FALSE;
1479 state.attributes[1].bufferNdx = 2;
1497 spec.vao.attributes[1].divisor = 3;
1498 spec.state.attributes[1].divisor = 2;
1508 state.attributes.push_back(Attribute());
1510 state.attributes[0].enabled = true;
1511 state.attributes[0].size = 2;
1512 state.attributes[0].stride = 0;
1513 state.attributes[0].type = GL_SHORT;
1514 state.attributes[0].integer = GL_FALSE;
1515 state.attributes[0].divisor = 0;
1516 state.attributes[0].offset = 0;
1517 state.attributes[0].normalized = GL_TRUE;
1518 state.attributes[0].bufferNdx = 1;
1535 spec.vao.attributes[0].offset = 2;
1536 spec.state.attributes[0].offset = 4;
1545 state.attributes.push_back(Attribute());
1547 state.attributes[0].enabled = true;
1548 state.attributes[0].size = 2;
1549 state.attributes[0].stride = 0;
1550 state.attributes[0].type = GL_SHORT;
1551 state.attributes[0].integer = GL_FALSE;
1552 state.attributes[0].divisor = 0;
1553 state.attributes[0].offset = 0;
1554 state.attributes[0].normalized = GL_TRUE;
1555 state.attributes[0].bufferNdx = 1;
1572 spec.vao.attributes[0].normalized = GL_TRUE;
1573 spec.state.attributes[0].normalized = GL_FALSE;
1582 state.attributes.push_back(Attribute());
1584 state.attributes[0].enabled = true;
1585 state.attributes[0].size = 2;
1586 state.attributes[0].stride = 0;
1587 state.attributes[0].type = GL_FLOAT;
1588 state.attributes[0].integer = GL_FALSE;
1589 state.attributes[0].divisor = 0;
1590 state.attributes[0].offset = 0;
1591 state.attributes[0].normalized = GL_TRUE;
1592 state.attributes[0].bufferNdx = 1;
1616 // Use all attributes