// Copyright (c) 2010 Hyperbolic Magnetism
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <OpenGLES/EAGL.h>
#import <OpenGLES/EAGLDrawable.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import "HMGLTransition.h"
@protocol HMGLTransitionViewDelegate;
// 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 HMGLTransitionView : UIView {
EAGLContext *context;
// The pixel dimensions of the CAEAGLLayer
GLint backingWidth;
GLint backingHeight;
// The OpenGL ES names for the framebuffer and renderbuffer used to render to this view
GLuint defaultFramebuffer, colorRenderbuffer;
GLuint depthRenderbuffer;
//
BOOL animating;
BOOL displayLinkSupported;
NSInteger animationFrameInterval;
// Use of the CADisplayLink class is the preferred method for controlling your animation timing.
// CADisplayLink will link to the main display and fire every vsync when added to a given run-loop.
// The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink
// isn't available.
id displayLink;
NSTimer *animationTimer;
// transition
HMGLTransition *transition;
// textures
GLuint beginTexture;
GLuint endTexture;
GLfloat textureWidthNormalized;
GLfloat textureHeightNormalized;
// frame times
NSTimeInterval lastTime, thisTime, calcTime;
// delegate
id <HMGLTransitionViewDelegate> delegate;
// frames frame
int framesCount;
}
@property (nonatomic, readonly) GLfloat textureWidthNormalized;
@property (nonatomic, readonly) GLfloat textureHeightNormalized;
@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
@property (nonatomic) NSInteger animationFrameInterval;
@property (nonatomic, retain) HMGLTransition *transition;
@property (nonatomic, assign) id <HMGLTransitionViewDelegate> delegate;
- (void)startAnimation;
- (void)stopAnimation;
- (void)reset;
- (UIImage*)createBeginTextureWithView:(UIView*)view;
- (void)createEndTextureWithView:(UIView*)view;
@end
@protocol HMGLTransitionViewDelegate <NSObject>
- (void)transitionViewDidFinishTransition:(HMGLTransitionView*)transitionView;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
iOS第三方开源类库 -- 视图切换 HMGLTransitions
共40个文件
m:12个
h:11个
png:4个
5星 · 超过95%的资源 需积分: 10 137 下载量 175 浏览量
2013-04-02
13:29:04
上传
评论 1
收藏 83KB ZIP 举报
温馨提示
http://blog.csdn.net/duxinfeng2010/article/category/1155790 有意详细介绍
资源推荐
资源详情
资源评论
收起资源包目录
RollingView.zip (40个子文件)
RollingView
HMGLTransitions
RotateTransition.h 1KB
.DS_Store 12KB
RotateTransition.m 3KB
FlipTransition.h 1KB
Switch3DTransition.h 1KB
Switch3DTransition.m 3KB
HMGLTransitionManager.m 7KB
ClothTransition.m 15KB
HMGLTransitionView.m 12KB
HMGLTransition.h 2KB
ClothTransition.h 2KB
DoorsTransition.h 1KB
DoorsTransition.m 4KB
HMGLTransitionManager.h 2KB
HMGLTransition.m 1KB
HMGLTransitionView.h 3KB
FlipTransition.m 4KB
RollingView.xcodeproj
project.xcworkspace
contents.xcworkspacedata 156B
xcuserdata
rjxy.xcuserdatad
UserInterfaceState.xcuserstate 19KB
xcuserdata
rjxy.xcuserdatad
xcdebugger
Breakpoints.xcbkptlist 91B
xcschemes
xcschememanagement.plist 483B
RollingView.xcscheme 3KB
project.pbxproj 22KB
RollingView
ViewController.m 3KB
ViewController2.h 371B
ViewController2.m 3KB
en.lproj
ViewController_iPad.xib 5KB
InfoPlist.strings 45B
ViewController_iPhone.xib 5KB
main.m 341B
button_background_disabled.png 3KB
RollingView-Info.plist 1KB
button_background@2x.png 3KB
ViewController2.xib 5KB
button_background.png 2KB
ViewController.h 510B
button_background_disabled@2x.png 4KB
AppDelegate.h 369B
RollingView-Prefix.pch 325B
AppDelegate.m 3KB
共 40 条
- 1
duxinfeng2010
- 粉丝: 1510
- 资源: 54
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页