Home | History | Annotate | Download | only in stress

Lines Matching defs:gl

316 	glu::CallLogWrapper gl				(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
317 const int positionLoc = gl.glGetAttribLocation(m_program->getProgram(), "a_position");
318 const int colorLoc = gl.glGetAttribLocation(m_program->getProgram(), "a_color");
319 const int colorUniformLoc = gl.glGetUniformLocation(m_program->getProgram(), "u_color");
321 gl.enableLogging(true);
323 gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
324 gl.glClear(GL_COLOR_BUFFER_BIT);
325 gl.glViewport(0, 0, dst.getWidth(), dst.getHeight());
326 gl.glBindVertexArray(m_vao);
327 GLU_EXPECT_NO_ERROR(gl.glGetError(), "set vao");
329 gl.glUseProgram(m_program->getProgram());
330 GLU_EXPECT_NO_ERROR(gl.glGetError(), "use program");
334 gl.glBindVertexBuffer(3, m_buf, m_spec.bufferOffset, m_spec.bufferStride);
336 gl.glVertexAttribBinding(positionLoc, 3);
337 gl.glVertexAttribFormat(positionLoc, 4, GL_FLOAT, GL_FALSE, m_spec.positionAttrOffset);
338 gl.glEnableVertexAttribArray(positionLoc);
340 gl.glVertexAttribBinding(colorLoc, 3);
341 gl.glVertexAttribFormat(colorLoc, 4, GL_FLOAT, GL_FALSE, m_spec.colorAttrOffset);
342 gl.glEnableVertexAttribArray(colorLoc);
344 GLU_EXPECT_NO_ERROR(gl.glGetError(), "set va");
346 gl.glDrawArrays(GL_TRIANGLES, 0, GRID_SIZE*GRID_SIZE*6);
347 GLU_EXPECT_NO_ERROR(gl.glGetError(), "draw");
351 gl.glBindVertexBuffer(3, m_buf, m_spec.bufferOffset, m_spec.bufferStride);
352 gl.glVertexAttribBinding(positionLoc, 3);
353 gl.glVertexAttribFormat(positionLoc, 4, GL_FLOAT, GL_FALSE, m_spec.positionAttrOffset);
354 gl.glEnableVertexAttribArray(positionLoc);
356 GLU_EXPECT_NO_ERROR(gl.glGetError(), "set va");
357 gl.glUniform4f(colorUniformLoc, 0.0f, 1.0f, 0.0f, 1.0f);
359 gl.glDrawArrays(GL_TRIANGLES, 0, GRID_SIZE*GRID_SIZE*6);
360 GLU_EXPECT_NO_ERROR(gl.glGetError(), "draw");
363 gl.glFinish();
364 gl.glBindVertexArray(0);
365 gl.glUseProgram(0);
366 GLU_EXPECT_NO_ERROR(gl.glGetError(), "clean");
442 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
473 gl.genBuffers(1, &m_buf);
474 gl.bindBuffer(GL_ARRAY_BUFFER, m_buf);
475 gl.bufferData(GL_ARRAY_BUFFER, (glw::GLsizeiptr)dataBuf.size(), &dataBuf[0], GL_STATIC_DRAW);
476 gl.bindBuffer(GL_ARRAY_BUFFER, 0);
478 if (gl.getError() != GL_NO_ERROR)
547 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
550 gl.genBuffers(1, &m_buffer);
551 gl.bindBuffer(GL_ARRAY_BUFFER, m_buffer);
552 gl.bufferData(GL_ARRAY_BUFFER, int(m_drawCount * sizeof(tcu::Vec4)), &data[0], GL_STATIC_DRAW);
553 GLU_EXPECT_NO_ERROR(gl.getError(), "buffer gen");
577 glu::CallLogWrapper gl (m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
578 const deInt32 positionLoc = gl.glGetAttribLocation(m_program->getProgram(), "a_position");
582 gl.enableLogging(true);
584 gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
585 gl.glClear(GL_COLOR_BUFFER_BIT);
586 GLU_EXPECT_NO_ERROR(gl.glGetError(), "setup");
588 gl.glUseProgram(m_program->getProgram());
589 GLU_EXPECT_NO_ERROR(gl.glGetError(), "use program");
591 gl.glBindVertexArray(*vao);
592 gl.glEnableVertexAttribArray(positionLoc);
593 gl.glVertexAttribFormat(positionLoc, 4, GL_FLOAT, GL_FALSE, 0);
594 gl.glVertexAttribBinding(positionLoc, 0);
595 gl.glBindVertexBuffer(0, m_buffer, m_offset, int(sizeof(tcu::Vec4)));
596 GLU_EXPECT_NO_ERROR(gl.glGetError(), "set buffer");
598 gl.glDrawArrays(GL_POINTS, 0, m_drawCount);
602 const deUint32 error = gl.glGetError();
609 gl.glFinish();