Home | History | Annotate | Download | only in libGLESv2

Lines Matching full:context

22 #include "libGLESv2/Context.h"
44 gl::Context *context = gl::getContext();
46 if (context)
48 context->setActiveSampler(texture - GL_TEXTURE0);
63 gl::Context *context = gl::getContext();
65 if (context)
67 gl::Program *programObject = context->getProgram(program);
68 gl::Shader *shaderObject = context->getShader(shader);
72 if (context->getShader(program))
84 if (context->getProgram(shader))
117 gl::Context *context = gl::getContext();
119 if (context)
121 gl::Program *programObject = context->getProgram(program);
125 if (context->getShader(program))
155 gl::Context *context = gl::getContext();
157 if (context)
162 context->bindArrayBuffer(buffer);
165 context->bindElementArrayBuffer(buffer);
189 gl::Context *context = gl::getContext();
191 if (context)
195 context->bindReadFramebuffer(framebuffer);
200 context->bindDrawFramebuffer(framebuffer);
221 gl::Context *context = gl::getContext();
223 if (context)
225 context->bindRenderbuffer(renderbuffer);
240 gl::Context *context = gl::getContext();
242 if (context)
244 gl::Texture *textureObject = context->getTexture(texture);
254 context->bindTexture2D(texture);
257 context->bindTextureCubeMap(texture);
277 gl::Context* context = gl::getContext();
279 if (context)
281 context->setBlendColor(gl::clamp01(red), gl::clamp01(green), gl::clamp01(blue), gl::clamp01(alpha));
321 gl::Context *context = gl::getContext();
323 if (context)
325 context->setBlendEquation(modeRGB, modeAlpha);
444 gl::Context *context = gl::getContext();
446 if (context)
448 context->setBlendFactors(srcRGB, dstRGB, srcAlpha, dstAlpha);
479 gl::Context *context = gl::getContext();
481 if (context)
488 buffer = context->getArrayBuffer();
491 buffer = context->getElementArrayBuffer();
528 gl::Context *context = gl::getContext();
530 if (context)
537 buffer = context->getArrayBuffer();
540 buffer = context->getElementArrayBuffer();
576 gl::Context *context = gl::getContext();
578 if (context)
583 framebuffer = context->getReadFramebuffer();
587 framebuffer = context->getDrawFramebuffer();
607 gl::Context *context = gl::getContext();
609 if (context)
611 context->clear(mask);
627 gl::Context *context = gl::getContext();
629 if (context)
631 context->setClearColor(red, green, blue, alpha);
646 gl::Context *context = gl::getContext();
648 if (context)
650 context->setClearDepth(depth);
665 gl::Context *context = gl::getContext();
667 if (context)
669 context->setClearStencil(s);
685 gl::Context *context = gl::getContext();
687 if (context)
689 context->setColorMask(red == GL_TRUE, green == GL_TRUE, blue == GL_TRUE, alpha == GL_TRUE);
704 gl::Context *context = gl::getContext();
706 if (context)
708 gl::Shader *shaderObject = context->getShader(shader);
712 if (context->getProgram(shader))
764 gl::Context *context = gl::getContext();
766 if (context)
768 if (level > context->getMaximumTextureLevel())
776 if (width > (context->getMaximumTextureDimension() >> level) ||
777 height > (context->getMaximumTextureDimension() >> level))
793 if (width > (context->getMaximumCubeTextureDimension() >> level) ||
794 height > (context->getMaximumCubeTextureDimension() >> level))
803 if (!context->supportsCompressedTextures())
815 gl::Texture2D *texture = context->getTexture2D();
826 gl::TextureCubeMap *texture = context->getTextureCubeMap();
895 gl::Context *context = gl::getContext();
897 if (context)
899 if (level > context->getMaximumTextureLevel())
904 if (!context->supportsCompressedTextures())
922 gl::Texture2D *texture = context->getTexture2D();
944 gl::TextureCubeMap *texture = context->getTextureCubeMap();
999 gl::Context *context = gl::getContext();
1001 if (context)
1006 if (width > (context->getMaximumTextureDimension() >> level) ||
1007 height > (context->getMaximumTextureDimension() >> level))
1023 if (width > (context->getMaximumCubeTextureDimension() >> level) ||
1024 height > (context->getMaximumCubeTextureDimension() >> level))
1033 gl::Framebuffer *framebuffer = context->getReadFramebuffer();
1040 if (context->getReadFramebufferHandle() != 0 && framebuffer->getColorbuffer()->getSamples() != 0)
1086 if (context->supportsCompressedTextures())
1101 gl::Texture2D *texture = context->getTexture2D();
1112 gl::TextureCubeMap *texture = context->getTextureCubeMap();
1158 gl::Context *context = gl::getContext();
1160 if (context)
1162 if (level > context->getMaximumTextureLevel())
1167 gl::Framebuffer *framebuffer = context->getReadFramebuffer();
1174 if (context
1185 texture = context->getTexture2D();
1189 texture = context->getTextureCubeMap();
1259 gl::Context *context = gl::getContext();
1261 if (context)
1263 return context->createProgram();
1280 gl::Context *context = gl::getContext();
1282 if (context)
1288 return context->createShader(type);
1314 gl::Context *context = gl::getContext();
1316 if (context)
1318 context->setCullMode(mode);
1343 gl::Context *context = gl::getContext();
1345 if (context)
1349 context->deleteBuffer(buffers[i]);
1370 gl::Context *context = gl::getContext();
1372 if (context)
1376 context->deleteFence(fences[i]);
1397 gl::Context *context = gl::getContext();
1399 if (context)
1405 context->deleteFramebuffer(framebuffers[i]);
1427 gl::Context *context = gl::getContext();
1429 if (context)
1431 if (!context->getProgram(program))
1433 if(context->getShader(program))
1443 context->deleteProgram(program);
1463 gl::Context *context = gl::getContext();
1465 if (context)
1469 context->deleteRenderbuffer(renderbuffers[i]);
1490 gl::Context *context = gl::getContext();
1492 if (context)
1494 if (!context->getShader(shader))
1496 if(context->getProgram(shader))
1506 context->deleteShader(shader);
1526 gl::Context *context = gl::getContext();
1528 if (context)
1534 context->deleteTexture(textures[i]);
1566 gl::Context *context = gl::getContext();
1568 if (context)
1570 context->setDepthFunc(func);
1585 gl::Context *context = gl::getContext();
1587 if (context)
1589 context->setDepthMask(flag != GL_FALSE);
1604 gl::Context *context = gl::getContext();
1606 if (context)
1608 context->setDepthRange(zNear, zFar);
1623 gl::Context *context = gl::getContext();
1625 if (context)
1628 gl::Program *programObject = context->getProgram(program);
1629 gl::Shader *shaderObject = context->getShader(shader);
1634 shaderByProgramHandle = context->getShader(program);
1647 gl::Program *programByShaderHandle = context->getProgram(shader);
1676 gl::Context *context = gl::getContext();
1678 if (context)
1682 case GL_CULL_FACE: context->setCullFace(false); break;
1683 case GL_POLYGON_OFFSET_FILL: context->setPolygonOffsetFill(false); break;
1684 case GL_SAMPLE_ALPHA_TO_COVERAGE: context->setSampleAlphaToCoverage(false); break;
1685 case GL_SAMPLE_COVERAGE: context->setSampleCoverage(false); break;
1686 case GL_SCISSOR_TEST: context->setScissorTest(false); break;
1687 case GL_STENCIL_TEST: context->setStencilTest(false); break;
1688 case GL_DEPTH_TEST: context->setDepthTest(false); break;
1689 case GL_BLEND: context->setBlend(false); break;
1690 case GL_DITHER: context->setDither(false); break;
1713 gl::Context *context = gl::getContext();
1715 if (context)
1717 context->setEnableVertexAttribArray(index, false);
1737 gl::Context *context = gl::getContext();
1739 if (context)
1741 context->drawArrays(mode, first, count);
1762 gl::Context *context = gl::getContext();
1764 if (context)
1772 if (!context->supports32bitIndices())
1781 context->drawElements(mode, count, type, indices);
1796 gl::Context *context = gl::getContext();
1798 if (context)
1802 case GL_CULL_FACE: context->setCullFace(true); break;
1803 case GL_POLYGON_OFFSET_FILL: context->setPolygonOffsetFill(true); break;
1804 case GL_SAMPLE_ALPHA_TO_COVERAGE: context->setSampleAlphaToCoverage(true); break;
1805 case GL_SAMPLE_COVERAGE: context->setSampleCoverage(true); break;
1806 case GL_SCISSOR_TEST: context->setScissorTest(true); break;
1807 case GL_STENCIL_TEST: context->setStencilTest(true); break;
1808 case GL_DEPTH_TEST: context->setDepthTest(true); break;
1809 case GL_BLEND: context->setBlend(true); break;
1810 case GL_DITHER: context->setDither(true); break;
1833 gl::Context *context = gl::getContext();
1835 if (context)
1837 context->setEnableVertexAttribArray(index, true);
1852 gl::Context *context = gl::getContext();
1854 if (context)
1856 gl::Fence* fenceObject = context->getFence(fence);
1878 gl::Context *context = gl::getContext();
1880 if (context)
1882 context->finish();
1897 gl::Context *context = gl::getContext();
1899 if (context)
1901 context->flush();
1923 gl::Context *context = gl::getContext();
1925 if (context)
1931 framebuffer = context->getReadFramebuffer();
1932 framebufferHandle = context->getReadFramebufferHandle();
1936 framebuffer = context->getDrawFramebuffer();
1937 framebufferHandle = context->getDrawFramebufferHandle();
1989 gl::Context *context = gl::getContext();
1991 if (context)
1999 gl::Texture *tex = context->getTexture(texture);
2046 framebuffer = context->getReadFramebuffer();
2047 framebufferHandle = context->getReadFramebufferHandle();
2051 framebuffer = context->getDrawFramebuffer();
2052 framebufferHandle = context->getDrawFramebufferHandle();
2085 gl::Context *context = gl::getContext();
2087 if (context)
2089 context->setFrontFace(mode);
2114 gl::Context *context = gl::getContext();
2116 if (context)
2120 buffers[i] = context->createBuffer();
2136 gl::Context *context = gl::getContext();
2138 if (context)
2145 texture = context->getTexture2D();
2149 texture = context->getTextureCubeMap();
2181 gl::Context *context = gl::getContext();
2183 if (context)
2187 fences[i] = context->createFence();
2208 gl::Context *context = gl::getContext();
2210 if (context)
2214 framebuffers[i] = context->createFramebuffer();
2235 gl::Context *context = gl::getContext();
2237 if (context)
2241 renderbuffers[i] = context->createRenderbuffer();
2262 gl::Context *context = gl::getContext();
2264 if (context)
2268 textures[i] = context->createTexture();
2291 gl::Context *context = gl::getContext();
2293 if (context)
2295 gl::Program *programObject = context->getProgram(program);
2299 if (context->getShader(program))
2336 gl::Context *context = gl::getContext();
2338 if (context)
2340 gl::Program *programObject = context->getProgram(program);
2344 if (context->getShader(program))
2380 gl::Context *context = gl::getContext();
2382 if (context)
2384 gl::Program *programObject = context->getProgram(program);
2388 if (context->getShader(program))
2413 gl::Context *context = gl::getContext();
2415 if (context)
2418 gl::Program *programObject = context->getProgram(program);
2422 if (context->getShader(program))
2454 gl::Context *context = gl::getContext();
2456 if (context)
2458 if (!(context->getBooleanv(pname, params)))
2462 if (!context->getQueryParameterInfo(pname, &nativeType, &numParams))
2473 context->getFloatv(pname, floatParams);
2490 context
2517 gl::Context *context = gl::getContext();
2519 if (context)
2526 buffer = context->getArrayBuffer();
2529 buffer = context->getElementArrayBuffer();
2562 gl::Context *context = gl::getContext();
2564 if (context)
2566 return context->getError();
2579 gl::Context *context = gl::getContext();
2581 if (context)
2583 gl::Fence *fenceObject = context->getFence(fence);
2605 gl::Context *context = gl::getContext();
2607 if (context)
2609 if (!(context->getFloatv(pname, params)))
2613 if (!context->getQueryParameterInfo(pname, &nativeType, &numParams))
2624 context->getBooleanv(pname, boolParams);
2641 context->getIntegerv(pname, intParams);
2666 gl::Context *context = gl::getContext();
2668 if (context)
2678 if(context->getReadFramebufferHandle() == 0)
2683 framebuffer = context->getReadFramebuffer();
2687 if (context->getDrawFramebufferHandle() == 0)
2692 framebuffer = context->getDrawFramebuffer();
2784 gl::Context *context = gl::getContext();
2786 if (context)
2788 if (!(context->getIntegerv(pname, params)))
2792 if (!context->getQueryParameterInfo(pname, &nativeType, &numParams))
2803 context->getBooleanv(pname, boolParams);
2820 context->getFloatv(pname, floatParams);
2849 gl::Context *context = gl::getContext();
2851 if (context)
2853 gl::Program *programObject = context->getProgram(program);
2912 gl::Context *context = gl::getContext();
2914 if (context)
2916 gl::Program *programObject = context->getProgram(program);
2938 gl::Context *context = gl::getContext();
2940 if (context)
2947 if (context->getRenderbufferHandle() == 0)
2952 gl::Renderbuffer *renderbuffer = context->getRenderbuffer(context->getRenderbufferHandle());
3027 if (context->getMaxSupportedSamples() != 0)
3054 gl::Context *context = gl::getContext();
3056 if (context)
3058 gl::Shader *shaderObject = context->getShader(shader);
3105 gl::Context *context = gl::getContext();
3107 if (context)
3109 gl::Shader *shaderObject = context->getShader(shader);
3182 gl::Context *context = gl::getContext();
3184 if (context)
3186 gl::Shader *shaderObject = context->getShader(shader);
3208 gl::Context *context = gl::getContext();
3221 return (GLubyte*)((context != NULL) ? context->getExtensionString() : "");
3240 gl::Context *context = gl::getContext();
3242 if (context)
3249 texture = context->getTexture2D();
3252 texture = context->getTextureCubeMap();
3289 gl::Context *context = gl::getContext();
3291 if (context)
3298 texture = context->getTexture2D();
3301 texture = context->getTextureCubeMap();
3338 gl::Context *context = gl::getContext();
3340 if (context)
3347 gl::Program *programObject = context->getProgram(program);
3372 gl::Context *context = gl::getContext();
3374 if (context)
3381 gl::Program *programObject = context->getProgram(program);
3411 gl::Context *context = gl::getContext();
3418 if (context)
3420 gl::Program *programObject = context->getProgram(program);
3424 if (context->getShader(program))
3456 gl::Context *context = gl::getContext();
3458 if (context)
3465 const gl::VertexAttribute &attribState = context->getVertexAttribState(index);
3509 gl::Context *context = gl::getContext();
3511 if (context)
3518 const gl::VertexAttribute &attribState = context->getVertexAttribState(index);
3563 gl::Context *context = gl::getContext();
3565 if (context)
3577 *pointer = const_cast<GLvoid*>(context->getVertexAttribPointer(index));
3602 gl::Context *context = gl::getContext();
3606 if (context) context->setGenerateMipmapHint(mode);
3609 if (context) context->setFragmentShaderDerivativeHint(mode);
3627 gl::Context *context = gl::getContext();
3629 if (context && buffer)
3631 gl::Buffer *bufferObject = context->getBuffer(buffer);
3653 gl::Context *context = gl::getContext();
3655 if (context)
3659 case GL_CULL_FACE: return context->isCullFaceEnabled();
3660 case GL_POLYGON_OFFSET_FILL: return context->isPolygonOffsetFillEnabled();
3661 case GL_SAMPLE_ALPHA_TO_COVERAGE: return context->isSampleAlphaToCoverageEnabled();
3662 case GL_SAMPLE_COVERAGE: return context->isSampleCoverageEnabled();
3663 case GL_SCISSOR_TEST: return context->isScissorTestEnabled();
3664 case GL_STENCIL_TEST: return context->isStencilTestEnabled();
3665 case GL_DEPTH_TEST: return context->isDepthTestEnabled();
3666 case GL_BLEND: return context->isBlendEnabled();
3667 case GL_DITHER: return context->isDitherEnabled();
3687 gl::Context *context = gl::getContext();
3689 if (context)
3691 gl::Fence *fenceObject = context->getFence(fence);
3715 gl::Context *context = gl::getContext();
3717 if (context && framebuffer)
3719 gl::Framebuffer *framebufferObject = context->getFramebuffer(framebuffer);
3741 gl::Context *context = gl::getContext();
3743 if (context && program)
3745 gl::Program *programObject = context->getProgram(program);
3767 gl::Context *context = gl::getContext();
3769 if (context && renderbuffer)
3771 gl::Renderbuffer *renderbufferObject = context->getRenderbuffer(renderbuffer);
3793 gl::Context *context = gl::getContext();
3795 if (context && shader)
3797 gl::Shader *shaderObject = context->getShader(shader);
3819 gl::Context *context = gl::getContext();
3821 if (context && texture)
3823 gl::Texture *textureObject = context->getTexture(texture);
3850 gl::Context *context = gl::getContext();
3852 if (context)
3854 context->setLineWidth(width);
3869 gl::Context *context = gl::getContext();
3871 if (context)
3873 gl::Program *programObject = context->getProgram(program);
3877 if (context->getShader(program))
3902 gl::Context *context = gl::getContext();
3904 if (context)
3914 context->setUnpackAlignment(param);
3923 context->setPackAlignment(param);
3943 gl::Context *context = gl::getContext();
3945 if (context)
3947 context->setPolygonOffsetParams(factor, units);
4004 gl::Context *context = gl::getContext();
4006 if (context)
4008 context->readPixels(x, y, width, height, format, type, pixels);
4056 gl::Context *context = gl::getContext();
4058 if (context)
4060 if (width > context->getMaximumRenderbufferDimension() ||
4061 height > context->getMaximumRenderbufferDimension() ||
4062 samples > context->getMaxSupportedSamples())
4067 GLuint handle = context->getRenderbufferHandle();
4076 context->setRenderbufferStorage(new gl::Depthbuffer(width, height, samples));
4083 context->setRenderbufferStorage(new gl::Colorbuffer(width, height, internalformat, samples));
4086 context->setRenderbufferStorage(new gl::Stencilbuffer(width, height, samples));
4089 context->setRenderbufferStorage(new gl::DepthStencilbuffer(width, height, samples));
4113 gl::Context* context = gl::getContext();
4115 if (context)
4117 context->setSampleCoverageParams(gl::clamp01(value), invert == GL_TRUE);
4137 gl::Context *context = gl::getContext();
4139 if (context)
4141 gl::Fence *fenceObject = context->getFence(fence);
4168 gl::Context* context = gl::getContext();
4170 if (context)
4172 context->setScissorParams(x, y, width, height);
4210 gl::Context *context = gl::getContext();
4212 if (context)
4214 gl::Shader *shaderObject = context->getShader(shader);
4218 if (context->getProgram(shader))
4273 gl::Context *context = gl::getContext();
4275 if (context)
4279 context->setStencilParams(func, ref, mask);
4284 context->setStencilBackParams(func, ref, mask);
4315 gl::Context *context = gl::getContext();
4317 if (context)
4321 context->setStencilWritemask(mask);
4326 context->setStencilBackWritemask(mask);
4403 gl::Context *context = gl::getContext();
4405 if (context)
4409 context->setStencilOperations(fail, zfail, zpass);
4414 context->setStencilBackOperations(fail, zfail, zpass);
4430 gl::Context *context = gl::getContext();
4432 if (context)
4434 gl::Fence *fenceObject = context->getFence(fence);
4537 gl::Context *context = gl::getContext();
4539 if (context)
4544 if (width > (context->getMaximumTextureDimension() >> level) ||
4545 height > (context->getMaximumTextureDimension() >> level))
4561 if (width > (context->getMaximumCubeTextureDimension() >> level) ||
4562 height > (context->getMaximumCubeTextureDimension() >> level))
4574 if (context->supportsCompressedTextures())
4586 if (!context->supportsFloatTextures())
4593 if (!context->supportsHalfFloatTextures())
4601 gl::Texture2D *texture = context->getTexture2D();
4608 texture->setImage(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4612 gl::TextureCubeMap *texture = context->getTextureCubeMap();
4622 texture->setImagePosX(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4625 texture->setImageNegX(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4628 texture->setImagePosY(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4631 texture->setImageNegY(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4634 texture->setImagePosZ(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4637 texture->setImageNegZ(level, internalformat, width, height, format, type, context->getUnpackAlignment(), pixels);
4666 gl::Context *context = gl::getContext();
4668 if (context)
4675 texture = context->getTexture2D();
4678 texture = context->getTextureCubeMap();
4761 gl::Context *context = gl::getContext();
4763 if (context)
4765 if (level > context->getMaximumTextureLevel())
4772 if (!context->supportsFloatTextures())
4779 if (!context->supportsHalfFloatTextures())
4787 gl::Texture2D *texture = context->getTexture2D();
4804 texture->subImage(level, xoffset, yoffset, width, height, format, type, context->getUnpackAlignment(), pixels);
4808 gl::TextureCubeMap *texture = context->getTextureCubeMap();
4825 texture->subImage(target, level, xoffset, yoffset, width, height, format, type, context->getUnpackAlignment(), pixels);
4860 gl::Context *context = gl::getContext();
4862 if (context)
4864 context->getCurrentProgram();
4904 gl::Context *context = gl::getContext();
4906 if (context)
4908 gl::Program *program = context->getCurrentProgram();
4950 gl::Context *context = gl::getContext();
4952 if (context)
4954 gl::Program *program = context->getCurrentProgram();
4996 gl::Context *context = gl::getContext();
4998 if (context)
5000 gl::Program *program = context->getCurrentProgram();
5042 gl::Context *context = gl::getContext();
5044 if (context)
5046 gl::Program *program = context->getCurrentProgram();
5088 gl::Context *context = gl::getContext();
5090 if (context)
5092 gl::Program *program = context->getCurrentProgram();
5134 gl::Context *context = gl::getContext();
5136 if (context)
5138 gl::Program *program = context->getCurrentProgram();
5180 gl::Context *context = gl::getContext();
5182 if (context)
5184 gl::Program *program = context->getCurrentProgram();
5220 gl::Context *context = gl::getContext();
5222 if (context)
5224 gl::Program *program = context->getCurrentProgram();
5260 gl::Context *context = gl::getContext();
5262 if (context)
5264 gl::Program *program = context->getCurrentProgram();
5300 gl::Context *context = gl::getContext();
5302 if (context)
5304 gl::Program *program = context->getCurrentProgram();
5329 gl::Context *context = gl::getContext();
5331 if (context)
5333 gl::Program *programObject = context->getProgram(program);
5337 if (context->getShader(program))
5352 context->useProgram(program);
5367 gl::Context *context = gl::getContext();
5369 if (context)
5371 gl::Program *programObject = context->getProgram(program);
5375 if (context->getShader(program))
5405 gl::Context *context = gl::getContext();
5407 if (context)
5410 context->setVertexAttrib(index, vals);
5430 gl::Context *context = gl::getContext();
5432 if (context)
5435 context->setVertexAttrib(index, vals);
5455 gl::Context *context = gl::getContext();
5457 if (context)
5460 context->setVertexAttrib(index, vals);
5480 gl::Context *context = gl::getContext();
5482 if (context)
5485 context->setVertexAttrib(index, vals);
5505 gl::Context *context = gl::getContext();
5507 if (context)
5510 context->setVertexAttrib(index, vals);
5530 gl::Context *context = gl::getContext();
5532 if (context)
5535 context->setVertexAttrib(index, vals);
5555 gl::Context *context = gl::getContext();
5557 if (context)
5560 context->setVertexAttrib(index, vals);
5580 gl::Context *context = gl::getContext();
5582 if (context)
5584 context->setVertexAttrib(index, values);
5629 gl::Context *context = gl::getContext();
5631 if (context)
5633 context->setVertexAttribState(index, context->getArrayBuffer(), size, type, (normalized == GL_TRUE), stride, ptr);
5653 gl::Context *context = gl::getContext();
5655 if (context)
5657 context->setViewportParams(x, y, width, height);
5695 gl::Context *context = gl::getContext();
5697 if (context)
5699 if (context->getReadFramebufferHandle() == context->getDrawFramebufferHandle())
5705 context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask);