/libs/cocos2d/CCPVRTexture.h
C Header | 80 lines | 22 code | 10 blank | 48 comment | 0 complexity | 204f43583a6c4ceed3c62537aa4adc9a MD5 | raw file
Possible License(s): Apache-2.0
1/* 2 3File: PVRTexture.h 4Abstract: The PVRTexture class is responsible for loading .pvr files. 5 6Version: 1.0 7 8Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. 9("Apple") in consideration of your agreement to the following terms, and your 10use, installation, modification or redistribution of this Apple software 11constitutes acceptance of these terms. If you do not agree with these terms, 12please do not use, install, modify or redistribute this Apple software. 13 14In consideration of your agreement to abide by the following terms, and subject 15to these terms, Apple grants you a personal, non-exclusive license, under 16Apple's copyrights in this original Apple software (the "Apple Software"), to 17use, reproduce, modify and redistribute the Apple Software, with or without 18modifications, in source and/or binary forms; provided that if you redistribute 19the Apple Software in its entirety and without modifications, you must retain 20this notice and the following text and disclaimers in all such redistributions 21of the Apple Software. 22Neither the name, trademarks, service marks or logos of Apple Inc. may be used 23to endorse or promote products derived from the Apple Software without specific 24prior written permission from Apple. Except as expressly stated in this notice, 25no other rights or licenses, express or implied, are granted by Apple herein, 26including but not limited to any patent rights that may be infringed by your 27derivative works or by other works in which the Apple Software may be 28incorporated. 29 30The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO 31WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED 32WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 33PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN 34COMBINATION WITH YOUR PRODUCTS. 35 36IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR 37CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 39ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR 40DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF 41CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF 42APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 43 44Copyright (C) 2008 Apple Inc. All Rights Reserved. 45 46*/ 47 48#import <UIKit/UIKit.h> 49#import <OpenGLES/ES1/gl.h> 50#import <OpenGLES/ES1/glext.h> 51 52@interface CCPVRTexture : NSObject 53{ 54 NSMutableArray *imageData_; 55 56 int tableFormatIndex_; 57 uint32_t width_, height_; 58 GLuint name_; 59 BOOL hasAlpha_; 60 61 // cocos2d integration 62 BOOL retainName_; 63} 64 65- (id)initWithContentsOfFile:(NSString *)path; 66- (id)initWithContentsOfURL:(NSURL *)url; 67+ (id)pvrTextureWithContentsOfFile:(NSString *)path; 68+ (id)pvrTextureWithContentsOfURL:(NSURL *)url; 69 70@property (nonatomic,readonly) GLuint name; 71@property (nonatomic,readonly) uint32_t width; 72@property (nonatomic,readonly) uint32_t height; 73@property (nonatomic,readonly) BOOL hasAlpha; 74 75// cocos2d integration 76@property (nonatomic,readwrite) BOOL retainName; 77 78@end 79 80