I recommend first starting a new project in Xcode with the "OpenGL Game" template Apple provides.Īmong other things, the Apple template code will include creation of a GLKBaseEffect, which provides some Shader functionality that seems to be required in order to be able to draw with OpenGL ES 2.0. I'm rather a student of OpenGL ES 2.0 right now myself. Why the line not appearing or drawing? Can you please help? Am trying this 2 days. And also the - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect delegate is calling infinite time. When i run the project only the gray color only appearing in the screen, the line not showing. GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) This method is calling multiple times. (void)glkView:(GLKView *)view Method") View.drawableDepthFormat = GLKViewDrawableDepthFormat24 ntext = initWithAPI:kEAGLRenderingAPIOpenGLES2] Here is my sample code that was i tried in my project, context = effect = _effect Finally i tried to draw a line using OpenGL ES framework in XCode 4.2 for iPhone simple game app.I studied something about GLKView and GLKViewController to draw a line in iPhone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |