Lines Matching refs:GraphicsContext3D
58 virtual void onDetached(GraphicsContext3D*);
59 virtual void attach(GraphicsContext3D*, GC3Denum attachment);
60 virtual void unattach(GraphicsContext3D*, GC3Denum attachment);
90 if (format == GraphicsContext3D::DEPTH_STENCIL
92 && m_renderbuffer->emulatedStencilBuffer()->getInternalFormat() != GraphicsContext3D::STENCIL_INDEX8) {
124 void WebGLRenderbufferAttachment::onDetached(GraphicsContext3D* context)
129 void WebGLRenderbufferAttachment::attach(GraphicsContext3D* context, GC3Denum attachment)
132 if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT && m_renderbuffer->emulatedStencilBuffer()) {
133 context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, object);
134 context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, objectOrZero(m_renderbuffer->emulatedStencilBuffer()));
136 context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, attachment, GraphicsContext3D::RENDERBUFFER, object);
140 void WebGLRenderbufferAttachment::unattach(GraphicsContext3D* context, GC3Denum attachment)
142 if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT) {
143 context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, 0);
144 context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, 0);
146 context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, attachment, GraphicsContext3D::RENDERBUFFER, 0);
170 virtual void onDetached(GraphicsContext3D*);
171 virtual void attach(GraphicsContext3D*, GC3Denum attachment);
172 virtual void unattach(GraphicsContext3D*, GC3Denum attachment);
234 void WebGLTextureAttachment::onDetached(GraphicsContext3D* context)
239 void WebGLTextureAttachment::attach(GraphicsContext3D* context, GC3Denum attachment)
242 context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, attachment, m_target, object, m_level);
245 void WebGLTextureAttachment::unattach(GraphicsContext3D* context, GC3Denum attachment)
247 if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT) {
248 context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, m_target, 0, m_level);
249 context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, m_target, 0, m_level);
251 context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, attachment, m_target, 0, m_level);
262 case GraphicsContext3D::RGBA4:
263 case GraphicsContext3D::RGB5_A1:
264 case GraphicsContext3D::RGB565:
291 setObject(ctx->graphicsContext3D()->createFramebuffer());
330 attachmentObject->attach(context()->graphicsContext3D(), attachmentPoint);
350 if (attachment == GraphicsContext3D::DEPTH_ATTACHMENT) {
352 if (internalformat != GraphicsContext3D::DEPTH_COMPONENT16) {
358 if (!(context()->m_webglDepthTexture && internalformat == GraphicsContext3D::DEPTH_COMPONENT
359 && (type == GraphicsContext3D::UNSIGNED_SHORT || type == GraphicsContext3D::UNSIGNED_INT))) {
364 } else if (attachment == GraphicsContext3D::STENCIL_ATTACHMENT) {
368 if (internalformat != GraphicsContext3D::STENCIL_INDEX8) {
373 } else if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT) {
375 if (internalformat != GraphicsContext3D::DEPTH_STENCIL) {
381 if (!(context()->m_webglDepthTexture && internalformat == GraphicsContext3D::DEPTH_STENCIL
382 && type == GraphicsContext3D::UNSIGNED_INT_24_8)) {
387 } else if (attachment == GraphicsContext3D::COLOR_ATTACHMENT0
388 || (context()->m_webglDrawBuffers && attachment > GraphicsContext3D::COLOR_ATTACHMENT0
389 && attachment < static_cast<GC3Denum>(GraphicsContext3D::COLOR_ATTACHMENT0 + context()->getMaxColorAttachments()))) {
397 if (internalformat != GraphicsContext3D::RGBA && internalformat != GraphicsContext3D::RGB) {
405 if (type != GraphicsContext3D::UNSIGNED_BYTE
406 && type != GraphicsContext3D::UNSIGNED_SHORT_5_6_5
407 && type != GraphicsContext3D::UNSIGNED_SHORT_4_4_4_4
408 && type != GraphicsContext3D::UNSIGNED_SHORT_5_5_5_1
409 && !(type == GraphicsContext3D::FLOAT && context()->m_oesTextureFloat)
410 && !(type == GraphicsContext3D::HALF_FLOAT_OES && context()->m_oesTextureHalfFloat)) {
441 attachmentObject->onDetached(context()->graphicsContext3D());
445 case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
446 attach(GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::DEPTH_ATTACHMENT);
447 attach(GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::STENCIL_ATTACHMENT);
449 case GraphicsContext3D::DEPTH_ATTACHMENT:
450 attach(GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT, GraphicsContext3D::DEPTH_ATTACHMENT);
452 case GraphicsContext3D::STENCIL_ATTACHMENT:
453 attach(GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT, GraphicsContext3D::STENCIL_ATTACHMENT);
474 attachmentObject->unattach(context()->graphicsContext3D(), attachmentType);
487 WebGLAttachment* attachment = getAttachment(GraphicsContext3D::COLOR_ATTACHMENT0);
498 WebGLAttachment* attachment = getAttachment(GraphicsContext3D::COLOR_ATTACHMENT0);
509 WebGLAttachment* attachment = getAttachment(GraphicsContext3D::COLOR_ATTACHMENT0);
525 return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
528 return GraphicsContext3D::FRAMEBUFFER_UNSUPPORTED;
532 return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
535 case GraphicsContext3D::DEPTH_ATTACHMENT:
538 case GraphicsContext3D::STENCIL_ATTACHMENT:
541 case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
551 return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
558 return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
562 return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
567 return GraphicsContext3D::FRAMEBUFFER_UNSUPPORTED;
569 return GraphicsContext3D::FRAMEBUFFER_COMPLETE;
572 bool WebGLFramebuffer::onAccess(GraphicsContext3D* context3d, const char** reason)
574 if (checkStatus(reason) != GraphicsContext3D::FRAMEBUFFER_COMPLETE)
581 WebGLAttachment* attachment = getAttachment(GraphicsContext3D::STENCIL_ATTACHMENT);
583 attachment = getAttachment(GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT);
587 void WebGLFramebuffer::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject object)
605 m_filteredDrawBuffers[i] = GraphicsContext3D::NONE;
616 if (m_drawBuffers[i] != GraphicsContext3D::NONE && getAttachment(m_drawBuffers[i])) {
622 if (m_filteredDrawBuffers[i] != GraphicsContext3D::NONE) {
623 m_filteredDrawBuffers[i] = GraphicsContext3D::NONE;
629 context()->graphicsContext3D()->getExtensions()->drawBuffersEXT(
641 return GraphicsContext3D::COLOR_ATTACHMENT0;
642 return GraphicsContext3D::NONE;