当前位置:编程学习 > wap >>

IOS上Opengle ES的问题,跪求帮助!

初学IOS和Opengl ES,在加载cubetexture的时候碰到一个问题,求解。
 
我用下面的命令加载了一组图片用来做cubetexture,请问用什么命令将纹理绑定到shader中的samplerCube上面。
 
NSArray *texturesArray = @[
 [[NSBundle mainBundle] pathForResource:@"Right" ofType:@"png"], // +x
 [[NSBundle mainBundle] pathForResource:@"Left" ofType:@"png"],  // -x
 [[NSBundle mainBundle] pathForResource:@"Up" ofType:@"png"],    // +y
 [[NSBundle mainBundle] pathForResource:@"Down" ofType:@"png"],  // -y
 [[NSBundle mainBundle] pathForResource:@"Front" ofType:@"png"], // +z
 [[NSBundle mainBundle] pathForResource:@"Back" ofType:@"png"],  // -z
 ];
 
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
                            [NSNumber numberWithBool:YES],
                            GLKTextureLoaderOriginBottomLeft,
                            nil];
 
NSError *error;
 
self.cubemapTexture = [GLKTextureLoader cubeMapWithContentsOfFiles:texturesArray
                                                              options:options
                                                                error:&error];
 
跪求那位达人帮忙解决,多谢!
补充:移动开发 ,  iPhone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,