cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
/Users/rquesada/progs/cocos2d-iphone/cocos2d/CCTexturePVR.h
00001 /*
00002 
00003 File: PVRTexture.h
00004 Abstract: The PVRTexture class is responsible for loading .pvr files.
00005 
00006 Version: 1.0
00007 
00008 Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.
00009 ("Apple") in consideration of your agreement to the following terms, and your
00010 use, installation, modification or redistribution of this Apple software
00011 constitutes acceptance of these terms.  If you do not agree with these terms,
00012 please do not use, install, modify or redistribute this Apple software.
00013 
00014 In consideration of your agreement to abide by the following terms, and subject
00015 to these terms, Apple grants you a personal, non-exclusive license, under
00016 Apple's copyrights in this original Apple software (the "Apple Software"), to
00017 use, reproduce, modify and redistribute the Apple Software, with or without
00018 modifications, in source and/or binary forms; provided that if you redistribute
00019 the Apple Software in its entirety and without modifications, you must retain
00020 this notice and the following text and disclaimers in all such redistributions
00021 of the Apple Software.
00022 Neither the name, trademarks, service marks or logos of Apple Inc. may be used
00023 to endorse or promote products derived from the Apple Software without specific
00024 prior written permission from Apple.  Except as expressly stated in this notice,
00025 no other rights or licenses, express or implied, are granted by Apple herein,
00026 including but not limited to any patent rights that may be infringed by your
00027 derivative works or by other works in which the Apple Software may be
00028 incorporated.
00029 
00030 The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
00031 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
00032 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00033 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
00034 COMBINATION WITH YOUR PRODUCTS.
00035 
00036 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
00037 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00038 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00039 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
00040 DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
00041 CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
00042 APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00043 
00044 Copyright (C) 2008 Apple Inc. All Rights Reserved.
00045 
00046 */
00047 
00048 #import <Foundation/Foundation.h>
00049 
00050 #import "Platforms/CCGL.h"
00051 #import "CCTexture2D.h"
00052 
00053 
00054 #pragma mark -
00055 #pragma mark CCTexturePVR
00056 
00057 struct CCPVRMipmap {
00058         unsigned char *address;
00059         unsigned int len;
00060 };
00061 
00062 enum {
00063         CC_PVRMIPMAP_MAX = 16,
00064 };
00065 
00088 @interface CCTexturePVR : NSObject
00089 {
00090         struct CCPVRMipmap      mipmaps_[CC_PVRMIPMAP_MAX];     // pointer to mipmap images
00091         int             numberOfMipmaps_;                                       // number of mipmap used
00092         
00093         unsigned int    tableFormatIndex_;
00094         uint32_t width_, height_;
00095         GLuint  name_;
00096         BOOL hasAlpha_;
00097         
00098         // cocos2d integration
00099         BOOL retainName_;
00100         CCTexture2DPixelFormat format_;
00101 }
00102 
00104 - (id)initWithContentsOfFile:(NSString *)path;
00106 - (id)initWithContentsOfURL:(NSURL *)url;
00108 + (id)pvrTextureWithContentsOfFile:(NSString *)path;
00110 + (id)pvrTextureWithContentsOfURL:(NSURL *)url;
00111 
00113 @property (nonatomic,readonly) GLuint name;
00115 @property (nonatomic,readonly) uint32_t width;
00117 @property (nonatomic,readonly) uint32_t height;
00119 @property (nonatomic,readonly) BOOL hasAlpha;
00120 
00121 // cocos2d integration
00122 @property (nonatomic,readwrite) BOOL retainName;
00123 @property (nonatomic,readonly) CCTexture2DPixelFormat format;
00124 
00125 @end
00126 
00127 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone API Reference - Generated using Doxygen 1.7.4