OpenGL Error 0x0502 in - [CCSprite draw] 530

I am using cocos2d 2.0. Here, in one scene where I load data into a tableview, I get the error message "OpenGL Error 0x0502 in - [CCSprite draw] 530" in the log window . the application works well

I searched, and I realized that some shader files are missing. I made sure that all my files are there, and the compilation sources are also updated.

But I got some solution from the link. Well, I don’t know which drawing function to change and what is wrong with my cocos2d files. Is there any way to solve this problem? Could this crash my application in the future?

My code is:

-(id) init { if( (self=[super init] )) { CGSize winSize = [CCDirector sharedDirector].winSize; tableView = [SWTableView viewWithDataSource:self size:winSize]; tableView.direction = SWScrollViewDirectionVertical; tableView.position = ccp(0,0); tableView.delegate = self; tableView.verticalFillOrder = SWTableViewFillTopDown; [self addChild:tableView]; } return self; } -(SWTableViewCell *)table:(SWTableView *)table cellAtIndex:(NSUInteger)idx { SWTableViewCell *cell = [table dequeueCell]; if (!cell) { cell = [[MyCell new] autorelease]; } CCMenuItemImage * listItemBtn =[CCMenuItemImage itemWithNormalImage:@" listitem.png" selectedImage:@"listitem_sel.png" ]; listItemBtn.position=ccp(270, 20); [cell addChild:listItemBtn]; return cell; } 
+1
source share
1 answer

Cocos2d 2.0 uses OpenGLES2.0, so do not use OpenGL immediate api mode in cocos2d 2.0.

Example: GLBegin (), GLLineWidth (), glDrawArrays (), etc.

+1
source

Source: https://habr.com/ru/post/1237735/


All Articles