Skip to content

Commit

Permalink
SpriteTest: Fixed Z vertex test. Was broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoquesada committed Mar 5, 2013
1 parent 9be7e43 commit 610f845
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/SpriteTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

static int sceneIdx=-1;
static NSString *transitions[] = {

@"Sprite1",
@"SpriteBatchNode1",
@"SpriteFrameTest",
Expand Down Expand Up @@ -1194,9 +1195,10 @@ -(id) init
CCGLProgram *alphaTestShader = [[CCShaderCache sharedShaderCache] programForKey:kCCShader_PositionTextureColorAlphaTest];
GLint alphaValueLocation = glGetUniformLocation(alphaTestShader.program, kCCUniformAlphaTestValue_s);

[alphaTestShader use];
// set alpha test value
// NOTE: alpha test shader is hard-coded to use the equivalent of a glAlphaFunc(GL_GREATER) comparison
[self.shaderProgram setUniformLocation:alphaValueLocation withF1:0.0f];
[alphaTestShader setUniformLocation:alphaValueLocation withF1:0.5f];

dir = 1;
time = 0;
Expand Down Expand Up @@ -1272,9 +1274,11 @@ -(id) init
CCGLProgram *alphaTestShader = [[CCShaderCache sharedShaderCache] programForKey:kCCShader_PositionTextureColorAlphaTest];
GLint alphaValueLocation = glGetUniformLocation(alphaTestShader.program, kCCUniformAlphaTestValue_s);


[alphaTestShader use];
// set alpha test value
// NOTE: alpha test shader is hard-coded to use the equivalent of a glAlphaFunc(GL_GREATER) comparison
[self.shaderProgram setUniformLocation:alphaValueLocation withF1:0.0f];
[alphaTestShader setUniformLocation:alphaValueLocation withF1:0.5f];


CGSize s = [[CCDirector sharedDirector] winSize];
Expand Down

0 comments on commit 610f845

Please sign in to comment.