kodi
TVOSEAGLView.h
1 /*
2  * Copyright (C) 2010-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #import <OpenGLES/EAGL.h>
10 #import <OpenGLES/ES2/gl.h>
11 #import <UIKit/UIKit.h>
12 
13 // This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
14 // The view content is basically an EAGL surface you render your OpenGL scene into.
15 // Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
16 @interface TVOSEAGLView : UIView
17 {
18  EAGLContext* m_context;
19  // The pixel dimensions of the CAEAGLLayer.
20  GLint m_framebufferWidth;
21  GLint m_framebufferHeight;
22  // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view.
23  GLuint m_defaultFramebuffer, m_colorRenderbuffer, m_depthRenderbuffer;
24  UIScreen* m_currentScreen;
25  BOOL m_framebufferResizeRequested;
26 }
27 @property(readonly, getter=getCurrentEAGLContext) EAGLContext* m_context;
28 @property(readonly, getter=getCurrentScreen) UIScreen* m_currentScreen;
29 
30 
31 - (id)initWithFrame:(CGRect)frame withScreen:(UIScreen*)screen;
32 - (void)setFramebuffer;
33 - (bool)presentFramebuffer;
34 - (CGFloat)getScreenScale:(UIScreen*)screen;
35 
36 @end
Definition: TVOSEAGLView.h:16