Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gles20 porting #115

Merged
merged 7 commits into from Oct 18, 2011
Merged

Gles20 porting #115

merged 7 commits into from Oct 18, 2011

Conversation

chapados
Copy link
Contributor

Hi Riq,

We're in the process of porting an app to the gles20 branch. In the process, I added a few pieces of missing functionality (i.e. alpha test support), and other methods that made the process easier.

Brian Chapados added 7 commits October 17, 2011 15:48
…izer

The current -[CCSprite initWithTexture:rect:] explicitly passes a 'NO' value
for rotation to -[CCSprite setTextureRect:rotated:untrimmedSize:].

This change adds the rotated BOOL param as part the initializer,
allowing the initialization of sprites with a rotated rect.
OpenGLES 2.0 does not support glAlphaTest or glAlphaFunc.
This change set adds a simple fragment shader to the default set of cocos2d shaders
that performs the equivalent of a glAlphaTest with by comparing the incoming alpha value
with a specified uniform float, using the equivalent of a (greater-than-or-equal-to)
'>=' comparison.  This produces the same results as:

glAlphaFunc(GL_GREATER, <value>)
glEnable(GL_ALPHA_TEST)

However, due to the use of shaders, the configuration is slightly different, since
for cocos2d, use of the alpha test shader must specified on a per-drawing-node basis.
…ite frames.

This allows a dictionary or plist of sprite frames to be associated with the specified texture
or a texture file.  This was possible in cocos2d 1.x, but is not present in the current 2.x
branch.
…xtureCache.

CCTextureCache is already a singleton, so these queues will only be created once.
Declaring them as ivars allows them to be accessed in categories of CCTextureCache
that extend/modify loading behavior.
This change adds the optional 'rotated' param to specify a rotated
rect when creating a sprite with a batch node.
cocos2d pushed a commit that referenced this pull request Oct 18, 2011
Makes porting to cocos2d-v2.x gles20 easier
@cocos2d cocos2d merged commit a880051 into cocos2d:gles20 Oct 18, 2011
lhunath pushed a commit to lhunath/cocos2d-iphone that referenced this pull request Nov 11, 2013
Makes porting to cocos2d-v2.x gles20 easier
dalinaum pushed a commit to dalinaum/cocos2d-iphone that referenced this pull request Apr 6, 2014
Makes porting to cocos2d-v2.x gles20 easier

Former-commit-id: a880051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants