• Home
  • Raw
  • Download

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()
451 gl.enable(GL_DEPTH_TEST); in init()
452 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
456 gl.depthFunc(GL_GEQUAL); in init()
458 gl.depthFunc(GL_LEQUAL); in init()
473 gl.useProgram(m_programs[0]->getProgram()); in init()
474 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
475 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
476 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
478 gl.enableVertexAttribArray(coordLoc); in init()
479 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
480 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
481 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
482 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
483 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
485 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
486 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
488 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
489 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
491 gl.uniform1i(samplerLoc, 0); in init()
492 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
494 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
495 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
497 gl.enable(GL_DEPTH_TEST); in init()
498 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
500 gl.depthFunc(GL_LEQUAL); in init()
501 GLU_EXPECT_NO_ERROR(gl.getError(), "glDepthFunc()"); in init()
505 gl.depthMask(GL_FALSE); in init()
507 gl.depthMask(GL_TRUE); in init()
521 gl.useProgram(m_programs[0]->getProgram()); in init()
522 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
523 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
524 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
526 gl.enableVertexAttribArray(coordLoc); in init()
527 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
528 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
529 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
530 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
531 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
533 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
534 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
536 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
537 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
539 gl.uniform1i(samplerLoc, 0); in init()
540 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
542 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
543 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
547 gl.depthRangef(0.0f, 1.0f); in init()
549 gl.depthRangef(0.25f, 0.75f); in init()
563 gl.useProgram(m_programs[0]->getProgram()); in init()
564 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
565 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
566 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
568 gl.enableVertexAttribArray(coordLoc); in init()
569 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
570 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
571 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
572 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
573 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
575 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
576 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
578 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
579 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
581 gl.uniform1i(samplerLoc, 0); in init()
582 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
584 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
585 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
587 gl.enable(GL_BLEND); in init()
588 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
592 gl.blendEquation(GL_FUNC_SUBTRACT); in init()
594 gl.blendEquation(GL_FUNC_ADD); in init()
608 gl.useProgram(m_programs[0]->getProgram()); in init()
609 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
610 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
611 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
613 gl.enableVertexAttribArray(coordLoc); in init()
614 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
615 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
616 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
617 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
618 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
620 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
621 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
623 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
624 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
626 gl.uniform1i(samplerLoc, 0); in init()
627 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
629 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
630 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
632 gl.enable(GL_BLEND); in init()
633 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
637 gl.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); in init()
639 gl.blendFunc(GL_ONE, GL_ONE); in init()
653 gl.useProgram(m_programs[0]->getProgram()); in init()
654 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
655 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
656 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
658 gl.enableVertexAttribArray(coordLoc); in init()
659 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
660 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
661 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
662 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
663 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
665 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
666 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
668 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
669 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
671 gl.uniform1i(samplerLoc, 0); in init()
672 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
674 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
675 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
677 gl.enable(GL_POLYGON_OFFSET_FILL); in init()
678 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
682 gl.polygonOffset(0.0f, 0.0f); in init()
684 gl.polygonOffset(0.1f, 0.1f); in init()
698 gl.useProgram(m_programs[0]->getProgram()); in init()
699 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
700 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
701 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
703 gl.enableVertexAttribArray(coordLoc); in init()
704 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
705 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
706 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
707 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
708 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
710 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
711 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
713 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
714 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
716 gl.uniform1i(samplerLoc, 0); in init()
717 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
719 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
720 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
724 gl.sampleCoverage(0.25f, GL_TRUE); in init()
726 gl.sampleCoverage(0.75f, GL_FALSE); 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()
766 gl.viewport(10, 11, 5, 6); in init()
768 gl.viewport(2, 3, 17, 14); 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()
806 gl.enable(GL_SCISSOR_TEST); in init()
807 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
811 gl.scissor(17, 13, 5, 8); in init()
813 gl.scissor(7, 3, 13, 13); in init()
827 gl.useProgram(m_programs[0]->getProgram()); in init()
828 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
829 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
830 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
832 gl.enableVertexAttribArray(coordLoc); in init()
833 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
834 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
835 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
836 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
837 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
839 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
840 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
842 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
843 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
845 gl.uniform1i(samplerLoc, 0); in init()
846 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
848 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
849 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
853 gl.colorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_FALSE); in init()
855 gl.colorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_TRUE); in init()
869 gl.useProgram(m_programs[0]->getProgram()); in init()
870 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
871 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
872 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
874 gl.enableVertexAttribArray(coordLoc); in init()
875 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
876 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
877 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
878 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
879 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
881 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
882 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
884 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
885 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
887 gl.uniform1i(samplerLoc, 0); in init()
888 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
890 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
891 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
893 gl.enable(GL_CULL_FACE); in init()
894 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
898 gl.cullFace(GL_FRONT); in init()
900 gl.cullFace(GL_BACK); in init()
914 gl.useProgram(m_programs[0]->getProgram()); in init()
915 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
916 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
917 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
919 gl.enableVertexAttribArray(coordLoc); in init()
920 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
921 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
922 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
923 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
924 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
926 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
927 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
929 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
930 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
932 gl.uniform1i(samplerLoc, 0); in init()
933 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
935 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
936 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
938 gl.enable(GL_CULL_FACE); in init()
939 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
943 gl.frontFace(GL_CCW); in init()
945 gl.frontFace(GL_CW); in init()
959 gl.useProgram(m_programs[0]->getProgram()); in init()
960 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
961 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
962 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
964 gl.enableVertexAttribArray(coordLoc); in init()
965 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
966 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
967 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
968 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
969 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
971 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
972 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
974 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
975 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
977 gl.uniform1i(samplerLoc, 0); in init()
978 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
980 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
981 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
983 gl.enable(GL_STENCIL_TEST); in init()
984 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
986 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
987 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
989 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
990 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
992 gl.clearStencil(0); in init()
993 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
994 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
995 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
999 gl.stencilMask(0xDD); in init()
1001 gl.stencilMask(~0xDD); in init()
1015 gl.useProgram(m_programs[0]->getProgram()); in init()
1016 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1017 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1018 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1020 gl.enableVertexAttribArray(coordLoc); in init()
1021 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1022 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1023 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1024 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1025 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1027 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1028 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1030 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1031 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1033 gl.uniform1i(samplerLoc, 0); in init()
1034 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1036 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1037 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1039 gl.enable(GL_STENCIL_TEST); in init()
1040 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1042 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1043 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilOp()"); in init()
1044 gl.clearStencil(0); in init()
1045 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1046 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1047 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1051 gl.stencilFunc(GL_LEQUAL, 0, 0xFF); in init()
1053 gl.stencilFunc(GL_GEQUAL, 0, 0x00); in init()
1067 gl.useProgram(m_programs[0]->getProgram()); in init()
1068 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1069 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1070 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1072 gl.enableVertexAttribArray(coordLoc); in init()
1073 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1074 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1075 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1076 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1077 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1079 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1080 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1082 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1083 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1085 gl.uniform1i(samplerLoc, 0); in init()
1086 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1088 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1089 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1091 gl.enable(GL_STENCIL_TEST); in init()
1092 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1094 gl.stencilFunc(GL_LEQUAL, 0, 0); in init()
1095 GLU_EXPECT_NO_ERROR(gl.getError(), "glStencilFunc()"); in init()
1097 gl.clearStencil(0); in init()
1098 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearStencil()"); in init()
1100 gl.clear(GL_STENCIL_BUFFER_BIT); in init()
1101 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear()"); in init()
1105 gl.stencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); in init()
1107 gl.stencilOp(GL_REPLACE, GL_KEEP, GL_KEEP); in init()
1121 gl.bindAttribLocation(m_programs[0]->getProgram(), 0, "a_coord"); in init()
1122 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindAttribLocation()"); in init()
1123 gl.linkProgram(m_programs[0]->getProgram()); in init()
1124 GLU_EXPECT_NO_ERROR(gl.getError(), "glLinkProgram()"); in init()
1126 gl.useProgram(m_programs[0]->getProgram()); in init()
1127 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1129 gl.enableVertexAttribArray(0); in init()
1130 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1131 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1132 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1133 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1134 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1136 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1137 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1139 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1140 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1142 gl.uniform1i(samplerLoc, 0); in init()
1143 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1145 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1146 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1151 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1152 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1156 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[1]); in init()
1157 gl.vertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1173 gl.useProgram(m_programs[0]->getProgram()); in init()
1174 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1175 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1176 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1178 gl.enableVertexAttribArray(coordLoc); in init()
1179 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1180 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1181 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1182 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1183 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1185 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1186 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1188 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1189 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1191 gl.uniform1i(samplerLoc, 0); in init()
1192 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1194 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1195 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1197 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1198 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1202 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[0]); in init()
1204 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[1]); in init()
1218 gl.useProgram(m_programs[0]->getProgram()); in init()
1219 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1220 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1221 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1223 gl.enableVertexAttribArray(coordLoc); in init()
1224 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1225 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1226 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1227 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1228 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1230 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1231 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1233 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1234 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1236 gl.uniform1i(samplerLoc, 0); in init()
1237 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1239 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1240 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1244 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1246 gl.bindTexture(GL_TEXTURE_2D, m_textures[1]); in init()
1260 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1261 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1263 gl.enableVertexAttribArray(coordLoc); in init()
1264 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1265 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1266 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1267 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1268 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1270 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1271 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1274 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1275 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1276 gl.useProgram(m_programs[0]->getProgram()); in init()
1277 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1278 gl.uniform1i(samplerLoc, 0); in init()
1279 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1283 GLint samplerLoc = gl.getUniformLocation(m_programs[1]->getProgram(), "u_sampler"); in init()
1284 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1285 gl.useProgram(m_programs[1]->getProgram()); in init()
1286 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1287 gl.uniform1i(samplerLoc, 0); in init()
1288 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1291 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1292 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1296 gl.useProgram(m_programs[0]->getProgram()); in init()
1298 gl.useProgram(m_programs[1]->getProgram()); in init()
1312 gl.useProgram(m_programs[0]->getProgram()); in init()
1313 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1314 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1315 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1317 gl.enableVertexAttribArray(coordLoc); in init()
1318 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1319 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1320 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1321 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1322 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1324 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1325 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1327 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1328 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1330 gl.uniform1i(samplerLoc, 0); in init()
1331 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1333 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1334 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1338 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); in init()
1340 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); in init()
1354 gl.useProgram(m_programs[0]->getProgram()); in init()
1355 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1356 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1357 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1359 gl.enableVertexAttribArray(coordLoc); in init()
1360 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1361 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1362 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1363 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1364 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1366 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1367 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1369 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1370 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1372 gl.uniform1i(samplerLoc, 0); in init()
1373 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.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); in init()
1382 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 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_WRAP_S, GL_REPEAT); in init()
1424 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); in init()
1439 gl.useProgram(m_programs[0]->getProgram()); in init()
1440 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1441 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1442 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1444 gl.enableVertexAttribArray(coordLoc); in init()
1445 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1446 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1447 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1448 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1449 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1451 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1452 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1454 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1455 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1457 gl.uniform1i(samplerLoc, 0); in init()
1458 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1460 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1461 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1463 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1464 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindFramebuffer()"); in init()
1468 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[0]); in init()
1470 gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffers[1]); in init()
1484 gl.useProgram(m_programs[0]->getProgram()); in init()
1485 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram()"); in init()
1486 GLint coordLoc = gl.getAttribLocation(m_programs[0]->getProgram(), "a_coord"); in init()
1487 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetAttribLocation()"); in init()
1489 gl.enableVertexAttribArray(coordLoc); in init()
1490 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnableVertexAttribArray()"); in init()
1491 gl.bindBuffer(GL_ARRAY_BUFFER, m_coordBuffers[0]); in init()
1492 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindBuffer()"); in init()
1493 gl.vertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, NULL); in init()
1494 GLU_EXPECT_NO_ERROR(gl.getError(), "glVertexAttribPointer()"); in init()
1496 GLint samplerLoc = gl.getUniformLocation(m_programs[0]->getProgram(), "u_sampler"); in init()
1497 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetUniformLocation()"); in init()
1499 gl.bindTexture(GL_TEXTURE_2D, m_textures[0]); in init()
1500 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture()"); in init()
1502 gl.uniform1i(samplerLoc, 0); in init()
1503 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i()"); in init()
1505 gl.viewport(0, 0, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in init()
1506 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport()"); in init()
1508 gl.enable(GL_BLEND); in init()
1509 GLU_EXPECT_NO_ERROR(gl.getError(), "glEnable()"); in init()
1511 gl.blendFunc(GL_CONSTANT_COLOR, GL_CONSTANT_COLOR); in init()
1512 GLU_EXPECT_NO_ERROR(gl.getError(), "glBlendFunc()"); in init()
1516 gl.blendColor(0.25f, 0.25f, 0.25f, 0.25f); in init()
1518 gl.blendColor(0.75f, 0.75f, 0.75f, 0.75f); in init()