Add Texture2D abstraction support #569

Closed
ricardoquesada opened this Issue Oct 4, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@ricardoquesada
Contributor

ricardoquesada commented Oct 4, 2012

cocos2d-html5 is not using the Texture2D abstraction internally... and although it might not needed it for "canvas" it is still very useful. Example:

  • In the future, when WebGL support is added
  • to be compatible with JSB.

Right now "anti aliasing" is supported in JSB, but in html5 is simply crashes because the method setAliasTexParams is not implemented, in the HTMLImage object.

This could be easily fixed if we use Texture2D as an abstraction of Image.

In canvas, the Texture2D object contains an HTMLImage, and in WebGL it contains a real texture object.

@dingpinglv

This comment has been minimized.

Show comment Hide comment
@dingpinglv

dingpinglv Sep 16, 2013

Contributor

Hi Riq,

We have modified cc.Sprite and subclasses to support cc.Texture2D on Canvas mode at #1067

Thank you.

Contributor

dingpinglv commented Sep 16, 2013

Hi Riq,

We have modified cc.Sprite and subclasses to support cc.Texture2D on Canvas mode at #1067

Thank you.

@dingpinglv dingpinglv closed this Sep 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment