I'm trying to create a striped pattern like this tutorial using cocos2d 2.0
http://www.raywenderlich.com/3857/how-to-create-dynamic-textures-with-ccrendertexture
I got some shader setup info from this site
http://mobileorchard.com/getting-started-with-opengl-es-20-on-the-iphone-3gs/
I'm not having any success trying to burn the striped texture onto the image.
This is a code snippet of where I seem to be going wrong.
// What works in openGL es 1.1
// glColor4f(c2.r, c2.g, c2.b, c2.a);
// glVertexPointer(2, GL_FLOAT, 0, vertices);
// glDrawArrays(GL_TRIANGLES, 0, (GLsizei)nVertices);
// openGL es 2.0 //
glColor4f(c2.r, c2.g, c2.b, c2.a);
glEnableVertexAttribArray(m_a_positionHandle);
glUseProgram(m_shaderProgram);
glVertexAttribPointer(m_a_positionHandle, 2, GL_FLOAT, GL_FALSE, 0, vertices);
glDrawArrays(GL_TRIANGLES, 0, (GLsizei)nVertices);
I setup a test project with both cocos2d 1.0 and cocos2d 2.0 so I can try to figure this out. Most of the code to look at is in HelloWorldLayer.m