Lines Matching refs:gl

83 void TextureSamplerTest::setTextureState (const glw::Functions& gl, GLenum target, SamplingState st…  in setTextureState()  argument
85 gl.texParameteri(target, GL_TEXTURE_MIN_FILTER, state.minFilter); in setTextureState()
86 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_MIN_FILTER, state.minFilter… in setTextureState()
87 gl.texParameteri(target, GL_TEXTURE_MAG_FILTER, state.magFilter); in setTextureState()
88 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_MAG_FILTER, state.magFilter… in setTextureState()
89 gl.texParameteri(target, GL_TEXTURE_WRAP_S, state.wrapS); in setTextureState()
90 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_WRAP_S, state.wrapS)"); in setTextureState()
91 gl.texParameteri(target, GL_TEXTURE_WRAP_T, state.wrapT); in setTextureState()
92 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_WRAP_T, state.wrapT)"); in setTextureState()
93 gl.texParameteri(target, GL_TEXTURE_WRAP_R, state.wrapR); in setTextureState()
94 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_WRAP_R, state.wrapR)"); in setTextureState()
95 gl.texParameterf(target, GL_TEXTURE_MAX_LOD, state.maxLod); in setTextureState()
96 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameterf(target, GL_TEXTURE_MAX_LOD, state.maxLod)"); in setTextureState()
97 gl.texParameterf(target, GL_TEXTURE_MIN_LOD, state.minLod); in setTextureState()
98 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameterf(target, GL_TEXTURE_MIN_LOD, state.minLod)"); in setTextureState()
101 void TextureSamplerTest::setSamplerState (const glw::Functions& gl, SamplingState state, GLuint sam… in setSamplerState() argument
103 gl.samplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, state.minFilter); in setSamplerState()
104 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, state.minF… in setSamplerState()
105 gl.samplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, state.magFilter); in setSamplerState()
106 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, state.magF… in setSamplerState()
107 gl.samplerParameteri(sampler, GL_TEXTURE_WRAP_S, state.wrapS); in setSamplerState()
108 GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_WRAP_S, state.wrapS)"); in setSamplerState()
109 gl.samplerParameteri(sampler, GL_TEXTURE_WRAP_T, state.wrapT); in setSamplerState()
110 GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_WRAP_T, state.wrapT)"); in setSamplerState()
111 gl.samplerParameteri(sampler, GL_TEXTURE_WRAP_R, state.wrapR); in setSamplerState()
112 GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_WRAP_R, state.wrapR)"); in setSamplerState()
113 gl.samplerParameterf(sampler, GL_TEXTURE_MAX_LOD, state.maxLod); in setSamplerState()
114 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameterf(sampler, GL_TEXTURE_MAX_LOD, state.maxLod)… in setSamplerState()
115 gl.samplerParameterf(sampler, GL_TEXTURE_MIN_LOD, state.minLod); in setSamplerState()
116 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameterf(sampler, GL_TEXTURE_MIN_LOD, state.minLod)… in setSamplerState()
295 const glw::Functions& gl = m_renderCtx.getFunctions(); in render() local
300 gl.useProgram(m_program->getProgram()); in render()
301 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram(m_program->getProgram())"); in render()
303 samplerLoc = gl.getUniformLocation(m_program->getProgram(), "u_sampler"); in render()
306 scaleLoc = gl.getUniformLocation(m_program->getProgram(), "u_posScale"); in render()
309 gl.clearColor(0.5f, 0.5f, 0.5f, 1.0f); in render()
310 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearColor(0.5f, 0.5f, 0.5f, 1.0f)"); in render()
312 gl.clear(GL_COLOR_BUFFER_BIT); in render()
313 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear(GL_COLOR_BUFFER_BIT)"); in render()
315 gl.uniform1i(samplerLoc, 0); in render()
316 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i(samplerLoc, 0)"); in render()
318 gl.uniform1f(scaleLoc, 1.0f); in render()
319 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 1.0f)"); in render()
332 gl.uniform1f(scaleLoc, 0.25f); in render()
333 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 0.25f)"); in render()
349 gl.uniform1f(scaleLoc, 0.25f); in render()
350 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 0.25f)"); in render()
366 gl.uniform1f(scaleLoc, 0.25f); in render()
367 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 0.25f)"); in render()
379 GLuint TextureSamplerTest::createTexture2D (const glw::Functions& gl) in createTexture2D() argument
387 gl.genTextures(1, &texture); in createTexture2D()
388 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenTextures(1, &texture)"); in createTexture2D()
390 gl.bindTexture(GL_TEXTURE_2D, texture); in createTexture2D()
391 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_2D, texture)"); in createTexture2D()
393gl.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, refTexture.getWidth(), refTexture.getHeight(), 0, GL_RGB… in createTexture2D()
394 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, refTexture.getWidth()… in createTexture2D()
396 gl.generateMipmap(GL_TEXTURE_2D); in createTexture2D()
397 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenerateMipmap(GL_TEXTURE_2D)"); in createTexture2D()
399 gl.bindTexture(GL_TEXTURE_2D, 0); in createTexture2D()
400 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_2D, texture)"); in createTexture2D()
405 GLuint TextureSamplerTest::createTexture3D (const glw::Functions& gl) in createTexture3D() argument
413 gl.genTextures(1, &texture); in createTexture3D()
414 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenTextures(1, &texture)"); in createTexture3D()
416 gl.bindTexture(GL_TEXTURE_3D, texture); in createTexture3D()
417 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_3D, texture)"); in createTexture3D()
419gl.texImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, refTexture.getWidth(), refTexture.getHeight(), refTextur… in createTexture3D()
420 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, refTexture.getWidth()… in createTexture3D()
422 gl.generateMipmap(GL_TEXTURE_3D); in createTexture3D()
423 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenerateMipmap(GL_TEXTURE_3D)"); in createTexture3D()
425 gl.bindTexture(GL_TEXTURE_3D, 0); in createTexture3D()
426 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_3D, 0)"); in createTexture3D()
431 GLuint TextureSamplerTest::createTextureCube (const glw::Functions& gl) in createTextureCube() argument
450 gl.bindTexture(GL_TEXTURE_CUBE_MAP, texture); in createTextureCube()
451 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_CUBE_MAP, texture)"); in createTextureCube()
456gl.texImage2D(target, 0, GL_RGBA8, refTexture.getSize(), refTexture.getSize(), 0, GL_RGBA, GL_UNSI… in createTextureCube()
458 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexImage2D(GL_TEXTURE_CUBE_MAP_...) failed"); in createTextureCube()
460 gl.generateMipmap(GL_TEXTURE_CUBE_MAP); in createTextureCube()
461 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenerateMipmap(GL_TEXTURE_CUBE_MAP)"); in createTextureCube()
462 gl.bindTexture(GL_TEXTURE_CUBE_MAP, 0); in createTextureCube()
463 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_CUBE_MAP, texture)"); in createTextureCube()
468 GLuint TextureSamplerTest::createTexture (const glw::Functions& gl, GLenum target) in createTexture() argument
473 return createTexture2D(gl); in createTexture()
476 return createTexture3D(gl); in createTexture()
479 return createTextureCube(gl); in createTexture()
489 const glw::Functions& gl = m_renderCtx.getFunctions(); in renderReferences() local
490 GLuint texture = createTexture(gl, m_target); in renderReferences()
492 gl.viewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in renderReferences()
493 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT)"); in renderReferences()
495 gl.bindTexture(m_target, texture); in renderReferences()
496 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture)"); in renderReferences()
498 setTextureState(gl, m_target, m_textureState); in renderReferences()
502 setTextureState(gl, m_target, m_samplerState); in renderReferences()
506 gl.deleteTextures(1, &texture); in renderReferences()
507 GLU_EXPECT_NO_ERROR(gl.getError(), "glDeleteTextures(1, &texture)"); in renderReferences()
512 const glw::Functions& gl = m_renderCtx.getFunctions(); in renderResults() local
513 GLuint texture = createTexture(gl, m_target); in renderResults()
516 gl.viewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in renderResults()
517 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT)"); in renderResults()
519 gl.genSamplers(1, &sampler); in renderResults()
520 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenSamplers(1, &sampler)"); in renderResults()
523 gl.bindSampler(0, sampler); in renderResults()
524 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindSampler(0, sampler)"); in renderResults()
527 setSamplerState(gl, m_samplerState, sampler); in renderResults()
530 gl.bindTexture(m_target, texture); in renderResults()
531 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture)"); in renderResults()
533 setTextureState(gl, m_target, m_textureState); in renderResults()
540 gl.bindSampler(0, 0); in renderResults()
541 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindSampler(0, 0)"); in renderResults()
546 gl.deleteSamplers(1, &sampler); in renderResults()
547 GLU_EXPECT_NO_ERROR(gl.getError(), "glDeleteSamplers(1, &sampler)"); in renderResults()
548 gl.deleteTextures(1, &texture); in renderResults()
549 GLU_EXPECT_NO_ERROR(gl.getError(), "glDeleteTextures(1, &texture)"); in renderResults()
595 void MultiTextureSamplerTest::setTextureState (const glw::Functions& gl, GLenum target, SamplingSta… in setTextureState() argument
597 gl.texParameteri(target, GL_TEXTURE_MIN_FILTER, state.minFilter); in setTextureState()
598 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_MIN_FILTER, state.minFilter… in setTextureState()
599 gl.texParameteri(target, GL_TEXTURE_MAG_FILTER, state.magFilter); in setTextureState()
600 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_MAG_FILTER, state.magFilter… in setTextureState()
601 gl.texParameteri(target, GL_TEXTURE_WRAP_S, state.wrapS); in setTextureState()
602 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_WRAP_S, state.wrapS)"); in setTextureState()
603 gl.texParameteri(target, GL_TEXTURE_WRAP_T, state.wrapT); in setTextureState()
604 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_WRAP_T, state.wrapT)"); in setTextureState()
605 gl.texParameteri(target, GL_TEXTURE_WRAP_R, state.wrapR); in setTextureState()
606 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameteri(target, GL_TEXTURE_WRAP_R, state.wrapR)"); in setTextureState()
607 gl.texParameterf(target, GL_TEXTURE_MAX_LOD, state.maxLod); in setTextureState()
608 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameterf(target, GL_TEXTURE_MAX_LOD, state.maxLod)"); in setTextureState()
609 gl.texParameterf(target, GL_TEXTURE_MIN_LOD, state.minLod); in setTextureState()
610 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexParameterf(target, GL_TEXTURE_MIN_LOD, state.minLod)"); in setTextureState()
613 void MultiTextureSamplerTest::setSamplerState (const glw::Functions& gl, SamplingState state, GLuin… in setSamplerState() argument
615 gl.samplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, state.minFilter); in setSamplerState()
616 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, state.minF… in setSamplerState()
617 gl.samplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, state.magFilter); in setSamplerState()
618 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, state.magF… in setSamplerState()
619 gl.samplerParameteri(sampler, GL_TEXTURE_WRAP_S, state.wrapS); in setSamplerState()
620 GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_WRAP_S, state.wrapS)"); in setSamplerState()
621 gl.samplerParameteri(sampler, GL_TEXTURE_WRAP_T, state.wrapT); in setSamplerState()
622 GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_WRAP_T, state.wrapT)"); in setSamplerState()
623 gl.samplerParameteri(sampler, GL_TEXTURE_WRAP_R, state.wrapR); in setSamplerState()
624 GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameteri(sampler, GL_TEXTURE_WRAP_R, state.wrapR)"); in setSamplerState()
625 gl.samplerParameterf(sampler, GL_TEXTURE_MAX_LOD, state.maxLod); in setSamplerState()
626 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameterf(sampler, GL_TEXTURE_MAX_LOD, state.maxLod)… in setSamplerState()
627 gl.samplerParameterf(sampler, GL_TEXTURE_MIN_LOD, state.minLod); in setSamplerState()
628 …GLU_EXPECT_NO_ERROR(gl.getError(), "glSamplerParameterf(sampler, GL_TEXTURE_MIN_LOD, state.minLod)… in setSamplerState()
785 const glw::Functions& gl = m_renderCtx.getFunctions(); in render() local
791 gl.useProgram(m_program->getProgram()); in render()
792 GLU_EXPECT_NO_ERROR(gl.getError(), "glUseProgram(m_program->getProgram())"); in render()
803 gl.clearColor(0.5f, 0.5f, 0.5f, 1.0f); in render()
804 GLU_EXPECT_NO_ERROR(gl.getError(), "glClearColor(0.5f, 0.5f, 0.5f, 1.0f)"); in render()
806 gl.clear(GL_COLOR_BUFFER_BIT); in render()
807 GLU_EXPECT_NO_ERROR(gl.getError(), "glClear(GL_COLOR_BUFFER_BIT)"); in render()
809 gl.uniform1i(samplerLoc1, 0); in render()
810 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i(samplerLoc1, 0)"); in render()
812 gl.uniform1i(samplerLoc2, 1); in render()
813 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1i(samplerLoc2, 1)"); in render()
815 gl.uniform1f(scaleLoc, 1.0f); in render()
816 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 1.0f)"); in render()
829 gl.uniform1f(scaleLoc, 0.25f); in render()
830 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 0.25f)"); in render()
846 gl.uniform1f(scaleLoc, 0.25f); in render()
847 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 0.25f)"); in render()
863 gl.uniform1f(scaleLoc, 0.25f); in render()
864 GLU_EXPECT_NO_ERROR(gl.getError(), "glUniform1f(scaleLoc, 0.25f)"); in render()
876 GLuint MultiTextureSamplerTest::createTexture2D (const glw::Functions& gl, int id) in createTexture2D() argument
883 gl.genTextures(1, &texture); in createTexture2D()
884 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenTextures(1, &texture)"); in createTexture2D()
900 gl.bindTexture(GL_TEXTURE_2D, texture); in createTexture2D()
901 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_2D, texture)"); in createTexture2D()
903gl.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, refTexture.getWidth(), refTexture.getHeight(), 0, GL_RGB… in createTexture2D()
904 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, refTexture.getWidth()… in createTexture2D()
906 gl.generateMipmap(GL_TEXTURE_2D); in createTexture2D()
907 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenerateMipmap(GL_TEXTURE_2D)"); in createTexture2D()
909 gl.bindTexture(GL_TEXTURE_2D, 0); in createTexture2D()
910 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_2D, 0)"); in createTexture2D()
915 GLuint MultiTextureSamplerTest::createTexture3D (const glw::Functions& gl, int id) in createTexture3D() argument
922 gl.genTextures(1, &texture); in createTexture3D()
923 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenTextures(1, &texture)"); in createTexture3D()
939 gl.bindTexture(GL_TEXTURE_3D, texture); in createTexture3D()
940 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_3D, texture)"); in createTexture3D()
942gl.texImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, refTexture.getWidth(), refTexture.getHeight(), refTextur… in createTexture3D()
943 …GLU_EXPECT_NO_ERROR(gl.getError(), "glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, refTexture.getWidth()… in createTexture3D()
945 gl.generateMipmap(GL_TEXTURE_3D); in createTexture3D()
946 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenerateMipmap(GL_TEXTURE_3D)"); in createTexture3D()
948 gl.bindTexture(GL_TEXTURE_3D, 0); in createTexture3D()
949 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_3D, 0)"); in createTexture3D()
954 GLuint MultiTextureSamplerTest::createTextureCube (const glw::Functions& gl, int id) in createTextureCube() argument
959 gl.genTextures(1, &texture); in createTextureCube()
960 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenTextures(1, &texture)"); in createTextureCube()
993 gl.bindTexture(GL_TEXTURE_CUBE_MAP, texture); in createTextureCube()
994 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_CUBE_MAP, texture)"); in createTextureCube()
999gl.texImage2D(target, 0, GL_RGBA8, refTexture.getSize(), refTexture.getSize(), 0, GL_RGBA, GL_UNSI… in createTextureCube()
1001 GLU_EXPECT_NO_ERROR(gl.getError(), "glTexImage2D(GL_TEXTURE_CUBE_MAP_...) failed"); in createTextureCube()
1003 gl.generateMipmap(GL_TEXTURE_CUBE_MAP); in createTextureCube()
1004 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenerateMipmap(GL_TEXTURE_CUBE_MAP)"); in createTextureCube()
1005 gl.bindTexture(GL_TEXTURE_CUBE_MAP, 0); in createTextureCube()
1006 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(GL_TEXTURE_CUBE_MAP, 0)"); in createTextureCube()
1011 GLuint MultiTextureSamplerTest::createTexture (const glw::Functions& gl, GLenum target, int id) in createTexture() argument
1016 return createTexture2D(gl, id); in createTexture()
1019 return createTexture3D(gl, id); in createTexture()
1022 return createTextureCube(gl, id); in createTexture()
1032 const glw::Functions& gl = m_renderCtx.getFunctions(); in renderReferences() local
1033 GLuint texture1 = createTexture(gl, m_target, 0); in renderReferences()
1034 GLuint texture2 = createTexture(gl, m_target, 1); in renderReferences()
1036 gl.viewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in renderReferences()
1037 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT)"); in renderReferences()
1040 gl.activeTexture(GL_TEXTURE0); in renderReferences()
1041 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE0)"); in renderReferences()
1042 gl.bindTexture(m_target, texture1); in renderReferences()
1043 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture1)"); in renderReferences()
1044 setTextureState(gl, m_target, m_textureState1); in renderReferences()
1046 gl.activeTexture(GL_TEXTURE1); in renderReferences()
1047 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE1)"); in renderReferences()
1048 gl.bindTexture(m_target, texture2); in renderReferences()
1049 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture2)"); in renderReferences()
1050 setTextureState(gl, m_target, m_textureState2); in renderReferences()
1056 gl.activeTexture(GL_TEXTURE0); in renderReferences()
1057 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE0)"); in renderReferences()
1058 gl.bindTexture(m_target, texture1); in renderReferences()
1059 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture1)"); in renderReferences()
1060 setTextureState(gl, m_target, m_samplerState); in renderReferences()
1062 gl.activeTexture(GL_TEXTURE1); in renderReferences()
1063 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE1)"); in renderReferences()
1064 gl.bindTexture(m_target, texture2); in renderReferences()
1065 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture2)"); in renderReferences()
1066 setTextureState(gl, m_target, m_samplerState); in renderReferences()
1074 const glw::Functions& gl = m_renderCtx.getFunctions(); in renderResults() local
1075 GLuint texture1 = createTexture(gl, m_target, 0); in renderResults()
1076 GLuint texture2 = createTexture(gl, m_target, 1); in renderResults()
1079 gl.viewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in renderResults()
1080 GLU_EXPECT_NO_ERROR(gl.getError(), "glViewport(x, y, VIEWPORT_WIDTH, VIEWPORT_HEIGHT)"); in renderResults()
1082 gl.genSamplers(1, &sampler); in renderResults()
1083 GLU_EXPECT_NO_ERROR(gl.getError(), "glGenSamplers(1, &sampler)"); in renderResults()
1086 gl.bindSampler(0, sampler); in renderResults()
1087 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindSampler(0, sampler)"); in renderResults()
1088 gl.bindSampler(1, sampler); in renderResults()
1089 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindSampler(1, sampler)"); in renderResults()
1092 setSamplerState(gl, m_samplerState, sampler); in renderResults()
1095 gl.bindTexture(m_target, texture1); in renderResults()
1096 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture1)"); in renderResults()
1097 setTextureState(gl, m_target, m_textureState1); in renderResults()
1099 gl.bindTexture(m_target, texture2); in renderResults()
1100 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture2)"); in renderResults()
1101 setTextureState(gl, m_target, m_textureState2); in renderResults()
1103 gl.activeTexture(GL_TEXTURE0); in renderResults()
1104 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE0)"); in renderResults()
1105 gl.bindTexture(m_target, texture1); in renderResults()
1106 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture1)"); in renderResults()
1108 gl.activeTexture(GL_TEXTURE1); in renderResults()
1109 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE1)"); in renderResults()
1110 gl.bindTexture(m_target, texture2); in renderResults()
1111 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, texture2)"); in renderResults()
1117 gl.bindSampler(0, 0); in renderResults()
1118 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindSampler(0, 0)"); in renderResults()
1119 gl.bindSampler(1, 0); in renderResults()
1120 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindSampler(1, 0)"); in renderResults()
1125 gl.activeTexture(GL_TEXTURE0); in renderResults()
1126 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE0)"); in renderResults()
1127 gl.bindTexture(m_target, 0); in renderResults()
1128 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, 0)"); in renderResults()
1130 gl.activeTexture(GL_TEXTURE1); in renderResults()
1131 GLU_EXPECT_NO_ERROR(gl.getError(), "glActiveTexture(GL_TEXTURE1)"); in renderResults()
1132 gl.bindTexture(m_target, 0); in renderResults()
1133 GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture(m_target, 0)"); in renderResults()
1135 gl.deleteSamplers(1, &sampler); in renderResults()
1136 GLU_EXPECT_NO_ERROR(gl.getError(), "glDeleteSamplers(1, &sampler)"); in renderResults()
1137 gl.deleteTextures(1, &texture1); in renderResults()
1138 GLU_EXPECT_NO_ERROR(gl.getError(), "glDeleteTextures(1, &texture1)"); in renderResults()
1139 gl.deleteTextures(1, &texture2); in renderResults()
1140 GLU_EXPECT_NO_ERROR(gl.getError(), "glDeleteTextures(1, &texture2)"); in renderResults()