Lines Matching defs:gl

97 static void uniformNfv (const glw::Functions& gl, int n, int location, int count, const float* data)
101 case 1: gl.uniform1fv(location, count, data); break;
102 case 2: gl.uniform2fv(location, count, data); break;
103 case 3: gl.uniform3fv(location, count, data); break;
104 case 4: gl.uniform4fv(location, count, data); break;
109 static void uniformNiv (const glw::Functions& gl, int n, int location, int count, const int* data)
113 case 1: gl.uniform1iv(location, count, data); break;
114 case 2: gl.uniform2iv(location, count, data); break;
115 case 3: gl.uniform3iv(location, count, data); break;
116 case 4: gl.uniform4iv(location, count, data); break;
121 static void uniformMatrixNfv (const glw::Functions& gl, int n, int location, int count, const float* data)
125 case 2: gl.uniformMatrix2fv(location, count, GL_FALSE, &data[0]); break;
126 case 3: gl.uniformMatrix3fv(location, count, GL_FALSE, &data[0]); break;
127 case 4: gl.uniformMatrix4fv(location, count, GL_FALSE, &data[0]); break;
628 const glw::Functions& gl = m_renderCtx.getFunctions();
643 gl.deleteBuffers((glw::GLsizei)m_attribBuffers.size(), &m_attribBuffers[0]);
645 gl.genBuffers((glw::GLsizei)m_attribBuffers.size(), &m_attribBuffers[0]);
646 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenBuffers()");
653 gl.bindBuffer(GL_ARRAY_BUFFER, m_attribBuffers[attribNdx]);
654 gl.bufferData(GL_ARRAY_BUFFER, (glw::GLsizeiptr)(vertices.size()*sizeof(float)), &vertices[0], GL_STATIC_DRAW);
655 GLU_EXPECT_NO_ERROR(gl.getError(), "Upload buffer data");
661 int location = gl.getAttribLocation(program.getProgram(), attributes[attribNdx].name.c_str());
665 gl.enableVertexAttribArray(location);
666 gl.bindBuffer(GL_ARRAY_BUFFER, m_attribBuffers[attribNdx]);
667 gl.vertexAttribPointer(location, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL);
670 GLU_EXPECT_NO_ERROR(gl.getError(), "Setup vertex input state");
672 gl.useProgram(program.getProgram());
674 gl.viewport(0, 0, m_viewportWidth, m_viewportHeight);
780 const glw::Functions& gl = m_renderCtx.getFunctions();
790 gl.enable(GL_BLEND);
791 gl.blendEquation(GL_FUNC_ADD);
792 gl.blendFunc(GL_ONE, GL_ONE);
845 const glw::Functions& gl = m_renderCtx.getFunctions();
849 gl.drawArrays(GL_TRIANGLES, 0, numVertices);
1310 const glw::Functions& gl = m_renderCtx.getFunctions();
1311 gl.uniform1f(gl.getUniformLocation(program, "u_zero"), 0.0f);
1316 const glw::Functions& gl = m_renderCtx.getFunctions();
1317 gl.uniform1i(gl.getUniformLocation(program, "u_numLoopIterations"), numLoopIterations);
1782 const glw::Functions& gl = m_renderCtx.getFunctions();
1784 gl.uniform1f(gl.getUniformLocation(program, "u_zero"), 0.0f);
1792 const int location = gl.getUniformLocation(program, (string() + "u_inc" + (char)('A'+paramNdx)).c_str());
1799 uniformNfv(gl, scalarSize, location, 1, &values[0]);
1806 uniformNiv(gl, scalarSize, location, 1, &values[0]);
1813 uniformNiv(gl, scalarSize, location, 1, &values[0]);
1822 uniformMatrixNfv(gl, size, location, 1, &values[0]);
1832 const glw::Functions& gl = m_renderCtx.getFunctions();
1833 const int loc = gl.getUniformLocation(program, "u_numLoopIterations");
1835 gl.uniform1i(loc, numLoopIterations);