#149 ✓hack
lindsay.kay (at xeolabs)

Hack to fall back on old createTexture API

Reported by lindsay.kay (at xeolabs) | August 16th, 2010 @ 01:22 AM | in V0.7.7

Signature for createTexture changed a while back - http://blog.tojicode.com/2010/07/obsolete-teximage2d-wha.html

Found that FireFox supported this, but Chrome lagged behind, so I create textures as below. Remove this when all browser are using the new signature.

 try {

            /* New API change - https://xeolabs.lighthouseapp.com/projects/50643/tickets/129-fix-for-calling-obsolete-teximage2d
             */
            context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, context.RGBA, context.UNSIGNED_BYTE, cfg.image);
        } catch (e) {

            /* Fall back for old browser
             */            
            context.texImage2D(context.TEXTURE_2D, 0, cfg.image, cfg.flipY);
        }

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.

Shared Ticket Bins

People watching this ticket

Tags

Pages