亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? eaglview.m

?? Compressed file has password
?? M
字號:
/*===== IMPORTANT =====This is sample code demonstrating API, technology or techniques in development.Although this sample code has been reviewed for technical accuracy, it is notfinal. Apple is supplying this information to help you plan for the adoption ofthe technologies and programming interfaces described herein. This informationis subject to change, and software implemented based on this sample code shouldbe tested with final operating system software and final documentation. Newerversions of this sample code may be provided with future seeds of the API ortechnology. For information about updates to this and other developerdocumentation, view the New & Updated sidebars in subsequent documentationseeds.=====================File: EAGLView.mAbstract: Convenience class that wraps the CAEAGLLayer from CoreAnimation into aUIView subclass.Version: 1.3Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.("Apple") in consideration of your agreement to the following terms, and youruse, installation, modification or redistribution of this Apple softwareconstitutes acceptance of these terms.  If you do not agree with these terms,please do not use, install, modify or redistribute this Apple software.In consideration of your agreement to abide by the following terms, and subjectto these terms, Apple grants you a personal, non-exclusive license, underApple's copyrights in this original Apple software (the "Apple Software"), touse, reproduce, modify and redistribute the Apple Software, with or withoutmodifications, in source and/or binary forms; provided that if you redistributethe Apple Software in its entirety and without modifications, you must retainthis notice and the following text and disclaimers in all such redistributionsof the Apple Software.Neither the name, trademarks, service marks or logos of Apple Inc. may be usedto endorse or promote products derived from the Apple Software without specificprior written permission from Apple.  Except as expressly stated in this notice,no other rights or licenses, express or implied, are granted by Apple herein,including but not limited to any patent rights that may be infringed by yourderivative works or by other works in which the Apple Software may beincorporated.The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NOWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR INCOMBINATION WITH YOUR PRODUCTS.IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTEGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/ORDISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OFCONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IFAPPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Copyright (C) 2008 Apple Inc. All Rights Reserved.*/#import <QuartzCore/QuartzCore.h>#import "EAGLView.h"#import "OpenGL_Internal.h"//CLASS IMPLEMENTATIONS:@implementation EAGLView@synthesize delegate=_delegate, autoresizesSurface=_autoresize, surfaceSize=_size, framebuffer = _framebuffer, pixelFormat = _format, depthFormat = _depthFormat, context = _context, touchDelegate;+ (Class) layerClass{	return [CAEAGLLayer class];}- (BOOL) _createSurface{	CAEAGLLayer*			eaglLayer = (CAEAGLLayer*)[self layer];	CGSize					newSize;	GLuint					oldRenderbuffer;	GLuint					oldFramebuffer;		if(![EAGLContext setCurrentContext:_context]) {		return NO;	}		newSize = [eaglLayer bounds].size;	newSize.width = roundf(newSize.width);	newSize.height = roundf(newSize.height);		glGetIntegerv(GL_RENDERBUFFER_BINDING_OES, (GLint *) &oldRenderbuffer);	glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, (GLint *) &oldFramebuffer);		glGenRenderbuffersOES(1, &_renderbuffer);	glBindRenderbufferOES(GL_RENDERBUFFER_OES, _renderbuffer);		if(![_context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:eaglLayer]) {		glDeleteRenderbuffersOES(1, &_renderbuffer);		glBindRenderbufferOES(GL_RENDERBUFFER_BINDING_OES, oldRenderbuffer);		return NO;	}		glGenFramebuffersOES(1, &_framebuffer);	glBindFramebufferOES(GL_FRAMEBUFFER_OES, _framebuffer);	glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, _renderbuffer);	if (_depthFormat) {		glGenRenderbuffersOES(1, &_depthBuffer);		glBindRenderbufferOES(GL_RENDERBUFFER_OES, _depthBuffer);		glRenderbufferStorageOES(GL_RENDERBUFFER_OES, _depthFormat, newSize.width, newSize.height);		glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, _depthBuffer);	}	_size = newSize;	if(!_hasBeenCurrent) {		glViewport(0, 0, newSize.width, newSize.height);		glScissor(0, 0, newSize.width, newSize.height);		_hasBeenCurrent = YES;	}	else {		glBindFramebufferOES(GL_FRAMEBUFFER_OES, oldFramebuffer);	}	glBindRenderbufferOES(GL_RENDERBUFFER_OES, oldRenderbuffer);		CHECK_GL_ERROR();		[_delegate didResizeEAGLSurfaceForView:self];		return YES;}- (void) _destroySurface{	EAGLContext *oldContext = [EAGLContext currentContext];		if (oldContext != _context)		[EAGLContext setCurrentContext:_context];		if(_depthFormat) {		glDeleteRenderbuffersOES(1, &_depthBuffer);		_depthBuffer = 0;	}		glDeleteRenderbuffersOES(1, &_renderbuffer);	_renderbuffer = 0;	glDeleteFramebuffersOES(1, &_framebuffer);	_framebuffer = 0;		if (oldContext != _context)		[EAGLContext setCurrentContext:oldContext];	else		[EAGLContext setCurrentContext:nil];}- (id) initWithFrame:(CGRect)frame{	return [self initWithFrame:frame pixelFormat:kEAGLColorFormatRGB565 depthFormat:0 preserveBackbuffer:NO];}- (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format {	return [self initWithFrame:frame pixelFormat:format depthFormat:0 preserveBackbuffer:NO];}- (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GLuint)depth preserveBackbuffer:(BOOL)retained{	if((self = [super initWithFrame:frame]))	{				[self setOpaque:YES];				CAEAGLLayer*			eaglLayer = (CAEAGLLayer*)[self layer];		[eaglLayer setDrawableProperties:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:retained], kEAGLDrawablePropertyRetainedBacking, format, kEAGLDrawablePropertyColorFormat, nil]];		_format = format;		_depthFormat = depth;				_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];		if(_context == nil) {			[self release];			return nil;		}				if(![self _createSurface]) {			[self release];			return nil;		}	}	return self;}- (void) dealloc{	[self _destroySurface];		[_context release];	_context = nil;		[super dealloc];}- (void) layoutSubviews{	CGRect bounds = [self bounds];		if(_autoresize && ((roundf(bounds.size.width) != _size.width) || (roundf(bounds.size.height) != _size.height))) {		[self _destroySurface];#if __DEBUG__		REPORT_ERROR(@"Resizing surface from %fx%f to %fx%f", _size.width, _size.height, roundf(bounds.size.width), roundf(bounds.size.height));#endif		[self _createSurface];	}}- (void) setAutoresizesEAGLSurface:(BOOL)autoresizesEAGLSurface;{	_autoresize = autoresizesEAGLSurface;	if(_autoresize)	[self layoutSubviews];}- (void) setCurrentContext{	if(![EAGLContext setCurrentContext:_context]) {		printf("Failed to set current context %p in %s\n", _context, __FUNCTION__);	}}- (BOOL) isCurrentContext{	return ([EAGLContext currentContext] == _context ? YES : NO);}- (void) clearCurrentContext{	if(![EAGLContext setCurrentContext:nil])		printf("Failed to clear current context in %s\n", __FUNCTION__);}- (void) swapBuffers{	EAGLContext *oldContext = [EAGLContext currentContext];	//GLuint oldRenderbuffer;		if(oldContext != _context)		[EAGLContext setCurrentContext:_context];#if DEBUG	CHECK_GL_ERROR();#endif		//glGetIntegerv(GL_RENDERBUFFER_BINDING_OES, (GLint *) &oldRenderbuffer);	glBindRenderbufferOES(GL_RENDERBUFFER_OES, _renderbuffer);	//glBindRenderbufferOES(GL_RENDERBUFFER_OES, _framebuffer);		if(![_context presentRenderbuffer:GL_RENDERBUFFER_OES])		printf("Failed to swap renderbuffer in %s\n", __FUNCTION__);	if(oldContext != _context)		[EAGLContext setCurrentContext:oldContext];}- (CGPoint) convertPointFromViewToSurface:(CGPoint)point{	CGRect				bounds = [self bounds];		return CGPointMake((point.x - bounds.origin.x) / bounds.size.width * _size.width, (point.y - bounds.origin.y) / bounds.size.height * _size.height);}- (CGRect) convertRectFromViewToSurface:(CGRect)rect{	CGRect				bounds = [self bounds];		return CGRectMake((rect.origin.x - bounds.origin.x) / bounds.size.width * _size.width, (rect.origin.y - bounds.origin.y) / bounds.size.height * _size.height, rect.size.width / bounds.size.width * _size.width, rect.size.height / bounds.size.height * _size.height);}// Pass the touches to the superview- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{	if(touchDelegate)	{		[touchDelegate touchesBegan:touches withEvent:event];	}}- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{	if(touchDelegate)	{		[touchDelegate touchesMoved:touches withEvent:event];	}}- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{	if(touchDelegate)	{		[touchDelegate touchesEnded:touches withEvent:event];	}}- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{	if(touchDelegate)	{		[touchDelegate touchesCancelled:touches withEvent:event];	}}@end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情五月婷婷| 国产成人啪免费观看软件| 色综合激情五月| 一区二区三区四区视频精品免费 | 国产a视频精品免费观看| 国产午夜亚洲精品理论片色戒 | 日本久久一区二区三区| 亚洲精选在线视频| 欧美这里有精品| 亚洲无人区一区| 精品日韩在线观看| av电影在线观看不卡| 亚洲一区二区三区不卡国产欧美| 欧美一区二区观看视频| 国内精品国产成人| 亚洲蜜臀av乱码久久精品蜜桃| 欧美三级在线播放| 国产美女精品一区二区三区| 亚洲视频一二三| 日韩一区二区三区精品视频| 成人性视频免费网站| 亚洲狠狠丁香婷婷综合久久久| 91精品国产乱码久久蜜臀| 国产成人亚洲综合a∨婷婷 | 欧美日韩国产另类一区| 久久精品国产亚洲a| 日韩理论在线观看| 日韩欧美中文字幕一区| 成人福利视频在线看| 天天操天天干天天综合网| 久久人人爽人人爽| 在线观看不卡视频| 国产美女一区二区| 亚洲午夜免费电影| 亚洲国产精品精华液2区45| 欧美日本精品一区二区三区| 成人中文字幕电影| 蜜乳av一区二区| 亚洲一区二区三区国产| 国产精品乱人伦中文| 欧美一级生活片| 欧美系列一区二区| 成人h动漫精品| 韩国三级在线一区| 日韩经典一区二区| 亚洲精品国产精品乱码不99| 久久久久一区二区三区四区| 337p亚洲精品色噜噜狠狠| 91在线观看美女| 国产激情一区二区三区| 青青草97国产精品免费观看无弹窗版| 亚洲婷婷综合色高清在线| 久久久噜噜噜久久人人看| 欧美日韩视频在线一区二区| 91蜜桃在线免费视频| 国产激情一区二区三区桃花岛亚洲| 天天综合日日夜夜精品| 一区二区三区高清在线| 中文字幕一区二区三区不卡在线| 精品国产乱子伦一区| 欧美一区二区三区不卡| 欧美日本一区二区三区四区| 欧美在线你懂的| 91黄色在线观看| 一本在线高清不卡dvd| 丰满少妇在线播放bd日韩电影| 国产制服丝袜一区| 精品一区二区日韩| 久久国产欧美日韩精品| 麻豆传媒一区二区三区| 久久精品国产99久久6| 热久久国产精品| 麻豆精品精品国产自在97香蕉| 日韩综合在线视频| 五月天丁香久久| 日本成人中文字幕在线视频| 日本视频一区二区| 老司机精品视频一区二区三区| 日韩精品高清不卡| 久久精品国产色蜜蜜麻豆| 九色综合狠狠综合久久| 国产在线不卡一区| 国产精品小仙女| 成人黄色网址在线观看| 不卡av在线网| 在线观看视频一区二区欧美日韩| 日本乱人伦aⅴ精品| 欧美人牲a欧美精品| 91精品国产日韩91久久久久久| 日韩欧美亚洲国产另类| 久久精品夜色噜噜亚洲aⅴ| 国产精品伦一区| 亚洲一区二区av电影| 蜜臀久久99精品久久久画质超高清| 蜜臀精品一区二区三区在线观看 | 成人激情图片网| 99r国产精品| 欧美亚洲一区二区在线| 欧美高清视频一二三区 | 91精品国产综合久久久久久久| 91麻豆精品国产91久久久久| 91精品国产综合久久久蜜臀粉嫩| 精品国产一区二区三区忘忧草| 久久精品免费在线观看| 一区二区三区四区视频精品免费| 日本aⅴ精品一区二区三区| 国产精品一级在线| 在线观看日韩精品| 欧美精品一区二区三区久久久 | 国产成人免费视频一区| 97精品超碰一区二区三区| 欧美日韩mp4| 国产欧美日产一区| 亚洲成a人片综合在线| 狠狠色狠狠色合久久伊人| 91色乱码一区二区三区| 欧美一区二区三区的| 亚洲视频资源在线| 久久精品国产77777蜜臀| 99riav一区二区三区| 欧美v日韩v国产v| 亚洲综合丝袜美腿| 国产福利一区二区| 欧美一区二区三区性视频| 中文字幕一区二区三区精华液 | 久久久一区二区| 亚洲韩国一区二区三区| 国产精品91xxx| 91精品国产综合久久久久久久久久 | 天堂在线亚洲视频| 91在线观看免费视频| 久久免费视频一区| 日日夜夜免费精品| 97se亚洲国产综合自在线观| 精品国产人成亚洲区| 亚洲成人免费视| 一本大道综合伊人精品热热| 久久久国产一区二区三区四区小说| 亚洲第一成人在线| 91影视在线播放| 日本一区二区综合亚洲| 捆绑变态av一区二区三区| 欧美亚洲高清一区二区三区不卡| 欧美国产一区在线| 国内成人免费视频| 欧美一区二区三区在线电影 | 日韩欧美一级片| 视频一区欧美日韩| 欧美午夜一区二区三区免费大片| 国产精品美女一区二区三区 | 日韩精品专区在线影院观看| 亚洲第一激情av| 在线观看www91| 一区二区三区中文字幕精品精品| 风间由美性色一区二区三区| 久久午夜电影网| 麻豆精品视频在线观看| 欧美一区二区精品在线| 男女性色大片免费观看一区二区| 日本乱人伦一区| 亚洲一区二区3| 欧美性大战xxxxx久久久| 夜夜操天天操亚洲| 色妹子一区二区| 亚洲欧美国产三级| 91视频在线看| 依依成人精品视频| 色噜噜狠狠成人网p站| 亚洲中国最大av网站| 欧美日韩午夜在线视频| 婷婷久久综合九色综合伊人色| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 欧美年轻男男videosbes| 亚洲福利视频导航| 欧美精品自拍偷拍动漫精品| 秋霞午夜鲁丝一区二区老狼| 欧美一级片免费看| 国产在线精品不卡| 国产精品嫩草久久久久| 91影院在线免费观看| 亚洲高清不卡在线观看| 51精品国自产在线| 久久不见久久见免费视频1| 久久久精品免费网站| av不卡免费在线观看| 一区二区三区丝袜| 9191成人精品久久| 日本伊人色综合网| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品99久久久久久久vr| 综合在线观看色| 欧美日韩亚洲另类| 国产一区 二区 三区一级| 亚洲欧洲国产专区| 欧美日韩免费高清一区色橹橹| 蜜臀av性久久久久蜜臀av麻豆| 国产亚洲综合av| 99精品欧美一区二区三区小说| 有码一区二区三区| 2024国产精品视频|