Can i mix normal OpenGL ES 2.0 with Kobol2D / cocos2d on iOS? -
i making 2d game ios using kobold2d/cocos2d. i've decided try , add 3d buildings (think gta1/2 2d except buildings).
i know how opengl works im getting sorts of errors when try implement this.
my questions is: cocos2d prevent me using normal opengl calls ?,or should work fine if done correctly? every tutorial/example i've found uses cocos2d wrapper mixing opengl , cocos..
if have done before (mix own opengl es 2.0 code cocos2d) point me in right direction?
as long you're using cocos2d/kobold2d v2.x can use opengl es 2.0. can override/implement ccnode class' -(void) draw method , hack away.
there's 1 caveat: should prefer use cocos2d provided "ccstuffstuff" methods (for example ccdrawcolor) instead of opengl es methods because wrap behind scenes stuff performance reasons , compatibility. check existing cocos2d drawing code examples. 1 such example gles-render.cpp cocos2d+box2d projects, or ccdrawingprimitives.m file.
Comments
Post a Comment