zoukankan      html  css  js  c++  java
  • OpenGL ES探究1

    1,首先来对GLKViewController一探究竟

    #import <Foundation/Foundation.h>

     

    #import <UIKit/UIKit.h>

     

    #import <GLKit/GLKView.h>

     

    NS_ASSUME_NONNULL_BEGIN

    @protocol GLKViewControllerDelegate;

     

    #pragma mark -

    #pragma mark GLKViewController

    #pragma mark -

     //已被弃用

    OPENGLES_DEPRECATED(ios(5.0,12.0), tvos(9.0,12.0))

    API_UNAVAILABLE(macos)

    //继承自UIViewController,遵循NSCoding,GLKViewDelegate协议

    @interface GLKViewController : UIViewController <NSCoding, GLKViewDelegate>

    {

        

    }

     

    @property (nullable, nonatomic, assign) IBOutlet id <GLKViewControllerDelegate> delegate;

     

    /*

     For setting the desired frames per second at which the update and drawing will take place.

     The default is 30.

    设置帧率,每秒30次刷新和刻画

     */

    @property (nonatomic) NSInteger preferredFramesPerSecond;

     

    /*在给定preferredFramesPerSecond的值以及GLKView所在的屏幕的情况下,确定的每秒实际帧数。 选择的值将尽可能接近preferredFramesPerSecond,

    而不会超出屏幕的刷新率。 此值不考虑丢失的帧,因此它不是每秒统计帧的度量。 它是将对其进行更新的静态值。

     The actual frames per second that was decided upon given the value for preferredFramesPerSecond

     and the screen for which the GLKView resides. The value chosen will be as close to

     preferredFramesPerSecond as possible, without exceeding the screen's refresh rate. This value

     does not account for dropped frames, so it is not a measurement of your statistical frames per

     second. It is the static value for which updates will take place.

     */

    @property (nonatomic, readonly) NSInteger framesPerSecond;

     

    /*

     Used to pause and resume the controller.

    用来停止和恢复控制器

     */

    @property (nonatomic, getter=isPaused) BOOL paused;

     

    /*

     The total number of frames displayed since drawing began.

    从刻画开始所显示的帧数

     */

    @property (nonatomic, readonly) NSInteger framesDisplayed;

     

    /*

     Time interval since properties.

    自此以来时间间隔的属性

     */

    @property (nonatomic, readonly) NSTimeInterval timeSinceFirstResume;

    @property (nonatomic, readonly) NSTimeInterval timeSinceLastResume;

    @property (nonatomic, readonly) NSTimeInterval timeSinceLastUpdate;

    @property (nonatomic, readonly) NSTimeInterval timeSinceLastDraw;

     

    /*

    如果为true,则控制器将在应用程序收到willResignActive通知时暂停。

    如果为false,则控制器将不会暂停,并且预期在必要时其他某种机制将暂停控制器。

     If true, the controller will pause when the application recevies a willResignActive notification.

     If false, the controller will not pause and it is expected that some other mechanism will pause

     the controller when necessary.

     The default is true.

     */

    @property (nonatomic) BOOL pauseOnWillResignActive;

     

    /*

    如果为true,则控制器将在应用程序收到didBecomeActive通知时恢复运行。

    如果为false,则控制器将不会继续运行,并且在必要时可以期望其他某种机制来恢复控制器。

     If true, the controller will resume when the application recevies a didBecomeActive notification.

     If false, the controller will not resume and it is expected that some other mechanism will resume

     the controller when necessary.

     The default is true.

     */

    @property (nonatomic) BOOL resumeOnDidBecomeActive;

     

    @end

     

    #pragma mark -

    #pragma mark GLKViewControllerDelegate

    #pragma mark -

     

    @protocol GLKViewControllerDelegate <NSObject>

     

    @required

    /*

    实现GLKViewControllerDelegate的必需方法。 不子类化GLKViewController时,应使用此更新方法变体。

    如果GLKViewController对象已被子类化并实现,则不会调用此方法

     Required method for implementing GLKViewControllerDelegate. This update method variant should be used

     when not subclassing GLKViewController. This method will not be called if the GLKViewController object

     has been subclassed and implements -(void)update.

     */

    - (void)glkViewControllerUpdate:(GLKViewController *)controller;

     

    @optional

    /*

     Delegate method that gets called when the pause state changes. 

    暂停状态更改时调用的委托方法。

     */

    - (void)glkViewController:(GLKViewController *)controller willPause:(BOOL)pause;

     

    @end

  • 相关阅读:
    配置linux 防火墙,只有固定IP和端口才能能访问完美解决
    转.HTML中img标签的src属性绝对路径问题解决办法,完全解决!
    weblogic 安全漏洞问题解决
    转 echarts 的使用时遇到的坑 初始化和销毁,亲测有效!
    在使用 Fortify进行源码扫描时需要做对项目需要做什么?
    eclipse 导出 jar包详细步骤
    转 Fortofy扫描漏洞解决方案2
    JSON 之 SuperObject(1)
    Delphi使用JSON解析调用淘宝IP地址库REST API 示例
    Jsoncpp的使用
  • 原文地址:https://www.cnblogs.com/vkSwift/p/13769147.html
Copyright © 2011-2022 走看看