Home | History | Annotate | Download | only in functional

Lines Matching refs:gl

68 	const glw::Functions&		gl				= renderCtx.getFunctions();
97 gl.useProgram(program.getProgram());
98 gl.enable(GL_DEPTH_TEST);
99 gl.depthFunc(GL_ALWAYS);
100 gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
101 gl.viewport(0, 0, size.x()*2, size.y()*2); // Oversized viewport so that it will not accidentally limit us to the correct size
107 TCU_CHECK(gl.checkFramebufferStatus(GL_DRAW_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
124 gl.genQueries(1, &query);
125 gl.genVertexArrays(1, &vertexArray);
126 gl.bindVertexArray(vertexArray);
128 gl.genBuffers(1, &vertexBuffer);
129 gl.bindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
130 gl.bufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW);
132 gl.enableVertexAttribArray(0);
133 gl.vertexAttribPointer(0, 2, GL_FLOAT, false, 0, DE_NULL);
135 gl.uniform2i(0, size.x()-1, size.y()-1);
136 gl.beginQuery(GL_ANY_SAMPLES_PASSED, query);
137 gl.drawArrays(GL_TRIANGLES, 0, 6);
138 gl.endQuery(GL_ANY_SAMPLES_PASSED);
139 gl.getQueryObjectuiv(query, GL_QUERY_RESULT, &insidePassed);
143 gl.uniform2i(0, size.x(), size.y()-1);
144 gl.beginQuery(GL_ANY_SAMPLES_PASSED, query);
145 gl.drawArrays(GL_TRIANGLES, 0, 6);
146 gl.endQuery(GL_ANY_SAMPLES_PASSED);
147 gl.getQueryObjectuiv(query, GL_QUERY_RESULT, &outsideXPassed);
151 gl.uniform2i(0, size.x()-1, size.y());
152 gl.beginQuery(GL_ANY_SAMPLES_PASSED, query);
153 gl.drawArrays(GL_TRIANGLES, 0, 6);
154 gl.endQuery(GL_ANY_SAMPLES_PASSED);
155 gl.getQueryObjectuiv(query, GL_QUERY_RESULT, &outsideYPassed);
159 gl.disableVertexAttribArray(0);
160 gl.bindBuffer(GL_ARRAY_BUFFER, 0);
161 gl.bindVertexArray(0);
162 gl.deleteBuffers(1, &vertexBuffer);
163 gl.deleteVertexArrays(1, &vertexArray);
166 gl.deleteQueries(1, &query);
168 GLU_EXPECT_NO_ERROR(gl.getError(), "Query failed");
175 const glw::Functions& gl = renderCtx.getFunctions();
199 gl.useProgram(program.getProgram());
200 gl.enable(GL_DEPTH_TEST);
201 gl.depthFunc(GL_ALWAYS);
202 gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
203 gl.viewport(0, 0, size.x(), size.y());
205 TCU_CHECK(gl.checkFramebufferStatus(GL_DRAW_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
224 gl.genQueries(1, &query);
225 gl.genVertexArrays(1, &vertexArray);
226 gl.bindVertexArray(vertexArray);
228 gl.genBuffers(1, &vertexBuffer);
229 gl.bindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
230 gl.bufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW);
232 gl.enableVertexAttribArray(0);
233 gl.vertexAttribPointer(0, 2, GL_FLOAT, false, 0, DE_NULL);
235 gl.beginQuery(GL_ANY_SAMPLES_PASSED, query);
236 gl.drawArrays(GL_TRIANGLES, 0, 6);
237 gl.endQuery(GL_ANY_SAMPLES_PASSED);
239 gl.disableVertexAttribArray(0);
240 gl.bindBuffer(GL_ARRAY_BUFFER, 0);
241 gl.bindVertexArray(0);
242 gl.deleteBuffers(1, &vertexBuffer);
243 gl.deleteVertexArrays(1, &vertexArray);
250 gl.getQueryObjectuiv(query, GL_QUERY_RESULT, &passed);
251 gl.deleteQueries(1, &query);
253 GLU_EXPECT_NO_ERROR(gl.getError(), "Query failed");
290 const glw::Functions& gl = m_renderCtx.getFunctions();
293 gl.genFramebuffers(1, &framebuffer);
294 gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
296 m_results.check(gl.checkFramebufferStatus(GL_DRAW_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE, "Framebuffer was incorrectly reported as complete when it had no width, height or attachments");
298 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_WIDTH, 16);
299 m_results.check(gl.checkFramebufferStatus(GL_DRAW_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE, "Framebuffer was incorrectly reported as complete when it only had a width");
301 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_HEIGHT, 16);
302 m_results.check(gl.checkFramebufferStatus(GL_DRAW_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Framebuffer not reported as complete when it had width and height set");
304 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_WIDTH, 0);
305 m_results.check(gl.checkFramebufferStatus(GL_DRAW_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE, "Framebuffer was incorrectly reported as complete when it only had a height");
307 gl.deleteFramebuffers(1, &framebuffer);
361 const glw::Functions& gl = m_renderCtx.getFunctions();
368 gl.genFramebuffers(1, &framebuffer);
369 gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
370 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_WIDTH, width);
371 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_HEIGHT, height);
372 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_SAMPLES, samples);
381 gl.deleteFramebuffers(1, &framebuffer);
392 const glw::Functions& gl = m_renderCtx.getFunctions();
395 gl.getIntegerv(GL_MAX_FRAMEBUFFER_WIDTH, &width);
407 const glw::Functions& gl = m_renderCtx.getFunctions();
410 gl.getIntegerv(GL_MAX_FRAMEBUFFER_HEIGHT, &height);
422 const glw::Functions& gl = m_renderCtx.getFunctions();
425 gl.getIntegerv(GL_MAX_FRAMEBUFFER_SAMPLES, &samples);
465 const glw::Functions& gl = m_renderCtx.getFunctions();
470 gl.genFramebuffers(1, &framebuffer);
471 gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
472 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_WIDTH, m_defaultSpec.width);
473 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_HEIGHT, m_defaultSpec.height);
474 gl.framebufferParameteri(GL_DRAW_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_SAMPLES, m_defaultSpec.samples);
476 gl.genRenderbuffers(1, &renderbuffer);
477 gl.bindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
478 gl.renderbufferStorageMultisample(GL_RENDERBUFFER, m_attachmentSpec.samples, GL_RGBA8, m_attachmentSpec.width, m_attachmentSpec.height);
479 gl.framebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer);
490 gl.deleteRenderbuffers(1, &renderbuffer);
491 gl.deleteFramebuffers(1, &framebuffer);