OpenGL texture creation
Hi,
I have one image file in png format. I want to create texture out of that image. To convert into texture format .pvr I am using following command:
$ ./texturetool -e PVRTC -o ./image.pvr ./image.png
image.pvr file is getting created but with zero bytes file size. I loaded and tested it nothing comes blank screen.
Please tell me syntax of conversion from png or jpg to .pvr.
I am using this code to load created texture:
NSString *path = [NSBundle mainBundle] pathForResource:@"image" ofType:@"pvr";
NSData *data = ;
_textureskTexture_one = [Texture2D alloc initWithData:data bytes] pixelFormat:kTexture2DPixelFormat_RGBA_PVRTC4 pixelsWide:512 pixelsHigh:512 contentSize:CGSizeMake(512,512);
Not getting texture.
I am refering CrashLanding source code.
And trying to create texture like mountain.pvr
I wanna use multiple textures in single application.
Regards,
Ganesh Pisal
Vavni Inc
|