Lines Matching refs:QuadGrid
132 // QuadGrid.
134 class QuadGrid
137 QuadGrid (int gridSize, int screenWidth, int screenHeight, const Vec4& constCoords, const vector<Mat4>& userAttribTransforms, const vector<TextureBinding>& textures);
138 ~QuadGrid (void);
177 QuadGrid::QuadGrid (int gridSize, int width, int height, const Vec4& constCoords, const vector<Mat4>& userAttribTransforms, const vector<TextureBinding>& textures)
239 QuadGrid::~QuadGrid (void)
243 inline Vec4 QuadGrid::getCoords (float sx, float sy) const
250 inline Vec4 QuadGrid::getUnitCoords (float sx, float sy) const
255 inline Vec4 QuadGrid::getUserAttrib (int attribNdx, float sx, float sy) const
263 ShaderEvalContext::ShaderEvalContext (const QuadGrid& quadGrid_)
266 , quadGrid (quadGrid_)
268 const vector<TextureBinding>& bindings = quadGrid.getTextures();
304 coords = quadGrid.getCoords(sx, sy);
305 unitCoords = quadGrid.getUnitCoords(sx, sy);
308 int numAttribs = quadGrid.getNumUserAttribs();
311 in[attribNdx] = quadGrid.getUserAttrib(attribNdx, sx, sy);
436 QuadGrid quadGrid(m_isVertexCase ? GRID_SIZE : 4, width, height, Vec4(0.125f, 0.25f, 0.5f, 1.0f), m_userAttribTransforms, m_textures);
440 render(resImage, programID, quadGrid);
445 computeVertexReference(refImage, quadGrid);
447 computeFragmentReference(refImage, quadGrid);
540 static void getDefaultVertexArrays (const glw::Functions& gl, const QuadGrid& quadGrid, deUint32 program, vector<VertexArrayBinding>& vertexArrays)
542 const int numElements = quadGrid.getNumVertices();
544 vertexArrays.push_back(va::Float("a_position", 4, numElements, 0, (const float*)quadGrid.getPositions()));
545 quadGrid.getCoords()));
546 vertexArrays.push_back(va::Float("a_unitCoords", 4, numElements, 0, (const float*)quadGrid.getUnitCoords()));
547 vertexArrays.push_back(va::Float("a_one", 1, numElements, 0, quadGrid.getAttribOne()));
550 for (int userNdx = 0; userNdx < quadGrid.getNumUserAttribs(); userNdx++)
553 vertexArrays.push_back(va::Float(name, 4, numElements, 0, (const float*)quadGrid.getUserAttrib(userNdx)));
586 vertexArrays.push_back(va::Float(loc+colNdx, numRows, numElements, 4*(int)sizeof(float), (const float*)quadGrid.getUserAttrib(colNdx)));
590 void ShaderRenderCase::render (Surface& result, int programID, const QuadGrid& quadGrid)
612 setupUniforms(programID, quadGrid.getConstCoords());
622 const int numElements = quadGrid.getNumTriangles()*3;
624 getDefaultVertexArrays(gl, quadGrid, programID, vertexArrays);
625 draw(m_renderCtx, programID, (int)vertexArrays.size(), &vertexArrays[0], pr::Triangles(numElements, quadGrid.getIndices()));
635 void ShaderRenderCase::computeVertexReference (Surface& result, const QuadGrid& quadGrid)
640 int gridSize = quadGrid.getGridSize();
643 ShaderEvalContext evalCtx (quadGrid);
722 void ShaderRenderCase::computeFragmentReference (Surface& result, const QuadGrid& quadGrid)
728 ShaderEvalContext evalCtx (quadGrid);