mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
38 lines
942 B
Objective-C
38 lines
942 B
Objective-C
//
|
|
// EAGLView.h
|
|
// GLBase
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <OpenGLES/ES1/gl.h>
|
|
#import <OpenGLES/ES1/glext.h>
|
|
#import <OpenGLES/ES2/gl.h>
|
|
#import <OpenGLES/ES2/glext.h>
|
|
|
|
// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
|
|
// The view content is basically an EAGL surface you render your OpenGL scene into.
|
|
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
|
|
@interface EAGLView : UIView
|
|
{
|
|
@private
|
|
EAGLContext *context;
|
|
|
|
// The pixel dimensions of the CAEAGLLayer.
|
|
GLint framebufferWidth;
|
|
GLint framebufferHeight;
|
|
|
|
// The OpenGL ES names for the framebuffer and renderbuffer used to render to this view.
|
|
GLuint defaultFramebuffer, colorRenderbuffer;
|
|
GLuint depthRenderbuffer;
|
|
|
|
CGFloat viewScale;
|
|
}
|
|
|
|
@property (nonatomic, retain) EAGLContext *context;
|
|
|
|
- (void)setFramebuffer;
|
|
- (BOOL)presentFramebuffer;
|
|
|
|
@end
|