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

Alternative for obsolete OpenGL calls? #1398

Open
gerchicov-bp opened this issue May 29, 2019 · 0 comments
Open

Alternative for obsolete OpenGL calls? #1398

gerchicov-bp opened this issue May 29, 2019 · 0 comments

Comments

@gerchicov-bp
Copy link

http://2sa-studio.blogspot.com/2014/05/soft-bodies-with-cocos2d-v3.html

That example still works except of this code:

// Draw the triangle fan
    CC_NODE_DRAW_SETUP();
    ccGLBlendFunc(self.blendFunc.src, self.blendFunc.dst);
    ccGLBindTexture2D(self.texture.name);
    ccGLEnableVertexAttribs( kCCVertexAttribFlag_PosColorTex );
    glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, vertices);
    glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, 0, texCoords);
    glVertexAttribPointer(kCCVertexAttrib_Color, 4, GL_FLOAT, GL_TRUE, 0, colors);
    glDrawArrays(GL_TRIANGLE_FAN, 0, (GLsizei)nVertices);

How to replace it in current cocos2d version?

@gerchicov-bp gerchicov-bp changed the title Alternative for OpenGL calls? Alternative for obsolete OpenGL calls? May 29, 2019
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

No branches or pull requests

1 participant