Lines Matching refs:Vec4
53 static const char* const s_shaderVertexTemplate = "attribute highp vec4 a_position;\n"
54 "attribute highp vec4 a_color;\n"
55 "varying highp vec4 v_color;\n"
63 static const char* const s_shaderFragmentTemplate = "varying mediump vec4 v_color;\n"
91 void drawPrimitives (tcu::Surface& result, const std::vector<tcu::Vec4>& vertexData, glw::GLenum primitiveType);
92 void drawPrimitives (tcu::Surface& result, const std::vector<tcu::Vec4>& vertexData, const std::vector<tcu::Vec4>& coloDrata, glw::GLenum primitiveType);
182 void BaseRenderingCase::drawPrimitives (tcu::Surface& result, const std::vector<tcu::Vec4>& vertexData, glw::GLenum primitiveType)
185 const std::vector<tcu::Vec4> colorData(vertexData.size(), tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
190 void BaseRenderingCase::drawPrimitives (tcu::Surface& result, const std::vector<tcu::Vec4>& vertexData, const std::vector<tcu::Vec4>& colorData, glw::GLenum primitiveType)
225 virtual void generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles) = DE_NULL;
251 std::vector<tcu::Vec4> drawBuffer;
301 virtual void generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines) = DE_NULL;
337 std::vector<tcu::Vec4> drawBuffer;
408 void generatePoints (int iteration, std::vector<tcu::Vec4>& outData, std::vector<PointSceneSpec::ScenePoint>& outPoints);
439 std::vector<tcu::Vec4> drawBuffer;
492 void PointCase::generatePoints (int iteration, std::vector<tcu::Vec4>& outData, std::vector<PointSceneSpec::ScenePoint>& outPoints)
500 outData[0] = tcu::Vec4( 0.2f, 0.8f, 0.0f, 1.0f);
501 outData[1] = tcu::Vec4( 0.5f, 0.2f, 0.0f, 1.0f);
502 outData[2] = tcu::Vec4( 0.5f, 0.3f, 0.0f, 1.0f);
503 outData[3] = tcu::Vec4(-0.5f, 0.2f, 0.0f, 1.0f);
504 Vec4(-0.2f, -0.4f, 0.0f, 1.0f);
505 outData[5] = tcu::Vec4(-0.4f, 0.2f, 0.0f, 1.0f);
509 outData[0] = tcu::Vec4(-0.499f, 0.128f, 0.0f, 1.0f);
510 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
511 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
512 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
513 outData[4] = tcu::Vec4( 0.88f, 0.9f, 0.0f, 1.0f);
514 outData[5] = tcu::Vec4( 0.4f, 1.2f, 0.0f, 1.0f);
518 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
519 outData[1] = tcu::Vec4( 0.3f, -0.9f, 0.0f, 1.0f);
520 outData[2] = tcu::Vec4( -0.4f, -0.1f, 0.0f, 1.0f);
521 outData[3] = tcu::Vec4(-0.11f, 0.2f, 0.0f, 1.0f);
522 outData[4] = tcu::Vec4( 0.88f, 0.7f, 0.0f, 1.0f);
523 outData[5] = tcu::Vec4( -0.4f, 0.4f, 0.0f, 1.0f);
546 void generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles);
559 void TrianglesCase::generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles)
567 outData[0] = tcu::Vec4( 0.2f, 0.8f, 0.0f, 1.0f);
568 outData[1] = tcu::Vec4( 0.5f, 0.2f, 0.0f, 1.0f);
569 outData[2] = tcu::Vec4( 0.5f, 0.3f, 0.0f, 1.0f);
570 outData[3] = tcu::Vec4(-0.5f, 0.2f, 0.0f, 1.0f);
571 outData[4] = tcu::Vec4(-1.5f, -0.4f, 0.0f, 1.0f);
572 outData[5] = tcu::Vec4(-0.4f, 0.2f, 0.0f, 1.0f);
576 outData[0] = tcu::Vec4(-0.499f, 0.128f, 0.0f, 1.0f);
577 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
578 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
579 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
580 outData[4] = tcu::Vec4( 0.88f, 0.9f, 0.0f, 1.0f);
581 outData[5] = tcu::Vec4( 0.4f, 1.2f, 0.0f, 1.0f);
585 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
586 outData[1] = tcu::Vec4( 1.1f, -0.9f, 0.0f, 1.0f);
587 outData[2] = tcu::Vec4( -1.1f, -0.1f, 0.0f, 1.0f);
588 outData[3] = tcu::Vec4(-0.11f, 0.2f, 0.0f, 1.0f);
589 outData[4] = tcu::Vec4( 0.88f, 0.7f, 0.0f, 1.0f);
590 outData[5] = tcu::Vec4( -0.4f, 0.4f, 0.0f, 1.0f);
622 void generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles);
630 void TriangleStripCase::generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles)
638 outData[0] = tcu::Vec4(-0.504f, 0.8f, 0.0f, 1.0f);
639 outData[1] = tcu::Vec4(-0.2f, -0.2f, 0.0f, 1.0f);
640 outData[2] = tcu::Vec4(-0.2f, 0.199f, 0.0f, 1.0f);
641 outData[3] = tcu::Vec4( 0.5f, 0.201f, 0.0f, 1.0f);
642 outData[4] = tcu::Vec4( 1.5f, 0.4f, 0.0f, 1.0f);
646 outData[0] = tcu::Vec4(-0.499f, 0.129f, 0.0f, 1.0f);
647 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
648 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
649 outData[3] = tcu::Vec4( 0.11f, -0.31f, 0.0f, 1.0f);
650 outData[4] = tcu::Vec4( 0.88f, 0.9f, 0.0f, 1.0f);
654 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
655 outData[1] = tcu::Vec4( 1.1f, -0.9f, 0.0f, 1.0f);
656 outData[2] = tcu::Vec4(-0.87f, -0.1f, 0.0f, 1.0f);
657 outData[3] = tcu::Vec4(-0.11f, 0.19f, 0.0f, 1.0f);
658 outData[4] = tcu::Vec4( 0.88f, 0.7f, 0.0f, 1.0f);
691 void generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles);
699 void TriangleFanCase::generateTriangles (int iteration, std::vector<tcu::Vec4>& outData, std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles)
707 outData[0] = tcu::Vec4( 0.01f, 0.0f, 0.0f, 1.0f);
708 outData[1] = tcu::Vec4( 0.5f, 0.2f, 0.0f, 1.0f);
709 outData[2] = tcu::Vec4( 0.46f, 0.3f, 0.0f, 1.0f);
710 outData[3] = tcu::Vec4(-0.5f, 0.2f, 0.0f, 1.0f);
711 outData[4] = tcu::Vec4(-1.5f, -0.4f, 0.0f, 1.0f);
715 outData[0] = tcu::Vec4(-0.499f, 0.128f, 0.0f, 1.0f);
716 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
717 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
718 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
719 outData[4] = tcu::Vec4( 0.88f, 0.9f, 0.0f, 1.0f);
723 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
724 outData[1] = tcu::Vec4( 1.1f, -0.9f, 0.0f, 1.0f);
725 outData[2] = tcu::Vec4( 0.7f, -0.1f, 0.0f, 1.0f);
726 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
727 outData[4] = tcu::Vec4( 0.88f, 0.7f, 0.0f, 1.0f);
760 void generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines);
768 void LinesCase::generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines)
776 outData[0] = tcu::Vec4( 0.01f, 0.0f, 0.0f, 1.0f);
777 outData[1] = tcu::Vec4( 0.5f, 0.2f, 0.0f, 1.0f);
778 outData[2] = tcu::Vec4( 0.46f, 0.3f, 0.0f, 1.0f);
779 outData[3] = tcu::Vec4(-0.3f, 0.2f, 0.0f, 1.0f);
780 outData[4] = tcu::Vec4(-1.5f, -0.4f, 0.0f, 1.0f);
781 outData[5] = tcu::Vec4( 0.1f, 0.5f, 0.0f, 1.0f);
785 outData[0] = tcu::Vec4(-0.499f, 0.128f, 0.0f, 1.0f);
786 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
787 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
788 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
789 outData[4] = tcu::Vec4( 0.88f, 0.9f, 0.0f, 1.0f);
790 outData[5] = tcu::Vec4( 0.18f, -0.2f, 0.0f, 1.0f);
794 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
795 outData[1] = tcu::Vec4( 1.1f, -0.9f, 0.0f, 1.0f);
796 outData[2] = tcu::Vec4( 0.7f, -0.1f, 0.0f, 1.0f);
797 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
798 outData[4] = tcu::Vec4( 0.88f, 0.7f, 0.0f, 1.0f);
799 outData[5] = tcu::Vec4( 0.8f, -0.7f, 0.0f, 1.0f);
829 void generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines);
837 void LineStripCase::generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines)
845 outData[0] = tcu::Vec4( 0.01f, 0.0f, 0.0f, 1.0f);
846 outData[1] = tcu::Vec4( 0.5f, 0.2f, 0.0f, 1.0f);
847 outData[2] = tcu::Vec4( 0.46f, 0.3f, 0.0f, 1.0f);
848 outData[3] = tcu::Vec4(-0.5f, 0.2f, 0.0f, 1.0f);
852 outData[0] = tcu::Vec4(-0.499f, 0.128f, 0.0f, 1.0f);
853 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
854 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
855 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
859 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
860 outData[1] = tcu::Vec4( 1.1f, -0.9f, 0.0f, 1.0f);
861 outData[2] = tcu::Vec4( 0.7f, -0.1f, 0.0f, 1.0f);
862 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
890 void generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines);
898 void LineLoopCase::generateLines (int iteration, std::vector<tcu::Vec4>& outData, std::vector<LineSceneSpec::SceneLine>& outLines)
906 outData[0] = tcu::Vec4( 0.01f, 0.0f, 0.0f, 1.0f);
907 outData[1] = tcu::Vec4( 0.5f, 0.2f, 0.0f, 1.0f);
908 outData[2] = tcu::Vec4( 0.46f, 0.3f, 0.0f, 1.0f);
909 outData[3] = tcu::Vec4(-0.5f, 0.2f, 0.0f, 1.0f);
913 outData[0] = tcu::Vec4(-0.499f, 0.128f, 0.0f, 1.0f);
914 outData[1] = tcu::Vec4(-0.501f, -0.3f, 0.0f, 1.0f);
915 outData[2] = tcu::Vec4( 0.11f, -0.2f, 0.0f, 1.0f);
916 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
920 outData[0] = tcu::Vec4( -0.9f, -0.3f, 0.0f, 1.0f);
921 outData[1] = tcu::Vec4( 1.1f, -0.9f, 0.0f, 1.0f);
922 outData[2] = tcu::Vec4( 0.7f, -0.1f, 0.0f, 1.0f);
923 outData[3] = tcu::Vec4( 0.11f, 0.2f, 0.0f, 1.0f);
969 void generateTriangles (int iteration, std::vector<tcu::Vec4>& outData) const;
1001 std::vector<tcu::Vec4> drawBuffer;
1009 const std::vector<tcu::Vec4> colorBuffer (drawBuffer.size(), tcu::Vec4(0.5f, 0.5f, 0.5f, 1.0f));
1120 void FillRuleCase::generateTriangles (int iteration, std::vector<tcu::Vec4>& outData) const
1152 outData[6 * (col * numRows + row) + 0] = tcu::Vec4(quad[0].x(), quad[0].y(), 0.0f, 1.0f);
1153 outData[6 * (col * numRows + row) + 1] = tcu::Vec4(quad[1].x(), quad[1].y(), 0.0f, 1.0f);
1154 outData[6 * (col * numRows + row) + 2] = tcu::Vec4(quad[2].x(), quad[2].y(), 0.0f, 1.0f);
1155 outData[6 * (col * numRows + row) + 3] = tcu::Vec4(quad[2].x(), quad[2].y(), 0.0f, 1.0f);
1156 outData[6 * (col * numRows + row) + 4] = tcu::Vec4(quad[0].x(), quad[0].y(), 0.0f, 1.0f);
1157 outData[6 * (col * numRows + row) + 5] = tcu::Vec4(quad[3].x(), quad[3].y(), 0.0f, 1.0f);
1161 outData[6 * (col * numRows + row) + 0] = tcu::Vec4(quad[0].x(), quad[0].y(), 0.0f, 1.0f);
1162 outData[6 * (col * numRows + row) + 1] = tcu::Vec4(quad[1].x(), quad[1].y(), 0.0f, 1.0f);
1163 outData[6 * (col * numRows + row) + 2] = tcu::Vec4(quad[2].x(), quad[2].y(), 0.0f, 1.0f);
1164 outData[6 * (col * numRows + row) + 3] = tcu::Vec4(quad[0].x(), quad[0].y(), 0.0f, 1.0f);
1165 outData[6 * (col * numRows + row) + 4] = tcu::Vec4(quad[2].x(), quad[2].y(), 0.0f, 1.0f);
1166 outData[6 * (col * numRows + row) + 5] = tcu::Vec4(quad[3].x(), quad[3].y(), 0.0f, 1.0f);
1175 outData[6 * (col * numRows + row) + 0] = tcu::Vec4(quad[0].x() * w0, quad[0].y() * w0, 0.0f, w0);
1176 outData[6 * (col * numRows + row) + 1] = tcu::Vec4(quad[1].x() * w1, quad[1].y() * w1, 0.0f, w1);
1177 outData[6 * (col * numRows + row) + 2] = tcu::Vec4(quad[2].x() * w2, quad[2].y() * w2, 0.0f, w2);
1178 outData[6 * (col * numRows + row) + 3] = tcu::Vec4(quad[2].x() * w2, quad[2].y() * w2, 0.0f, w2);
1179 outData[6 * (col * numRows + row) + 4] = tcu::Vec4(quad[0].x() * w0, quad[0].y() * w0, 0.0f, w0);
1180 outData[6 * (col * numRows + row) + 5] = tcu::Vec4(quad[3].x() * w3, quad[3].y() * w3, 0.0f, w3);
1206 outData[0] = tcu::Vec4(quad[0].x(), quad[0].y(), 0.0f, 1.0f);
1207 outData[1] = tcu::Vec4(quad[1].x(), quad[1].y(), 0.0f, 1.0f);
1208 outData[2] = tcu::Vec4(quad[2].x(), quad[2].y(), 0.0f, 1.0f);
1209 outData[3] = tcu::Vec4(quad[2].x(), quad[2].y(), 0.0f, 1.0f);
1210 outData[4] = tcu::Vec4(quad[0].x(), quad[0].y(), 0.0f, 1.0f);
1211 outData[5] = tcu::Vec4(quad[3].x(), quad[3].y(), 0.0f, 1.0f);
1228 void generateVertices (std::vector<tcu::Vec4>& outData) const;
1229 void extractTriangles (std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles, const std::vector<tcu::Vec4>& vertices) const;
1230 bool triangleOrder (const tcu::Vec4& v0, const tcu::Vec4& v1, const tcu::Vec4& v2) const;
1252 std::vector<tcu::Vec4> drawBuffer;
1296 void CullingTest::generateVertices (std::vector<tcu::Vec4>& outData) const
1310 void CullingTest::extractTriangles (std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles, const std::vector<tcu::Vec4>& vertices) const
1324 const tcu::Vec4& v0 = vertices[vtxNdx + 0];
1325 const tcu::Vec4& v1 = vertices[vtxNdx + 1];
1326 const tcu::Vec4& v2 = vertices[vtxNdx + 2];
1345 const tcu::Vec4& v0 = vertices[vtxNdx + 0];
1346 const tcu::Vec4& v1 = vertices[vtxNdx + 1];
1347 const tcu::Vec4& v2 = vertices[vtxNdx + 2];
1366 const tcu::Vec4& v0 = vertices[0];
1367 const tcu::Vec4& v1 = vertices[vtxNdx + 0];
1368 const tcu::Vec4& v2 = vertices[vtxNdx + 1];
1388 bool CullingTest::triangleOrder (const tcu::Vec4& v0, const tcu::Vec4& v1, const tcu::Vec4& v2) const
1406 void generateVertices (int iteration, std::vector<tcu::Vec4>& outVertices, std::vector<tcu::Vec4>& outColors) const;
1407 void extractTriangles (std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles, const std::vector<tcu::Vec4>& vertices, const std::vector<tcu::Vec4>& colors) const;
1437 std::vector<tcu::Vec4> drawBuffer;
1438 std::vector<tcu::Vec4> colorBuffer;
1486 void TriangleInterpolationTest::generateVertices (int iteration, std::vector<tcu::Vec4>& outVertices, std::vector<tcu::Vec4>& outColors) const
1489 const tcu::Vec4 colors[] =
1491 tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f),
1492 tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f),
1493 tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f),
1523 void TriangleInterpolationTest::extractTriangles (std::vector<TriangleSceneSpec::SceneTriangle>& outTriangles, const std::vector<tcu::Vec4>& vertices, const std::vector<tcu::Vec4>& colors) const
1603 void generateVertices (int iteration, std::vector<tcu::Vec4>& outVertices, std::vector<tcu::Vec4>& outColors) const;
1604 void extractLines (std::vector<LineSceneSpec::SceneLine>& outLines, const std::vector<tcu::Vec4>& vertices, const std::vector<tcu::Vec4>& colors) const;
1634 std::vector<tcu::Vec4> drawBuffer;
1635 std::vector<tcu::Vec4> colorBuffer;
1713 void LineInterpolationTest::generateVertices (int iteration, std::vector<tcu::Vec4>& outVertices, std::vector<tcu::Vec4>& outColors) const
1716 const tcu::Vec4 colors[] =
1718 tcu::Vec4(1.0f, 0.0f, 0.0f, 1.0f),
1719 tcu::Vec4(0.0f, 1.0f, 0.0f, 1.0f),
1720 tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f),
1750 void LineInterpolationTest::extractLines (std::vector<LineSceneSpec::SceneLine>& outLines, const std::vector<tcu::Vec4>& vertices, const std::vector<tcu::Vec4>& colors) const