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()
413 gl.disable(GL_RASTERIZER_DISCARD); in init()
425 gl.useProgram(m_programs[0]->getProgram()); in init()
426 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
427 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
428 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
430 gl.enableVertexAttribArray(coordLoc); in init()
431 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
432 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
433 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
434 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
435 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
437 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
438 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
440 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
441 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
443 gl.uniform1i(samplerLoc, 0); in init()
444 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
446 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
447 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
450 gl.enable(GL_PRIMITIVE_RESTART_FIXED_INDEX); in init()
462 gl.useProgram(m_programs[0]->getProgram()); in init()
463 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
464 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
465 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
467 gl.enableVertexAttribArray(coordLoc); in init()
468 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
469 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
470 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
471 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
472 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
474 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
475 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
477 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
478 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
480 gl.uniform1i(samplerLoc, 0); in init()
481 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
483 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
484 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
486 gl.enable(GL_DEPTH_TEST); in init()
487 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
490 gl.depthFunc(GL_GEQUAL); in init()
503 gl.useProgram(m_programs[0]->getProgram()); in init()
504 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
505 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
506 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
508 gl.enableVertexAttribArray(coordLoc); in init()
509 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
510 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
511 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
512 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
513 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
515 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
516 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
518 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
519 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
521 gl.uniform1i(samplerLoc, 0); in init()
522 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
524 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
525 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
527 gl.enable(GL_DEPTH_TEST); in init()
528 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
530 gl.depthFunc(GL_LEQUAL); in init()
531 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthFunc()"); in init()
534 gl.depthMask(GL_FALSE); in init()
546 gl.useProgram(m_programs[0]->getProgram()); in init()
547 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
548 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
549 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
551 gl.enableVertexAttribArray(coordLoc); in init()
552 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
553 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
554 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
555 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
556 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
558 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
559 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
561 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
562 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
564 gl.uniform1i(samplerLoc, 0); in init()
565 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
567 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
568 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
571 gl.depthRangef(0.0f, 1.0f); in init()
583 gl.useProgram(m_programs[0]->getProgram()); in init()
584 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
585 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
586 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
588 gl.enableVertexAttribArray(coordLoc); in init()
589 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
590 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
591 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
592 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
593 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
595 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
596 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
598 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
599 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
601 gl.uniform1i(samplerLoc, 0); in init()
602 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
604 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
605 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
607 gl.enable(GL_BLEND); in init()
608 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
611 gl.blendEquation(GL_FUNC_SUBTRACT); in init()
623 gl.useProgram(m_programs[0]->getProgram()); in init()
624 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
625 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
626 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
628 gl.enableVertexAttribArray(coordLoc); in init()
629 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
630 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
631 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
632 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
633 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
635 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
636 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
638 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
639 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
641 gl.uniform1i(samplerLoc, 0); in init()
642 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
644 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
645 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
647 gl.enable(GL_BLEND); in init()
648 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
651 gl.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); in init()
663 gl.useProgram(m_programs[0]->getProgram()); in init()
664 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
665 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
666 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
668 gl.enableVertexAttribArray(coordLoc); in init()
669 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
670 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
671 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
672 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
673 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
675 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
676 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
678 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
679 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
681 gl.uniform1i(samplerLoc, 0); in init()
682 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
684 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
685 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
687 gl.enable(GL_POLYGON_OFFSET_FILL); in init()
688 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
691 gl.polygonOffset(0.0f, 0.0f); 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()
728 gl.sampleCoverage(0.25f, GL_TRUE); in init()
740 gl.useProgram(m_programs[0]->getProgram()); in init()
741 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
742 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
743 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
745 gl.enableVertexAttribArray(coordLoc); in init()
746 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
747 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
748 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
749 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
750 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
752 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
753 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
755 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
756 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
758 gl.uniform1i(samplerLoc, 0); in init()
759 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
761 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
762 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
765 gl.viewport(10, 11, 5, 6); in init()
777 gl.useProgram(m_programs[0]->getProgram()); in init()
778 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
779 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
780 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
782 gl.enableVertexAttribArray(coordLoc); in init()
783 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
784 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
785 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
786 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
787 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
789 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
790 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
792 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
793 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
795 gl.uniform1i(samplerLoc, 0); in init()
796 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
798 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
799 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
801 gl.enable(GL_SCISSOR_TEST); in init()
802 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
805 gl.scissor(17, 13, 5, 8); in init()
817 gl.useProgram(m_programs[0]->getProgram()); in init()
818 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
819 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
820 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
822 gl.enableVertexAttribArray(coordLoc); in init()
823 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
824 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
825 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
826 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
827 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
829 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
830 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
832 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
833 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
835 gl.uniform1i(samplerLoc, 0); in init()
836 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
838 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
839 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
842 gl.colorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_FALSE); in init()
854 gl.useProgram(m_programs[0]->getProgram()); in init()
855 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
856 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
857 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
859 gl.enableVertexAttribArray(coordLoc); in init()
860 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
861 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
862 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
863 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
864 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
866 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
867 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
869 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
870 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
872 gl.uniform1i(samplerLoc, 0); in init()
873 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
875 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
876 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
878 gl.enable(GL_CULL_FACE); in init()
879 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
882 gl.cullFace(GL_FRONT); in init()
894 gl.useProgram(m_programs[0]->getProgram()); in init()
895 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
896 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
897 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
899 gl.enableVertexAttribArray(coordLoc); in init()
900 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
901 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
902 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
903 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
904 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
906 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
907 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
909 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
910 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
912 gl.uniform1i(samplerLoc, 0); in init()
913 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
915 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
916 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
918 gl.enable(GL_CULL_FACE); in init()
919 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
922 gl.frontFace(GL_CCW); in init()
934 gl.useProgram(m_programs[0]->getProgram()); in init()
935 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
936 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
937 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
939 gl.enableVertexAttribArray(coordLoc); in init()
940 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
941 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
942 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
943 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
944 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
946 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
947 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
949 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
950 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
952 gl.uniform1i(samplerLoc, 0); in init()
953 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
955 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
956 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
958 gl.enable(GL_STENCIL_TEST); in init()
959 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
961 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
962 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
964 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
965 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
967 gl.clearStencil(0); in init()
968 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
969 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
970 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
973 gl.stencilMask(0xDD); in init()
985 gl.useProgram(m_programs[0]->getProgram()); in init()
986 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
987 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
988 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
990 gl.enableVertexAttribArray(coordLoc); in init()
991 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
992 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
993 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
994 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
995 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
997 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
998 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1000 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1001 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1003 gl.uniform1i(samplerLoc, 0); in init()
1004 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1006 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1007 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1009 gl.enable(GL_STENCIL_TEST); in init()
1010 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1012 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1013 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
1014 gl.clearStencil(0); in init()
1015 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1016 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1017 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1020 gl.stencilFunc(GL_LEQUAL, 0, 0xFF); in init()
1032 gl.useProgram(m_programs[0]->getProgram()); in init()
1033 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1034 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1035 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1037 gl.enableVertexAttribArray(coordLoc); in init()
1038 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1039 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1040 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1041 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1042 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1044 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1045 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1047 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1048 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1050 gl.uniform1i(samplerLoc, 0); in init()
1051 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1053 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1054 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1056 gl.enable(GL_STENCIL_TEST); in init()
1057 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1059 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
1060 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
1062 gl.clearStencil(0); in init()
1063 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1065 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1066 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1069 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1081 gl.bindAttribLocation(m_programs[0]->getProgram(), 0, "a_coord"); in init()
1082 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindAttribLocation()"); in init()
1083 gl.linkProgram(m_programs[0]->getProgram()); in init()
1084 GLU_EXPECT_NO_ERROR(gl.getError(), "glLinkProgram()"); in init()
1086 gl.useProgram(m_programs[0]->getProgram()); in init()
1087 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1089 gl.enableVertexAttribArray(0); in init()
1090 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1091 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1092 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1093 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1094 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1096 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1097 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1099 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1100 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1102 gl.uniform1i(samplerLoc, 0); in init()
1103 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1105 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1106 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1109 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1110 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1123 gl.useProgram(m_programs[0]->getProgram()); in init()
1124 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1125 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1126 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1128 gl.enableVertexAttribArray(coordLoc); in init()
1129 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1130 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1131 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1132 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1133 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1135 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1136 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1138 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1139 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1141 gl.uniform1i(samplerLoc, 0); in init()
1142 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1144 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1145 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1147 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1148 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1151 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1163 gl.useProgram(m_programs[0]->getProgram()); in init()
1164 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1165 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1166 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1168 gl.enableVertexAttribArray(coordLoc); in init()
1169 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1170 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1171 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1172 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1173 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1175 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1176 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1178 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1179 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1181 gl.uniform1i(samplerLoc, 0); in init()
1182 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1184 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1185 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1188 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1200 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1201 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1203 gl.enableVertexAttribArray(coordLoc); in init()
1204 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1205 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1206 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1207 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1208 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1210 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1211 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1213 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1214 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1215 gl.useProgram(m_programs[0]->getProgram()); in init()
1216 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); 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.useProgram(m_programs[0]->getProgram()); 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_MIN_FILTER, GL_NEAREST); in init()
1273 gl.useProgram(m_programs[0]->getProgram()); in init()
1274 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1275 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1276 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1278 gl.enableVertexAttribArray(coordLoc); in init()
1279 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1280 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1281 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1282 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1283 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1285 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1286 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1288 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1289 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1291 gl.uniform1i(samplerLoc, 0); in init()
1292 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1294 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1295 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1298 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); in init()
1310 gl.useProgram(m_programs[0]->getProgram()); in init()
1311 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1312 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1313 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1315 gl.enableVertexAttribArray(coordLoc); in init()
1316 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1317 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1318 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1319 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1320 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1322 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1323 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1325 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1326 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1328 gl.uniform1i(samplerLoc, 0); in init()
1329 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1331 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1332 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1335 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in init()
1348 gl.useProgram(m_programs[0]->getProgram()); in init()
1349 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1350 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1351 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1353 gl.enableVertexAttribArray(coordLoc); in init()
1354 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1355 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1356 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1357 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1358 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1360 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1361 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1363 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1364 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1366 gl.uniform1i(samplerLoc, 0); in init()
1367 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1369 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1370 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1372 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1373 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindFramebuffer()"); in init()
1376 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1388 gl.useProgram(m_programs[0]->getProgram()); in init()
1389 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1390 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1391 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1393 gl.enableVertexAttribArray(coordLoc); in init()
1394 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1395 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1396 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1397 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1398 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1400 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1401 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1403 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1404 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1406 gl.uniform1i(samplerLoc, 0); in init()
1407 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1409 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1410 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1412 gl.enable(GL_BLEND); in init()
1413 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1415 gl.blendFunc(GL_CONSTANT_COLOR, GL_CONSTANT_COLOR); in init()
1416 GLU_EXPECT_NO_ERROR(gl.getError(), "glBlendFunc()"); in init()
1419 gl.blendColor(0.75f, 0.75f, 0.75f, 0.75f); in init()
1432 gl.useProgram(m_programs[0]->getProgram()); in init()
1433 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1434 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1435 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1437 gl.enableVertexAttribArray(coordLoc); in init()
1438 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1439 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1440 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1441 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1442 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1444 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1445 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1447 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1448 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1450 gl.uniform1i(samplerLoc, 0); in init()
1451 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1453 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1454 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1456 gl.bindSampler(0, m_samplers[0]); in init()
1457 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); in init()
1458 GLU_EXPECT_NO_ERROR(gl.getError(), "Sampler setup"); in init()
1461 gl.bindSampler(0, m_samplers[0]); in init()
1474 gl.bindAttribLocation(m_programs[0]->getProgram(), 0, "a_coord"); in init()
1475 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindAttribLocation()"); in init()
1476 gl.linkProgram(m_programs[0]->getProgram()); in init()
1477 GLU_EXPECT_NO_ERROR(gl.getError(), "glLinkProgram()"); in init()
1479 gl.useProgram(m_programs[0]->getProgram()); in init()
1480 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1482 gl.bindVertexArray(m_vertexArrays[0]); in init()
1483 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindVertexArray()"); in init()
1484 gl.enableVertexAttribArray(0); in init()
1485 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1486 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1487 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1488 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1489 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1491 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1492 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1494 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1495 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1497 gl.uniform1i(samplerLoc, 0); in init()
1498 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1500 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1501 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1504 gl.bindVertexArray(m_vertexArrays[0]); in init()