Lines Matching defs:gl

57 static int getInteger (const glw::Functions& gl, deUint32 pname)
60 gl.getIntegerv(pname, &value);
61 GLU_EXPECT_NO_ERROR(gl.getError(), ("glGetIntegerv(" + glu::getGettableStateStr((int)pname).toString() + ")").c_str());
66 static int getInteger (const glw::Functions& gl)
68 return getInteger(gl, Pname);
71 static int getVectorsFromComps (const glw::Functions& gl, deUint32 pname)
74 gl.getIntegerv(pname, &value);
75 GLU_EXPECT_NO_ERROR(gl.getError(), ("glGetIntegerv(" + glu::getGettableStateStr((int)pname).toString() + ")").c_str());
81 static int getVectorsFromComps (const glw::Functions& gl)
83 return getVectorsFromComps(gl, Pname);
89 typedef int (*GetConstantValueFunc) (const glw::Functions& gl);
256 const glw::Functions& gl = m_renderCtx.getFunctions();
267 gl.depthRangef(m_depthRange.zNear, m_depthRange.zFar);
268 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthRangef()");
296 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
337 const int scaleLoc = gl.getUniformLocation(program.getProgram(), "u_scale");
340 gl.useProgram(program.getProgram());
341 gl.uniform3fv(scaleLoc, 1, scale.getPtr());
347 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");
393 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
436 gl.useProgram(program.getProgram());
442 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");
483 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
497 gl.getFloatv(GL_ALIASED_POINT_SIZE_RANGE, &pointSizeRange[0]);
498 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE)");
541 gl.viewport(viewportX, viewportY, width, height);
542 gl.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
543 gl.clear(GL_COLOR_BUFFER_BIT);
545 gl.useProgram(program.getProgram());
551 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");
607 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
655 gl.useProgram(program.getProgram());
657 gl.viewport(viewportX, viewportY, width/2, height);
661 gl.viewport(viewportX + width/2, viewportY, width-width/2, height);
666 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");
740 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
791 gl.genBuffers(1, &m_positionBuffer);
792 gl.genBuffers(1, &m_elementBuffer);
964 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
979 const int posLoc = gl.getAttribLocation(m_program->getProgram(), "a_position");
980 const int colorsLoc = gl.getUniformLocation(m_program->getProgram(), "u_colors[0]");
984 gl.viewport (viewportX, viewportY, viewportW, viewportH);
985 gl.useProgram (m_program->getProgram());
986 gl.bindBuffer (GL_ARRAY_BUFFER, m_positionBuffer);
987 gl.enableVertexAttribArray (posLoc);
988 gl.vertexAttribPointer (posLoc, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL);
989 gl.uniform4fv (colorsLoc, (int)m_colors.size(), (const float*)&m_colors[0]);
992 gl.clearColor (clearColor.x(), clearColor.y(), clearColor.z(), clearColor.w());
993 gl.clear (GL_COLOR_BUFFER_BIT);
1002 gl.bufferData(GL_ARRAY_BUFFER, (int)(m_positions.size()*sizeof(tcu::Vec4)), &m_positions[0], GL_DYNAMIC_DRAW);
1003 gl.drawArrays(GL_TRIANGLES, 0, (int)m_positions.size());
1006 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");
1029 gl.bufferData(GL_ARRAY_BUFFER, (int)(m_positions.size()*sizeof(tcu::Vec4)), &mappedPos[0], GL_DYNAMIC_DRAW);
1030 gl.drawElements(GL_TRIANGLES, (int)indices.size(), GL_UNSIGNED_SHORT, &indices[0]);
1033 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");
1052 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_elementBuffer);
1053 gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, (int)(indices.size()*sizeof(deUint16)), &indices[0], GL_DYNAMIC_DRAW);
1055 gl.bufferData(GL_ARRAY_BUFFER, (int)(m_positions.size()*sizeof(tcu::Vec4)), &mappedPos[0], GL_DYNAMIC_DRAW);
1056 gl.drawElements(GL_TRIANGLES, (int)indices.size(), GL_UNSIGNED_SHORT, DE_NULL);
1059 GLU_EXPECT_NO_ERROR(gl.getError(), "Draw");