Opengl Error Eaglview Swapbuffers
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up cocos2d OpenGL error 0x0502 in -[EAGLView swapBuffers] up vote 8 down vote favorite 2 i have implemented GPUImage framework in my cocos2d project, The GPUImage framework is a BSD-licensed iOS library that lets you apply GPU-accelerated filters and other effects to images, live camera video, and movies. When i call any one of GPUImage filter, am getting " cocos2d OpenGL error 0x0502 in -[EAGLView swapBuffers] " error. Do you have any idea what might be the issue in that case? Thanks and regards, Prakash. iphone ios image image-processing cocos2d-iphone share|improve this question asked Apr 15 '12 at 9:49 user1160507 0x0502 stands for GL_INVALID_OPERATION. Are you trying to use a texture from GPUImage with cocos2d? The two by default will have different OpenGL ES contexts, so you won't be able to use a texture from one in the other, unless you set up sharing between the contexts. I'm not familiar with cocos2d and how it does its context initialization, but somehow you'll need to set up a share group between the GPUImage and cocos2d contexts. –Brad Larson♦ Apr 15 '12 at 15:21 @BradLarson am using this two line only in my coco2d class ------ GPUImageToonFilter *stillImageFilter2 = [[GPUImageToonFilter alloc] init]; image = [stillImageFilter2 imageByFilteringImage:image];------- after executing this two line an getting this error –user1160507 Apr 16 '12 at 9:39 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote I dont know what your code is doing but what i had seen is that some time swap buffer problems come if their is change in orientation of application from the normal orientation.Try to print the size of main view before and after using your code. share|improve this answer answered Sep 4 '12 at 12:08 Abhinav 1668 add a comment| up vote 0 down vote I happened to have the same problem. I found the following post useful: iOS and multiple OpenGL views In my case, cocos2d files don't have necessary "setCurrentContext" commands ,so I added it into CCEAG
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each http://stackoverflow.com/questions/10160995/cocos2d-opengl-error-0x0502-in-eaglview-swapbuffers other. Join them; it only takes a minute: Sign up Adding bullets yield OpenGL error 0x0503 in -[EAGLView swapBuffers] up vote 0 down vote favorite I am trying to build up my first game with cocos2d. I am trying to insert bullets. when I get this error. The problem is it only occurs when a player fires not for http://stackoverflow.com/questions/9288659/adding-bullets-yield-opengl-error-0x0503-in-eaglview-swapbuffers enemy sprites. When this error occurs no only the position of player swaps with another and back also the bullet is destroyed after hitting two targets. OpenGL error 0x0503 in -[EAGLView swapBuffers] my weapon class has the following bullet implementation if([self.bulletsArray count] <= ([self.numberOfBulletsPerFire intValue]*[self.numberOfBulletsOnScreen intValue])) { for (int i =0; i< [self.numberOfBulletsPerFire intValue]; i++) { BulletClass *bullet = [[Bullet alloc]initWithPosition:position Direction:direction strength:self.weaponLevel spriteArray:spriteArray enemyArray:enemyArray base:base]; [self.bulletsArray addObject:bullet]; [self addChild:bullet]; [bullet release];bullet = nil; } } in BulletClass i have the init method as : (id)initWithPosition:(CGPoint)position Direction:(KDirectionInput)direction strength:(NSNumber *)strength spriteArray:(NSMutableArray *)sprites enemyArray:(NSMutableArray *)enemyArray base:(CCSprite *)base{ if ((self = [super init])) { self.base = base; self.strength = strength; self.movementDirection = direction; self.spriteArray = sprites; self.enemyArray = enemyArray; self.velocity = 200/1; self.bullet.position = position; [self addChild:self.bullet z:2]; } return self; } can anyone help me out here.. cocos2d-iphone share|improve this question edited Feb 15 '12 at 6:17 asked Feb 15 '12 at 6:08 Hadi 8081129 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote There are a few issues her
found that if I trigger buzzdoes using the popup (when the app first loaded, not the button on the main menu), it will hung when I exit buzzdoes and return to game. Can see tones of http://new2objectivec.blogspot.com/2012/09/opengl-error-0x0506-in-eaglview.html error as below: 2012-09-12 23:53:24.717 Where is it[21084:707] failed to call context 2012-09-12 23:53:24.723 Where is it[21084:707] cocos2d: surface size: 480x320 2012-09-12 23:53:24.726 Where is it[21084:707] Failed to make complete framebuffer object 8cdd OpenGL error 0x0506 in http://archive.raywenderlich.com/forums/viewtopic.php?f=5&t=3748 -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in opengl error -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] OpenGL error 0x0506 in -[EAGLView swapBuffers] ....... The strange thing is, it works without problem in simulator. It only hung and show this error message in the log when I test on the iPhone 3GS (iOS5.1.1) device.Found quite a few people on the net also had the same issue. If I test opengl error eaglview it on the iPad 2 (iOS5.0.1) device, it also hung, but didn't show anything in the log... Sent all these info to Arthur/buzzdoes, see if they can work out what's wrong... The Cocos2D version I am using is 1.0.1 as shown below from "cocos2d.h" // 0x00 HI ME LO // 00 01 00 01 #define COCOS2D_VERSION 0x00010001 According tothis old page, "0x0506 means: INVALID_FRAMEBUFFER_OPERATION_EXT" Urh.....What is that? Continue researching.... [Update 16/Sep/2012] Thanks to help rfom Arthur and Elad from buzzdoes, they released a fix and after a few test, the issue has been resolved. Though still don't know much about that OpenGL error, at least the whole thing is working ok now. I could have submitted the current version to App Store as Arthur suggested, but I really want to wait 1-2 more weeks to get the app working and tested for iOS 6 and iPhone 5, at least in the simulator, as I am still waiting for the local telcos to release plans for iPhone 5. Will do another few more days of testing, if all goes well, I might even integrate buzzdoes to my second game Mespfi too! Posted by Hello Objective-C! at 00:16 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: problem 2 comments: 紫煌1 October 2012 at 23:16I have the
index The team • Delete all board cookies • All times are UTC Forums powered by phpBB. © 2016 Ray Wenderlich. All rights reserved. About RayWenderlich.comLike Us on FacebookRay Wenderlich0 people like Ray Wenderlich© 2016 Razeware LLC. All rights reserved.FAQADVERTISECONTACT