Matt N.
Matt N.

Reputation: 1239

Implicit declaration of function glGenFramebuffers

Just getting started with Xcode and Open GL and I am getting "Implicit declaration of function glGenFramebuffers" in my GL View class. I am importing

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <OpenGLES/ES1/gl.h>

And I also tried with

#import <OpenGLES/EAGL.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>

and make clean all targets but the warning stays! What does it mean? What do I have to import for it to go away?

Upvotes: 1

Views: 1793

Answers (1)

anon
anon

Reputation:

You need to import OpenGLES/ES2/gl.h, the glGenFramebuffers function is not available in OpenGL ES 1. If you actually want to use OpenGL ES 1 you need to use glGenFramebuffersOES which is part of the OES_framebuffer_object extension.

Upvotes: 2

Related Questions