Lines Matching refs:gl
55 virtual void renderTest (const glw::Functions& gl);
56 virtual void renderReference (const glw::Functions& gl);
57 virtual void changeState (const glw::Functions& gl) = 0;
73 void RedundantStateChangeCase::renderTest (const glw::Functions& gl) in renderTest() argument
77 changeState(gl); in renderTest()
78 callDraw(gl); in renderTest()
82 void RedundantStateChangeCase::renderReference (const glw::Functions& gl) in renderReference() argument
84 changeState(gl); in renderReference()
87 callDraw(gl); in renderReference()
111 virtual void setupInitialState (const glw::Functions& gl)\
115 virtual void changeState (const glw::Functions& gl)\
140 gl.useProgram(m_programs[0]->getProgram()); in init()
141 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
142 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
143 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
145 gl.enableVertexAttribArray(coordLoc); in init()
146 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
147 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
148 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
149 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
150 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
152 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
153 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
155 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
156 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
158 gl.uniform1i(samplerLoc, 0); in init()
159 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
161 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
162 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
165 gl.enable(GL_BLEND); in init()
177 gl.useProgram(m_programs[0]->getProgram()); in init()
178 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
180 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
181 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
183 gl.enableVertexAttribArray(coordLoc); in init()
184 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
186 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
187 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
188 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
189 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
191 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
192 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
194 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
195 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
197 gl.uniform1i(samplerLoc, 0); in init()
198 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
200 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
201 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
203 gl.depthFunc(GL_LEQUAL); in init()
204 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthFunc()"); in init()
207 gl.enable(GL_DEPTH_TEST); in init()
219 gl.useProgram(m_programs[0]->getProgram()); in init()
220 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
221 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
222 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
224 gl.enableVertexAttribArray(coordLoc); in init()
225 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
226 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
227 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
228 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
229 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
231 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
232 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
234 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
235 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
237 gl.uniform1i(samplerLoc, 0); in init()
238 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
240 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
241 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
243 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
244 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
246 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
247 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
249 gl.clearStencil(0); in init()
250 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
251 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
253 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
256 gl.enable(GL_STENCIL_TEST); in init()
268 gl.useProgram(m_programs[0]->getProgram()); in init()
269 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
270 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
271 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
273 gl.enableVertexAttribArray(coordLoc); in init()
274 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
275 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
276 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
277 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
278 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
280 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
281 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
283 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
284 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
286 gl.uniform1i(samplerLoc, 0); in init()
287 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
289 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
290 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
292 gl.scissor(2, 3, 12, 13); in init()
293 GLU_EXPECT_NO_ERROR(gl.getError(), "glScissor()"); in init()
296 gl.enable(GL_SCISSOR_TEST); in init()
308 gl.useProgram(m_programs[0]->getProgram()); in init()
309 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
310 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
311 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
313 gl.enableVertexAttribArray(coordLoc); in init()
314 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
315 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
316 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
317 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
318 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
320 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
321 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
323 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
324 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
326 gl.uniform1i(samplerLoc, 0); in init()
327 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
329 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
330 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
333 gl.enable(GL_DITHER); in init()
345 gl.useProgram(m_programs[0]->getProgram()); in init()
346 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
347 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
348 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
350 gl.enableVertexAttribArray(coordLoc); in init()
351 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
352 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
353 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
354 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
355 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
357 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
358 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
360 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
361 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
363 gl.uniform1i(samplerLoc, 0); in init()
364 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
366 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
367 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
369 gl.frontFace(GL_CW); in init()
370 GLU_EXPECT_NO_ERROR(gl.getError(), "glFrontFace()"); in init()
372 gl.cullFace(GL_FRONT); in init()
373 GLU_EXPECT_NO_ERROR(gl.getError(), "glCullFace()"); in init()
376 gl.enable(GL_CULL_FACE); in init()
388 gl.useProgram(m_programs[0]->getProgram()); in init()
389 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
390 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
391 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
393 gl.enableVertexAttribArray(coordLoc); in init()
394 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
395 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
396 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
397 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
398 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
400 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
401 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
403 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
404 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
406 gl.uniform1i(samplerLoc, 0); in init()
407 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
409 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
410 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
412 gl.enable(GL_DEPTH_TEST); in init()
413 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
416 gl.depthFunc(GL_GEQUAL); in init()
429 gl.useProgram(m_programs[0]->getProgram()); in init()
430 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
431 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
432 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
434 gl.enableVertexAttribArray(coordLoc); in init()
435 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
436 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
437 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
438 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
439 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
441 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
442 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
444 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
445 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
447 gl.uniform1i(samplerLoc, 0); in init()
448 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
450 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
451 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
453 gl.enable(GL_DEPTH_TEST); in init()
454 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
456 gl.depthFunc(GL_LEQUAL); in init()
457 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthFunc()"); in init()
460 gl.depthMask(GL_FALSE); in init()
472 gl.useProgram(m_programs[0]->getProgram()); in init()
473 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
474 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
475 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
477 gl.enableVertexAttribArray(coordLoc); in init()
478 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
479 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
480 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
481 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
482 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
484 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
485 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
487 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
488 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
490 gl.uniform1i(samplerLoc, 0); in init()
491 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
493 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
494 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
497 gl.depthRangef(0.0f, 1.0f); in init()
509 gl.useProgram(m_programs[0]->getProgram()); in init()
510 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
511 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
512 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
514 gl.enableVertexAttribArray(coordLoc); in init()
515 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
516 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
517 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
518 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
519 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
521 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
522 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
524 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
525 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
527 gl.uniform1i(samplerLoc, 0); in init()
528 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
530 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
531 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
533 gl.enable(GL_BLEND); in init()
534 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
537 gl.blendEquation(GL_FUNC_SUBTRACT); in init()
549 gl.useProgram(m_programs[0]->getProgram()); in init()
550 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
551 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
552 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
554 gl.enableVertexAttribArray(coordLoc); in init()
555 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
556 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
557 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
558 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
559 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
561 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
562 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
564 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
565 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
567 gl.uniform1i(samplerLoc, 0); in init()
568 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
570 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
571 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
573 gl.enable(GL_BLEND); in init()
574 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
577 gl.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); in init()
589 gl.useProgram(m_programs[0]->getProgram()); in init()
590 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
591 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
592 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
594 gl.enableVertexAttribArray(coordLoc); in init()
595 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
596 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
597 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
598 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
599 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
601 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
602 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
604 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
605 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
607 gl.uniform1i(samplerLoc, 0); in init()
608 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
610 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
611 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
613 gl.enable(GL_POLYGON_OFFSET_FILL); in init()
614 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
617 gl.polygonOffset(0.0f, 0.0f); in init()
629 gl.useProgram(m_programs[0]->getProgram()); in init()
630 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
631 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
632 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
634 gl.enableVertexAttribArray(coordLoc); in init()
635 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
636 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
637 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
638 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
639 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
641 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
642 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
644 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
645 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
647 gl.uniform1i(samplerLoc, 0); in init()
648 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
650 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
651 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
654 gl.sampleCoverage(0.25f, GL_TRUE); in init()
666 gl.useProgram(m_programs[0]->getProgram()); in init()
667 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
668 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
669 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
671 gl.enableVertexAttribArray(coordLoc); in init()
672 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
673 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
674 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
675 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
676 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
678 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
679 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
681 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
682 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
684 gl.uniform1i(samplerLoc, 0); in init()
685 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
687 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
688 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
691 gl.viewport(10, 11, 5, 6); in init()
703 gl.useProgram(m_programs[0]->getProgram()); in init()
704 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
705 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
706 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
708 gl.enableVertexAttribArray(coordLoc); in init()
709 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
710 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
711 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
712 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
713 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
715 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
716 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
718 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
719 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
721 gl.uniform1i(samplerLoc, 0); in init()
722 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
724 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
725 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
727 gl.enable(GL_SCISSOR_TEST); in init()
728 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
731 gl.scissor(17, 13, 5, 8); in init()
743 gl.useProgram(m_programs[0]->getProgram()); in init()
744 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
745 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
746 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
748 gl.enableVertexAttribArray(coordLoc); in init()
749 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
750 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
751 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
752 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
753 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
755 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
756 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
758 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
759 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
761 gl.uniform1i(samplerLoc, 0); in init()
762 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
764 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
765 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
768 gl.colorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_FALSE); in init()
780 gl.useProgram(m_programs[0]->getProgram()); in init()
781 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
782 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
783 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
785 gl.enableVertexAttribArray(coordLoc); in init()
786 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
787 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
788 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
789 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
790 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
792 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
793 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
795 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
796 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
798 gl.uniform1i(samplerLoc, 0); in init()
799 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
801 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
802 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
804 gl.enable(GL_CULL_FACE); in init()
805 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
808 gl.cullFace(GL_FRONT); in init()
820 gl.useProgram(m_programs[0]->getProgram()); in init()
821 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
822 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
823 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
825 gl.enableVertexAttribArray(coordLoc); in init()
826 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
827 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
828 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
829 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
830 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
832 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
833 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
835 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
836 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
838 gl.uniform1i(samplerLoc, 0); in init()
839 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
841 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
842 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
844 gl.enable(GL_CULL_FACE); in init()
845 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
848 gl.frontFace(GL_CCW); in init()
860 gl.useProgram(m_programs[0]->getProgram()); in init()
861 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
862 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
863 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
865 gl.enableVertexAttribArray(coordLoc); in init()
866 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
867 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
868 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
869 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
870 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
872 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
873 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
875 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
876 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
878 gl.uniform1i(samplerLoc, 0); in init()
879 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
881 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
882 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
884 gl.enable(GL_STENCIL_TEST); in init()
885 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
887 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
888 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
890 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
891 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
893 gl.clearStencil(0); in init()
894 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
895 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
896 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
899 gl.stencilMask(0xDD); in init()
911 gl.useProgram(m_programs[0]->getProgram()); in init()
912 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
913 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
914 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
916 gl.enableVertexAttribArray(coordLoc); in init()
917 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
918 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
919 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
920 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
921 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
923 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
924 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
926 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
927 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
929 gl.uniform1i(samplerLoc, 0); in init()
930 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
932 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
933 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
935 gl.enable(GL_STENCIL_TEST); in init()
936 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
938 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
939 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
940 gl.clearStencil(0); in init()
941 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
942 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
943 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
946 gl.stencilFunc(GL_LEQUAL, 0, 0xFF); in init()
958 gl.useProgram(m_programs[0]->getProgram()); in init()
959 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
960 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
961 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
963 gl.enableVertexAttribArray(coordLoc); in init()
964 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
965 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
966 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
967 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
968 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
970 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
971 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
973 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
974 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
976 gl.uniform1i(samplerLoc, 0); in init()
977 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
979 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
980 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
982 gl.enable(GL_STENCIL_TEST); in init()
983 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
985 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
986 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
988 gl.clearStencil(0); in init()
989 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
991 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
992 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
995 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1007 gl.bindAttribLocation(m_programs[0]->getProgram(), 0, "a_coord"); in init()
1008 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindAttribLocation()"); in init()
1009 gl.linkProgram(m_programs[0]->getProgram()); in init()
1010 GLU_EXPECT_NO_ERROR(gl.getError(), "glLinkProgram()"); in init()
1012 gl.useProgram(m_programs[0]->getProgram()); in init()
1013 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1015 gl.enableVertexAttribArray(0); in init()
1016 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1017 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1018 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1019 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1020 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1022 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1023 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1025 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1026 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1028 gl.uniform1i(samplerLoc, 0); in init()
1029 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1031 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1032 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1035 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1036 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1049 gl.useProgram(m_programs[0]->getProgram()); in init()
1050 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1051 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1052 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1054 gl.enableVertexAttribArray(coordLoc); in init()
1055 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1056 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1057 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1058 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1059 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1061 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1062 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1064 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1065 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1067 gl.uniform1i(samplerLoc, 0); in init()
1068 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1070 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1071 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1073 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1074 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1077 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1089 gl.useProgram(m_programs[0]->getProgram()); in init()
1090 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1091 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1092 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1094 gl.enableVertexAttribArray(coordLoc); in init()
1095 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1096 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1097 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1098 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1099 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1101 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1102 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1104 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1105 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1107 gl.uniform1i(samplerLoc, 0); in init()
1108 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1110 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1111 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1114 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1126 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1127 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1129 gl.enableVertexAttribArray(coordLoc); in init()
1130 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1131 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1132 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1133 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1134 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1136 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1137 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1139 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1140 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1141 gl.useProgram(m_programs[0]->getProgram()); in init()
1142 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1143 gl.uniform1i(samplerLoc, 0); in init()
1144 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1146 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1147 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1150 gl.useProgram(m_programs[0]->getProgram()); in init()
1162 gl.useProgram(m_programs[0]->getProgram()); in init()
1163 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1164 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1165 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1167 gl.enableVertexAttribArray(coordLoc); in init()
1168 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1169 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1170 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1171 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1172 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1174 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1175 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1177 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1178 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1180 gl.uniform1i(samplerLoc, 0); in init()
1181 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1183 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1184 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1187 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); in init()
1199 gl.useProgram(m_programs[0]->getProgram()); in init()
1200 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1201 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1202 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1204 gl.enableVertexAttribArray(coordLoc); in init()
1205 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1206 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1207 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1208 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1209 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1211 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1212 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1214 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1215 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1217 gl.uniform1i(samplerLoc, 0); in init()
1218 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1220 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1221 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1224 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); in init()
1236 gl.useProgram(m_programs[0]->getProgram()); in init()
1237 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1238 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1239 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1241 gl.enableVertexAttribArray(coordLoc); in init()
1242 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1243 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1244 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1245 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1246 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1248 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1249 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1251 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1252 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1254 gl.uniform1i(samplerLoc, 0); in init()
1255 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1257 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1258 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1261 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in init()
1274 gl.useProgram(m_programs[0]->getProgram()); in init()
1275 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1276 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1277 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1279 gl.enableVertexAttribArray(coordLoc); in init()
1280 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1281 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1282 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1283 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1284 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1286 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1287 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1289 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1290 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1292 gl.uniform1i(samplerLoc, 0); in init()
1293 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1295 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1296 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1298 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1299 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindFramebuffer()"); in init()
1302 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1314 gl.useProgram(m_programs[0]->getProgram()); in init()
1315 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1316 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1317 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1319 gl.enableVertexAttribArray(coordLoc); in init()
1320 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1321 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1322 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1323 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1324 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1326 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1327 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1329 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1330 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1332 gl.uniform1i(samplerLoc, 0); in init()
1333 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1335 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1336 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1338 gl.enable(GL_BLEND); in init()
1339 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1341 gl.blendFunc(GL_CONSTANT_COLOR, GL_CONSTANT_COLOR); in init()
1342 GLU_EXPECT_NO_ERROR(gl.getError(), "glBlendFunc()"); in init()
1345 gl.blendColor(0.75f, 0.75f, 0.75f, 0.75f); in init()