void Prime::CalculeazaValori(int index) { if (index > MAX) { throw ParametruInAfaraIntervalului(); } if (_elemente.size() == 0) { _elemente.push_back(2); _elemente.push_back(3); } TestPrim testPrim(_elemente.back() + 2); TIterator it; for (Uint i = _elemente.size(); i < _count; ++testPrim) { it = find_if(_elemente.begin(), _elemente.end(), testPrim); if (*it > testPrim) { _elemente.push_back(testPrim); ++i; } } }
enum piglit_result piglit_display(void) { bool pass = true; testing_first_pv = false; pass = testPrim(GL_TRIANGLES, (GLfloat *) TriVerts, ARRAY_SIZE(TriVerts)) && pass; pass = testPrim(GL_TRIANGLE_STRIP, (GLfloat *) TriStripVerts, ARRAY_SIZE(TriStripVerts)) && pass; pass = testPrim(GL_TRIANGLE_FAN, (GLfloat *) TriFanVerts, ARRAY_SIZE(TriFanVerts)) && pass; pass = testPrim(GL_QUADS, (GLfloat *) QuadVerts, ARRAY_SIZE(QuadVerts)) && pass; pass = testPrim(GL_QUAD_STRIP, (GLfloat *) QuadStripVerts, ARRAY_SIZE(QuadStripVerts)) && pass; pass = testPrim(GL_POLYGON, (GLfloat *) PolygonVerts, ARRAY_SIZE(PolygonVerts)) && pass; if (provoking_vertex_first) { glProvokingVertex(GL_FIRST_VERTEX_CONVENTION_EXT); testing_first_pv = true; pass = testPrim(GL_TRIANGLES, (GLfloat *) TriVertsFirstPV, ARRAY_SIZE(TriVertsFirstPV)) && pass; pass = testPrim(GL_TRIANGLE_STRIP, (GLfloat *) TriStripVertsFirstPV, ARRAY_SIZE(TriStripVertsFirstPV)) && pass; pass = testPrim(GL_TRIANGLE_FAN, (GLfloat *) TriFanVertsFirstPV, ARRAY_SIZE(TriFanVertsFirstPV)) && pass; if (quads_follows_pv_convention) pass = testPrim(GL_QUADS, (GLfloat *) QuadVertsFirstPV, ARRAY_SIZE(QuadVertsFirstPV)) && pass; else pass = testPrim(GL_QUADS, (GLfloat *) QuadVerts, ARRAY_SIZE(QuadVerts)) && pass; if (quads_follows_pv_convention) pass = testPrim(GL_QUAD_STRIP, (GLfloat *) QuadStripVertsFirstPV, ARRAY_SIZE(QuadStripVertsFirstPV)) && pass; else pass = testPrim(GL_QUAD_STRIP, (GLfloat *) QuadStripVerts, ARRAY_SIZE(QuadStripVerts)) && pass; pass = testPrim(GL_POLYGON, (GLfloat *) PolygonVerts, ARRAY_SIZE(PolygonVerts)) && pass; } return pass ? PIGLIT_PASS : PIGLIT_FAIL; }