ハイスコア レイヤーを実装したので、ハイスコアの新しいエントリを強調表示したいと思います。これは私の現在の描画機能ですが、機能せず、このエラーが複数回発生します。
[CCSprite draw] 530 の OpenGL エラー 0x0501
描画機能:
- (void)draw {
[super draw];
if(currentScorePosition < 0) return;
ccDrawColor4F(0.0f, 0.0f, 0.0f, 0.2f);
float w = 320.0f;
float h = 27.0f;
float x = (320.0f - w) / 2.0f;
float y = 359.0f - currentScorePosition * h;
GLfloat vertices[4][2];
GLubyte indices[4] = { 0, 1, 3, 2 };
vertices[0][0] = x; vertices[0][1] = y;
vertices[1][0] = x+w; vertices[1][1] = y;
vertices[2][0] = x+w; vertices[2][1] = y+h;
vertices[3][0] = x; vertices[3][1] = y+h;
ccGLEnableVertexAttribs( kCCVertexAttribFlag_Position );
kmGLPushMatrix();
glVertexAttribPointer( currentScorePosition, 2, GL_FLOAT, GL_FALSE, vertices, 0 );
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, indices);
kmGLPopMatrix();
ccDrawColor4F(1.0f, 1.0f, 1.0f, 1.0f);
}