Lines Matching refs:gl
55 virtual void renderTest (const glw::Functions& gl);
56 virtual void renderReference (const glw::Functions& gl);
58 virtual void changeState (const glw::Functions& gl, int stateId) = 0;
74 void StateChangeCase::renderTest (const glw::Functions& gl) in renderTest() argument
78 changeState(gl, 0); in renderTest()
79 callDraw(gl); in renderTest()
81 changeState(gl, 1); in renderTest()
82 callDraw(gl); in renderTest()
86 void StateChangeCase::renderReference (const glw::Functions& gl) in renderReference() argument
88 changeState(gl, 0); in renderReference()
91 callDraw(gl); in renderReference()
93 changeState(gl, 1); in renderReference()
96 callDraw(gl); in renderReference()
120 virtual void setupInitialState (const glw::Functions& gl)\
124 virtual void changeState (const glw::Functions& gl, int stateId)\
149 gl.useProgram(m_programs[0]->getProgram()); in init()
150 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
151 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
152 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
154 gl.enableVertexAttribArray(coordLoc); in init()
155 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
156 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
157 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
158 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
159 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
161 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
162 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
164 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
165 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
167 gl.uniform1i(samplerLoc, 0); in init()
168 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
170 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
171 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
175 gl.enable(GL_BLEND); in init()
177 gl.disable(GL_BLEND); in init()
191 gl.useProgram(m_programs[0]->getProgram()); in init()
192 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
194 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
195 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
197 gl.enableVertexAttribArray(coordLoc); in init()
198 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
200 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
201 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
202 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
203 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
205 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
206 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
208 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
209 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
211 gl.uniform1i(samplerLoc, 0); in init()
212 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
214 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
215 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
217 gl.depthFunc(GL_LEQUAL); in init()
218 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthFunc()"); in init()
222 gl.enable(GL_DEPTH_TEST); in init()
224 gl.disable(GL_DEPTH_TEST); in init()
238 gl.useProgram(m_programs[0]->getProgram()); in init()
239 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
240 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
241 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
243 gl.enableVertexAttribArray(coordLoc); in init()
244 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
245 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
246 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
247 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
248 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
250 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
251 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
253 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
254 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
256 gl.uniform1i(samplerLoc, 0); in init()
257 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
259 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
260 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
262 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
263 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
265 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
266 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
268 gl.clearStencil(0); in init()
269 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
270 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
272 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
276 gl.enable(GL_STENCIL_TEST); in init()
278 gl.disable(GL_STENCIL_TEST); in init()
292 gl.useProgram(m_programs[0]->getProgram()); in init()
293 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
294 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
295 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
297 gl.enableVertexAttribArray(coordLoc); in init()
298 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
299 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
300 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
301 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
302 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
304 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
305 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
307 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
308 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
310 gl.uniform1i(samplerLoc, 0); in init()
311 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
313 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
314 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
316 gl.scissor(2, 3, 12, 13); in init()
317 GLU_EXPECT_NO_ERROR(gl.getError(), "glScissor()"); in init()
321 gl.enable(GL_SCISSOR_TEST); in init()
323 gl.disable(GL_SCISSOR_TEST); in init()
337 gl.useProgram(m_programs[0]->getProgram()); in init()
338 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
339 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
340 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
342 gl.enableVertexAttribArray(coordLoc); in init()
343 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
344 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
345 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
346 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
347 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
349 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
350 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
352 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
353 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
355 gl.uniform1i(samplerLoc, 0); in init()
356 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
358 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
359 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
363 gl.enable(GL_DITHER); in init()
365 gl.disable(GL_DITHER); in init()
379 gl.useProgram(m_programs[0]->getProgram()); in init()
380 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
381 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
382 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
384 gl.enableVertexAttribArray(coordLoc); in init()
385 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
386 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
387 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
388 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
389 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
391 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
392 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
394 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
395 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
397 gl.uniform1i(samplerLoc, 0); in init()
398 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
400 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
401 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
403 gl.frontFace(GL_CW); in init()
404 GLU_EXPECT_NO_ERROR(gl.getError(), "glFrontFace()"); in init()
406 gl.cullFace(GL_FRONT); in init()
407 GLU_EXPECT_NO_ERROR(gl.getError(), "glCullFace()"); in init()
411 gl.enable(GL_CULL_FACE); in init()
413 gl.disable(GL_CULL_FACE); in init()
427 gl.useProgram(m_programs[0]->getProgram()); in init()
428 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
429 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
430 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
432 gl.enableVertexAttribArray(coordLoc); in init()
433 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
434 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
435 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
436 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
437 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
439 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
440 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
442 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
443 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
445 gl.uniform1i(samplerLoc, 0); in init()
446 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
448 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
449 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
453 gl.enable(GL_RASTERIZER_DISCARD); in init()
455 gl.disable(GL_RASTERIZER_DISCARD); in init()
469 gl.useProgram(m_programs[0]->getProgram()); in init()
470 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
471 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
472 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
474 gl.enableVertexAttribArray(coordLoc); in init()
475 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
476 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
477 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
478 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
479 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
481 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
482 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
484 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
485 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
487 gl.uniform1i(samplerLoc, 0); in init()
488 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
490 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
491 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
495 gl.enable(GL_PRIMITIVE_RESTART_FIXED_INDEX); in init()
497 gl.disable(GL_PRIMITIVE_RESTART_FIXED_INDEX); in init()
511 gl.useProgram(m_programs[0]->getProgram()); in init()
512 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
513 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
514 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
516 gl.enableVertexAttribArray(coordLoc); in init()
517 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
518 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
519 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
520 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
521 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
523 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
524 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
526 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
527 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
529 gl.uniform1i(samplerLoc, 0); in init()
530 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
532 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
533 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
535 gl.enable(GL_DEPTH_TEST); in init()
536 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
540 gl.depthFunc(GL_GEQUAL); in init()
542 gl.depthFunc(GL_LEQUAL); in init()
557 gl.useProgram(m_programs[0]->getProgram()); in init()
558 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
559 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
560 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
562 gl.enableVertexAttribArray(coordLoc); in init()
563 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
564 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
565 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
566 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
567 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
569 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
570 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
572 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
573 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
575 gl.uniform1i(samplerLoc, 0); in init()
576 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
578 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
579 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
581 gl.enable(GL_DEPTH_TEST); in init()
582 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
584 gl.depthFunc(GL_LEQUAL); in init()
585 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthFunc()"); in init()
589 gl.depthMask(GL_FALSE); in init()
591 gl.depthMask(GL_TRUE); in init()
605 gl.useProgram(m_programs[0]->getProgram()); in init()
606 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
607 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
608 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
610 gl.enableVertexAttribArray(coordLoc); in init()
611 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
612 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
613 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
614 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
615 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
617 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
618 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
620 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
621 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
623 gl.uniform1i(samplerLoc, 0); in init()
624 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
626 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
627 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
631 gl.depthRangef(0.0f, 1.0f); in init()
633 gl.depthRangef(0.25f, 0.75f); in init()
647 gl.useProgram(m_programs[0]->getProgram()); in init()
648 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
649 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
650 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
652 gl.enableVertexAttribArray(coordLoc); in init()
653 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
654 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
655 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
656 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
657 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
659 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
660 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
662 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
663 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
665 gl.uniform1i(samplerLoc, 0); in init()
666 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
668 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
669 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
671 gl.enable(GL_BLEND); in init()
672 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
676 gl.blendEquation(GL_FUNC_SUBTRACT); in init()
678 gl.blendEquation(GL_FUNC_ADD); in init()
692 gl.useProgram(m_programs[0]->getProgram()); in init()
693 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
694 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
695 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
697 gl.enableVertexAttribArray(coordLoc); in init()
698 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
699 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
700 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
701 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
702 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
704 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
705 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
707 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
708 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
710 gl.uniform1i(samplerLoc, 0); in init()
711 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
713 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
714 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
716 gl.enable(GL_BLEND); in init()
717 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
721 gl.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); in init()
723 gl.blendFunc(GL_ONE, GL_ONE); in init()
737 gl.useProgram(m_programs[0]->getProgram()); in init()
738 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
739 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
740 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
742 gl.enableVertexAttribArray(coordLoc); in init()
743 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
744 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
745 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
746 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
747 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
749 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
750 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
752 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
753 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
755 gl.uniform1i(samplerLoc, 0); in init()
756 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
758 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
759 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
761 gl.enable(GL_POLYGON_OFFSET_FILL); in init()
762 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
766 gl.polygonOffset(0.0f, 0.0f); in init()
768 gl.polygonOffset(0.1f, 0.1f); in init()
782 gl.useProgram(m_programs[0]->getProgram()); in init()
783 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
784 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
785 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
787 gl.enableVertexAttribArray(coordLoc); in init()
788 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
789 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
790 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
791 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
792 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
794 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
795 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
797 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
798 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
800 gl.uniform1i(samplerLoc, 0); in init()
801 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
803 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
804 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
808 gl.sampleCoverage(0.25f, GL_TRUE); in init()
810 gl.sampleCoverage(0.75f, GL_FALSE); in init()
824 gl.useProgram(m_programs[0]->getProgram()); in init()
825 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
826 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
827 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
829 gl.enableVertexAttribArray(coordLoc); in init()
830 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
831 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
832 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
833 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
834 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
836 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
837 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
839 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
840 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
842 gl.uniform1i(samplerLoc, 0); in init()
843 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
845 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
846 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
850 gl.viewport(10, 11, 5, 6); in init()
852 gl.viewport(2, 3, 17, 14); in init()
866 gl.useProgram(m_programs[0]->getProgram()); in init()
867 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
868 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
869 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
871 gl.enableVertexAttribArray(coordLoc); in init()
872 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
873 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
874 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
875 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
876 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
878 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
879 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
881 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
882 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
884 gl.uniform1i(samplerLoc, 0); in init()
885 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
887 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
888 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
890 gl.enable(GL_SCISSOR_TEST); in init()
891 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
895 gl.scissor(17, 13, 5, 8); in init()
897 gl.scissor(7, 3, 13, 13); 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()
937 gl.colorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_FALSE); in init()
939 gl.colorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_TRUE); in init()
953 gl.useProgram(m_programs[0]->getProgram()); in init()
954 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
955 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
956 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
958 gl.enableVertexAttribArray(coordLoc); in init()
959 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
960 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
961 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
962 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
963 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
965 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
966 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
968 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
969 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
971 gl.uniform1i(samplerLoc, 0); in init()
972 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
974 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
975 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
977 gl.enable(GL_CULL_FACE); in init()
978 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
982 gl.cullFace(GL_FRONT); in init()
984 gl.cullFace(GL_BACK); in init()
998 gl.useProgram(m_programs[0]->getProgram()); in init()
999 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1000 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1001 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1003 gl.enableVertexAttribArray(coordLoc); in init()
1004 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1005 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1006 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1007 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1008 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1010 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1011 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1013 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1014 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1016 gl.uniform1i(samplerLoc, 0); in init()
1017 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1019 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1020 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1022 gl.enable(GL_CULL_FACE); in init()
1023 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1027 gl.frontFace(GL_CCW); in init()
1029 gl.frontFace(GL_CW); in init()
1043 gl.useProgram(m_programs[0]->getProgram()); in init()
1044 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1045 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1046 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1048 gl.enableVertexAttribArray(coordLoc); in init()
1049 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1050 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1051 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1052 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1053 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1055 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1056 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1058 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1059 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1061 gl.uniform1i(samplerLoc, 0); in init()
1062 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1064 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1065 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1067 gl.enable(GL_STENCIL_TEST); in init()
1068 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1070 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
1071 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
1073 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1074 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
1076 gl.clearStencil(0); in init()
1077 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1078 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1079 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1083 gl.stencilMask(0xDD); in init()
1085 gl.stencilMask(~0xDD); in init()
1099 gl.useProgram(m_programs[0]->getProgram()); in init()
1100 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1101 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1102 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1104 gl.enableVertexAttribArray(coordLoc); in init()
1105 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1106 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1107 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1108 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1109 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1111 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1112 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1114 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1115 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1117 gl.uniform1i(samplerLoc, 0); in init()
1118 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1120 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1121 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1123 gl.enable(GL_STENCIL_TEST); in init()
1124 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1126 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1127 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
1128 gl.clearStencil(0); in init()
1129 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1130 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1131 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1135 gl.stencilFunc(GL_LEQUAL, 0, 0xFF); in init()
1137 gl.stencilFunc(GL_GEQUAL, 0, 0x00); in init()
1151 gl.useProgram(m_programs[0]->getProgram()); in init()
1152 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1153 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1154 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1156 gl.enableVertexAttribArray(coordLoc); in init()
1157 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1158 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1159 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1160 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1161 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1163 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1164 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1166 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1167 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1169 gl.uniform1i(samplerLoc, 0); in init()
1170 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1172 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1173 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1175 gl.enable(GL_STENCIL_TEST); in init()
1176 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1178 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
1179 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
1181 gl.clearStencil(0); in init()
1182 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1184 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1185 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1189 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1191 gl.stencilOp(GL_REPLACE, GL_KEEP, GL_KEEP); in init()
1205 gl.bindAttribLocation(m_programs[0]->getProgram(), 0, "a_coord"); in init()
1206 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindAttribLocation()"); in init()
1207 gl.linkProgram(m_programs[0]->getProgram()); in init()
1208 GLU_EXPECT_NO_ERROR(gl.getError(), "glLinkProgram()"); in init()
1210 gl.useProgram(m_programs[0]->getProgram()); in init()
1211 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1213 gl.enableVertexAttribArray(0); in init()
1214 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1215 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1216 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1217 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1218 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1220 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1221 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1223 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1224 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1226 gl.uniform1i(samplerLoc, 0); in init()
1227 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1229 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1230 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1235 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1236 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1240 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[1]); in init()
1241 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1257 gl.useProgram(m_programs[0]->getProgram()); in init()
1258 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1259 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1260 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1262 gl.enableVertexAttribArray(coordLoc); in init()
1263 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1264 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1265 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1266 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1267 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1269 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1270 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1272 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1273 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1275 gl.uniform1i(samplerLoc, 0); in init()
1276 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1278 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1279 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1281 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1282 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1286 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1288 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[1]); in init()
1302 gl.useProgram(m_programs[0]->getProgram()); in init()
1303 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1304 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1305 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1307 gl.enableVertexAttribArray(coordLoc); in init()
1308 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1309 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1310 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1311 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1312 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1314 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1315 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1317 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1318 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1320 gl.uniform1i(samplerLoc, 0); in init()
1321 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1323 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1324 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1328 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1330 gl.bindTexture(GL_TEXTURE_2D, m_textures[1]); in init()
1344 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1345 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1347 gl.enableVertexAttribArray(coordLoc); in init()
1348 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1349 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1350 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1351 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1352 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1354 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1355 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1358 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1359 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1360 gl.useProgram(m_programs[0]->getProgram()); in init()
1361 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1362 gl.uniform1i(samplerLoc, 0); in init()
1363 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1367 GLint samplerLoc = gl.getUniformLocation(m_programs[1]->getProgram(), "u_sampler"); in init()
1368 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1369 gl.useProgram(m_programs[1]->getProgram()); in init()
1370 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1371 gl.uniform1i(samplerLoc, 0); in init()
1372 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1375 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1376 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1380 gl.useProgram(m_programs[0]->getProgram()); in init()
1382 gl.useProgram(m_programs[1]->getProgram()); in init()
1396 gl.useProgram(m_programs[0]->getProgram()); in init()
1397 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1398 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1399 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1401 gl.enableVertexAttribArray(coordLoc); in init()
1402 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1403 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1404 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1405 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1406 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1408 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1409 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1411 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1412 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1414 gl.uniform1i(samplerLoc, 0); in init()
1415 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1417 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1418 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1422 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); in init()
1424 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); in init()
1438 gl.useProgram(m_programs[0]->getProgram()); in init()
1439 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1440 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1441 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1443 gl.enableVertexAttribArray(coordLoc); in init()
1444 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1445 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1446 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1447 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1448 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1450 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1451 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1453 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1454 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1456 gl.uniform1i(samplerLoc, 0); in init()
1457 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1459 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1460 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1464 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); in init()
1466 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in init()
1480 gl.useProgram(m_programs[0]->getProgram()); in init()
1481 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1482 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1483 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1485 gl.enableVertexAttribArray(coordLoc); in init()
1486 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1487 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1488 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1489 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1490 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1492 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1493 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1495 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1496 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1498 gl.uniform1i(samplerLoc, 0); in init()
1499 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1501 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1502 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1506 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in init()
1508 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); in init()
1523 gl.useProgram(m_programs[0]->getProgram()); in init()
1524 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1525 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1526 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1528 gl.enableVertexAttribArray(coordLoc); in init()
1529 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1530 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1531 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1532 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1533 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1535 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1536 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1538 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1539 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1541 gl.uniform1i(samplerLoc, 0); in init()
1542 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1544 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1545 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1547 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1548 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindFramebuffer()"); in init()
1552 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1554 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[1]); in init()
1568 gl.useProgram(m_programs[0]->getProgram()); in init()
1569 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1570 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1571 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1573 gl.enableVertexAttribArray(coordLoc); in init()
1574 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1575 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1576 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1577 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1578 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1580 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1581 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1583 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1584 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1586 gl.uniform1i(samplerLoc, 0); in init()
1587 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1589 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1590 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1592 gl.enable(GL_BLEND); in init()
1593 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1595 gl.blendFunc(GL_CONSTANT_COLOR, GL_CONSTANT_COLOR); in init()
1596 GLU_EXPECT_NO_ERROR(gl.getError(), "glBlendFunc()"); in init()
1600 gl.blendColor(0.25f, 0.25f, 0.25f, 0.25f); in init()
1602 gl.blendColor(0.75f, 0.75f, 0.75f, 0.75f); in init()
1617 gl.useProgram(m_programs[0]->getProgram()); in init()
1618 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1619 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1620 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1622 gl.enableVertexAttribArray(coordLoc); in init()
1623 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1624 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1625 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1626 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1627 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1629 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1630 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1632 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1633 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1635 gl.uniform1i(samplerLoc, 0); in init()
1636 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1638 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1639 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1643 gl.bindSampler(0, m_samplers[ndx]); in init()
1644 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, ndx == 0 ? GL_NEAREST : GL_LINEAR); in init()
1645 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, ndx == 0 ? GL_LINEAR : GL_NEAREST); in init()
1646 GLU_EXPECT_NO_ERROR(gl.getError(), "Sampler setup"); in init()
1651 gl.bindSampler(0, m_samplers[stateId]); in init()
1664 gl.bindAttribLocation(m_programs[0]->getProgram(), 0, "a_coord"); in init()
1665 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindAttribLocation()"); in init()
1666 gl.linkProgram(m_programs[0]->getProgram()); in init()
1667 GLU_EXPECT_NO_ERROR(gl.getError(), "glLinkProgram()"); in init()
1669 gl.useProgram(m_programs[0]->getProgram()); in init()
1670 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1674 gl.bindVertexArray(m_vertexArrays[ndx]); in init()
1675 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindVertexArray()"); in init()
1676 gl.enableVertexAttribArray(0); in init()
1677 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1678 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[ndx]); in init()
1679 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1680 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1681 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1684 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1685 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1687 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1688 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1690 gl.uniform1i(samplerLoc, 0); in init()
1691 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1693 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1694 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1698 gl.bindVertexArray(m_vertexArrays[stateId]); in init()