Q: OpenGL ES application gives error: glView undeclared I am totally unknown to the OpenGL & going to try on the OpenGL Es application i have written this code & this is giving me error that glView is undeclared. Then where i would have to declare this & How? I have tried this code from the internet.
In the DemoAppDelegate.m file i have used this method.
- (void)applicationDidFinishLaunching:(UIApplication *)application
{

    window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    glView = [[EAGLView alloc] initWithFrame:window.bounds];

    [window addSubview:glView];
    [window makeKeyAndVisible];

    glView.animationInterval = 1.0 / 60.0;
    [glView startAnimation];
}


A: My first suggestion would be to use Apple's project template for an OpenGL view. Setting up the basics for an OpenGL ES view is non-trivial and varies by what version of OpenGL ES you are going to be using, fixed or programmable pipeline. Apple's project template for OpenGL ES takes care of both variations for you, it will use the programmable pipeline if it is available and it will default to the fixed pipeline on older devices.
Once you do that a good place to start is Apple's OpenGL ES Programming Guide.
